-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Telemetry] Use staging if it's not a distributable release #63875
[Telemetry] Use staging if it's not a distributable release #63875
Conversation
…of 'dev' vs. 'prod' approach)
Pinging @elastic/pulse (Team:Pulse) |
During the build process, another flag is set: |
private readonly version: string; | ||
|
||
constructor(initializerContext: PluginInitializerContext) { | ||
this.logger = initializerContext.logger.get(); | ||
this.isDev = initializerContext.env.mode.dev; | ||
this.isProd = initializerContext.env.packageInfo.dist; // Is it a distributable release? => isProd |
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.
"prod" and "dev" mean something different than "dist" and "source", this probably shouldn't be called isProd
What is the difference between prod and dist? |
@Bamieh from here:
Anyway, I'll update in a sec this PR about @spalger 's comment. He is right: we shouldn't mix their names :) |
I'm wondering if these changes mean we can revert the ones from this PR: #63356 On one hand, I'd rather keep it so we don't populate staging with (potentially broken) garbage, as PRs might contain malformed documents. Actually, the potentially broken garbage reason has never been a problem when pushing the data to Live and during the dev time, those documents are likely to be pushed to staging anyway (when the dev is running Kibana locally). Before pushing a commit reverting those changes, I'd like to know your thoughts @elastic/pulse ? |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
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. I still think we should keep the enforced staging urls for testing in any case.
…63875) * [Telemetry] Use staging if it's not a distributable release (instead of 'dev' vs. 'prod' approach) * Rename isProd to isDistributable and useProdKey
Pinging @elastic/kibana-core (Team:Core) |
Summary
At the moment we rely on the
dev
flag to decide whether to push the telemetry to staging or production.We can use the
dist
flag instead. This flag istrue
only when running from a distributable (either built from source or downloaded), but not when running asnode scripts/kibana start
.Maybe we can get confirmation this is the expected behaviour from the @elastic/kibana-operations team.
For maintainers