-
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
[ObsUX][Synthtrace] Fallback to latest GA package version if latest prerelease fetch fails #195889
[ObsUX][Synthtrace] Fallback to latest GA package version if latest prerelease fetch fails #195889
Conversation
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
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 just some nits.
packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_kibana_client.ts
Outdated
Show resolved
Hide resolved
packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_kibana_client.ts
Outdated
Show resolved
Hide resolved
packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_kibana_client.ts
Outdated
Show resolved
Hide resolved
packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_kibana_client.ts
Outdated
Show resolved
Hide resolved
4c8651d
to
808ce7c
Compare
// First attempt fetch latest Prerelease version (prerelease=true) | ||
return await fetchPackageVersion({ prerelease: true }); | ||
} catch (error) { | ||
this.logger.debug( | ||
'Fetching latestes prerelease version failed, retrying with latest GA version' | ||
); | ||
// Retry with fetch latest GA version (prerelease=false) | ||
const retryResult = await fetchPackageVersion({ prerelease: false }).catch((retryError) => { | ||
throw retryError; | ||
}); |
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 think you can drop the comments here too. The code is pretty obvious.
Also, do you still need to add the catch
block on the retry?
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 added to avoid having an unhandled promise rejection. Do you think it's not necessary?
I look where we call fetchLatestApmPackageVersion()
and I'm not sure that it will be handled there
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.
Can you try it out by juts throwing a new error when prerelease: false
and remove the catch to see what will happen?
⏳ Build in-progress
History
|
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 👏🏼
…rerelease fetch fails (elastic#195889) Closes elastic#195436 (cherry picked from commit ce2cf6b)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…rerelease fetch fails (elastic#195889) Closes elastic#195436 (cherry picked from commit ce2cf6b)
…rerelease fetch fails (elastic#195889) Closes elastic#195436 (cherry picked from commit ce2cf6b)
…atest prerelease fetch fails (#195889) (#201928) closes #201513 closes [#201512](#201512) # Backport This will backport the following commits from `main` to `8.17`: - [[ObsUX][Synthtrace] Fallback to latest GA package version if latest prerelease fetch fails (#195889)](#195889) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Miriam","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-14T14:06:33Z","message":"[ObsUX][Synthtrace] Fallback to latest GA package version if latest prerelease fetch fails (#195889)\n\nCloses https://github.com/elastic/kibana/issues/195436","sha":"ce2cf6bb3c7fb36ed7a3d5bf23960994f0b17b50","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:skip","v9.0.0","ci:project-deploy-observability","Team:obs-ux-infra_services","v8.16.0"],"number":195889,"url":"https://github.com/elastic/kibana/pull/195889","mergeCommit":{"message":"[ObsUX][Synthtrace] Fallback to latest GA package version if latest prerelease fetch fails (#195889)\n\nCloses https://github.com/elastic/kibana/issues/195436","sha":"ce2cf6bb3c7fb36ed7a3d5bf23960994f0b17b50"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195889","number":195889,"mergeCommit":{"message":"[ObsUX][Synthtrace] Fallback to latest GA package version if latest prerelease fetch fails (#195889)\n\nCloses https://github.com/elastic/kibana/issues/195436","sha":"ce2cf6bb3c7fb36ed7a3d5bf23960994f0b17b50"}},{"branch":"8.x","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Miriam <[email protected]>
…test prerelease fetch fails (#195889) (#201926) # Backport This will backport the following commits from `main` to `8.x`: - [[ObsUX][Synthtrace] Fallback to latest GA package version if latest prerelease fetch fails (#195889)](#195889) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Miriam","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-14T14:06:33Z","message":"[ObsUX][Synthtrace] Fallback to latest GA package version if latest prerelease fetch fails (#195889)\n\nCloses https://github.com/elastic/kibana/issues/195436","sha":"ce2cf6bb3c7fb36ed7a3d5bf23960994f0b17b50","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:skip","v9.0.0","ci:project-deploy-observability","Team:obs-ux-infra_services","v8.16.0"],"number":195889,"url":"https://github.com/elastic/kibana/pull/195889","mergeCommit":{"message":"[ObsUX][Synthtrace] Fallback to latest GA package version if latest prerelease fetch fails (#195889)\n\nCloses https://github.com/elastic/kibana/issues/195436","sha":"ce2cf6bb3c7fb36ed7a3d5bf23960994f0b17b50"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195889","number":195889,"mergeCommit":{"message":"[ObsUX][Synthtrace] Fallback to latest GA package version if latest prerelease fetch fails (#195889)\n\nCloses https://github.com/elastic/kibana/issues/195436","sha":"ce2cf6bb3c7fb36ed7a3d5bf23960994f0b17b50"}},{"branch":"8.x","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Miriam <[email protected]>
…atest prerelease fetch fails (#195889) (#201929) # Backport This will backport the following commits from `main` to `8.16`: - [[ObsUX][Synthtrace] Fallback to latest GA package version if latest prerelease fetch fails (#195889)](#195889) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Miriam","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-14T14:06:33Z","message":"[ObsUX][Synthtrace] Fallback to latest GA package version if latest prerelease fetch fails (#195889)\n\nCloses https://github.com/elastic/kibana/issues/195436","sha":"ce2cf6bb3c7fb36ed7a3d5bf23960994f0b17b50","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:skip","v9.0.0","ci:project-deploy-observability","Team:obs-ux-infra_services","v8.16.0"],"number":195889,"url":"https://github.com/elastic/kibana/pull/195889","mergeCommit":{"message":"[ObsUX][Synthtrace] Fallback to latest GA package version if latest prerelease fetch fails (#195889)\n\nCloses https://github.com/elastic/kibana/issues/195436","sha":"ce2cf6bb3c7fb36ed7a3d5bf23960994f0b17b50"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195889","number":195889,"mergeCommit":{"message":"[ObsUX][Synthtrace] Fallback to latest GA package version if latest prerelease fetch fails (#195889)\n\nCloses https://github.com/elastic/kibana/issues/195436","sha":"ce2cf6bb3c7fb36ed7a3d5bf23960994f0b17b50"}},{"branch":"8.x","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Miriam <[email protected]>
Closes #195436