Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate legacy vars when rendering all applications #54768

Merged
merged 6 commits into from
Jan 16, 2020

Conversation

eliperelman
Copy link
Contributor

Summary

Fixes #54470.

Dev Docs

Rendering any type of application, even ones for the new platform, should still generate legacy vars injected into the page metadata, and this ensures these vars are injected for HTTP route rendering as well.

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@eliperelman eliperelman added bug Fixes for quality problems that affect the customer experience Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. v8.0.0 v7.6.0 labels Jan 14, 2020
@eliperelman eliperelman requested review from azasypkin and a team January 14, 2020 17:36
@eliperelman eliperelman self-assigned this Jan 14, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

@joshdover
Copy link
Contributor

Can we add a better e2e test that covers this case? Should validate that the custom bundle rendering endpoint not only returns a 200, but successfully loads the client-side application.

@eliperelman eliperelman requested a review from a team January 15, 2020 18:13
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@azasypkin
Copy link
Member

azasypkin commented Jan 16, 2020

ACK: testing my use case with this PR...

Copy link
Member

@azasypkin azasypkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue reported in #54470 seems to be fixed for me now, thanks!

@eliperelman @pgayvallet but when I render chromeless app in non-auth context something sends request to api/core/capabilities that leads to a fatal error as well (request fails with 401). Even if I use includeUserSettings: false. Is it related to this PR or it will be handled separately?

@pgayvallet
Copy link
Contributor

@azasypkin related to the second point of #51956. See also #51438 (comment)

If your route is anonymous, you are supposed to register it using core.http.anonymousPaths.register('/my-path');.

Exemple in src/plugins/status_page/public/plugin.ts

@azasypkin
Copy link
Member

If your route is anonymous, you are supposed to register it using core.http.anonymousPaths.register('/my-path');.

Ah, right, completely forgot, thanks!

eliperelman added a commit to eliperelman/kibana that referenced this pull request Jan 16, 2020
* Generate legacy vars when rendering all applications

* Move rendering functional tests and add user settings tests

* Make rendering integration tests more robust, get data from page

* Address review nits, fix CI failures

* Remove extraneous file

* Fix type error
@eliperelman eliperelman added v7.7.0 and removed v7.6.0 labels Jan 16, 2020
eliperelman added a commit to eliperelman/kibana that referenced this pull request Jan 16, 2020
* Generate legacy vars when rendering all applications

* Move rendering functional tests and add user settings tests

* Make rendering integration tests more robust, get data from page

* Address review nits, fix CI failures

* Remove extraneous file

* Fix type error
eliperelman added a commit that referenced this pull request Jan 16, 2020
* Generate legacy vars when rendering all applications

* Move rendering functional tests and add user settings tests

* Make rendering integration tests more robust, get data from page

* Address review nits, fix CI failures

* Remove extraneous file

* Fix type error
eliperelman added a commit that referenced this pull request Jan 16, 2020
* Generate legacy vars when rendering all applications

* Move rendering functional tests and add user settings tests

* Make rendering integration tests more robust, get data from page

* Address review nits, fix CI failures

* Remove extraneous file

* Fix type error
jloleysens added a commit to jloleysens/kibana that referenced this pull request Jan 17, 2020
…t-of-legacy

* 'master' of github.com:elastic/kibana: (142 commits)
  [Vis] Move Timelion Vis to vis_type_timelion (elastic#52069)
  Deprecate `chrome.navlinks.update` and add documentation (elastic#54893)
  [ML] Single Metric Viewer: Fix time bounds with custom strings. (elastic#55045)
  [Vis: Default editor] EUIficate and Reactify the sidebar (elastic#49864)
  [Mappings editor] Fix cannot set boolean value for "null_value" param (elastic#55015)
  [SIEM] Adds support for apm-* to the network map (elastic#54876)
  [Reporting] Define shims of legacy dependencies (elastic#54082)
  Resolver is overflow: hidden to prevent obscured elements from showing up (elastic#55076)
  Upgraded EUI to 18.2.1 (elastic#55090)
  [Maps] Support styles on agg fields with _of_ in name (elastic#54965)
  Remove xpack_main requirement, it's no longer in use (elastic#55060)
  Fix Snapshots Policies Alignment Issue in IE11 (elastic#54866)
  first rule cuts (elastic#54990)
  [DOCS] Adds geocentroid note to coordinate map (elastic#54389)
  [Canvas] Fixes the Copy Post Url link (elastic#54831)
  Fixes bugs with full screen filters (elastic#54792)
  [ML] Fix decoding in the URL state  (elastic#54915)
  Remove redundant `x-pack/typings`. (elastic#55042)
  [SIEM][Detection Engine] Adds critical missing status route to prepackaged rules
  Generate legacy vars when rendering all applications (elastic#54768)
  ...

# Conflicts:
#	x-pack/plugins/translations/translations/ja-JP.json
#	x-pack/plugins/translations/translations/zh-CN.json
jkelastic pushed a commit to jkelastic/kibana that referenced this pull request Jan 17, 2020
* Generate legacy vars when rendering all applications

* Move rendering functional tests and add user settings tests

* Make rendering integration tests more robust, get data from page

* Address review nits, fix CI failures

* Remove extraneous file

* Fix type error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.6.0 v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NP apps with custom appRoute fail to load due to missing legacy injected vars
6 participants