-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
[Uptime] Show experimental locations only when a particular flag is enabled #132063
Conversation
264e2dd
to
c68a978
Compare
Pinging @elastic/uptime (Team:uptime) |
Considering this PR defaults to not showing experimental locations I think it should be fine to merge this one while we wait for cloud to set the defaults on Staging and QA to true 😄 |
d19720b
to
b2d4e05
Compare
@@ -41,13 +43,22 @@ export async function getServiceLocations(server: UptimeServerSetup) { | |||
locations: Record<string, ManifestLocation>; | |||
}>(server.config.service!.manifestUrl!); | |||
|
|||
Object.entries(data.locations).forEach(([locationId, location]) => { | |||
const isProd = process.env.NODE_ENV === 'production'; |
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 will recommend using flag that is coming from plugin context to determine if the evn is dev or prod
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.
b2d4e05
to
3168d15
Compare
3168d15
to
3b617cf
Compare
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
@shahzad31 this is ready for a re-review. I've also enabled auto-merge given I've already tested it myself and addressed your changes, so it can go in as soon as you approve, thanks a lot 🙌 |
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
@lucasfcosta this PR has made our CI to fail on main. I've opened a PR at #132764 which I think it will make the CI green again |
@mistic ah, that's interesting, thanks for that. I wonder whether we should look into the PR checks in that case? I'd have expected the checks to catch that missing type 🤔 |
@lucasfcosta they should catch it, thats correct. In that case I think the problem was that the PR was not completely in sync with the upstream before the merge 😃 |
Summary
This PR closes #131585. It allows the UI to hide
experimental
locations unless thexpack.uptime.service.showExperimentalLocations
flag is set totrue
.How to test this PR
You must test this PR using a Kibana distributable and running from source so that you can test the
NODE_ENV
as a developer and as if you were in production, respectively.Testing in dev mode
manifest.json
file with the following contents and place it under amanifests
folder:http-server
package to serve your manifest file.showExperimentalLocations
beingfalse
.Testing as if it was in
production
manifest.json
file with the following contents and place it under amanifests
folder:http-server
package to serve your manifest file.US East [GA]
location appears.xpack.uptime.service.showExperimentalLocations
key totrue
and ensure that both locations appear and that theexperimental
location has aTech Preview
badge.Checklist
Delete any items that are not applicable to this PR.
For maintainers
Release note
Kibana will only show experimental Synthetic node locations when the
xpack.uptime.service.showExperimentalLocations
flag is set to true.