-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Conversation
Pinging @elastic/kibana-platform |
💔 Build Failed |
b3ea169
to
07f1eaf
Compare
There was a problem hiding this 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, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💔 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, |
There was a problem hiding this comment.
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,
...
});
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
💚 Build Succeeded |
* env contains distributable flag * make sure flag is always boolean
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
strikethroughsto remove checklist items you don't feel are applicable to this PR.[ ] This was checked for cross-browser compatibility, including a check against IE11[ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support[ ] Documentation was added for features that require explanation or tutorials[ ] This was checked for keyboard-only and screenreader accessibilityFor maintainers