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

Env contains distributable flag #40361

Merged
merged 2 commits into from
Jul 5, 2019

Conversation

mshustov
Copy link
Contributor

@mshustov mshustov commented Jul 4, 2019

Summary

Close #40187
This information is available in for Legacy config https://github.com/elastic/kibana/blob/master/src/legacy/server/config/config.js#L113 and expected to be present for config schema validation in New platform.

Checklist

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

For maintainers

@mshustov mshustov added review Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Feature:New Platform release_note:skip Skip the PR/issue when compiling release notes v7.4.0 labels Jul 4, 2019
@mshustov mshustov requested a review from a team as a code owner July 4, 2019 14:52
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform

@mshustov mshustov added this to Code review in kibana-core [DEPRECATED] Jul 4, 2019
@elasticmachine
Copy link
Contributor

💔 Build Failed

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.

LGTM with green CI, thanks!

@@ -116,6 +118,7 @@ Env {
"branch": "some-branch",
"buildNum": 9007199254740991,
"buildSha": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"dist": undefined,
Copy link
Member

Choose a reason for hiding this comment

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

note: hmm, can we make sure isKibanaDistributable and dist are always boolean? Just for the sake of consistency.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agree, TS fooled me
2019-07-05_12-47-19

@elasticmachine
Copy link
Contributor

💔 Build Failed

@@ -138,6 +139,7 @@ export class Env {
buildNum: isKibanaDistributable ? pkg.build.number : Number.MAX_SAFE_INTEGER,
buildSha: isKibanaDistributable ? pkg.build.sha : 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
version: pkg.version,
dist: isKibanaDistributable,
Copy link
Contributor

@rudolf rudolf Jul 5, 2019

Choose a reason for hiding this comment

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

Although we used dist in LP what do you think of using a more descriptive key, we could use the full word distributable but isKibanaDistributable is probably even more descriptive like:

this.packageInfo = Object.freeze({
...
  version: pkg.version,
  isKibanaDistributable,
...
});

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wish we did, but suspect it slows down migration as require manual changing. I'd rename this flag when plugins migrated to NP and implemented with Typescript.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, how and where we introduce breaking changes probably warrants a bigger discussion and doesn't need to block this pr.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@mshustov mshustov merged commit 9e147f5 into elastic:master Jul 5, 2019
kibana-core [DEPRECATED] automation moved this from Code review to Needs Backport Jul 5, 2019
mshustov added a commit to mshustov/kibana that referenced this pull request Jul 5, 2019
* env contains distributable flag

* make sure flag is always boolean
mshustov added a commit that referenced this pull request Jul 5, 2019
* env contains distributable flag

* make sure flag is always boolean
@mshustov mshustov added backported and removed review labels Jul 5, 2019
@mshustov mshustov moved this from Needs Backport to Done (this week) in kibana-core [DEPRECATED] Jul 10, 2019
chrisronline pushed a commit to chrisronline/kibana that referenced this pull request Jul 11, 2019
* env contains distributable flag

* make sure flag is always boolean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported Feature:New Platform release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New platform should inject "is distributable" flag in package info
4 participants