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

[ObsUX][Synthtrace] Fallback to latest GA package version if latest prerelease fetch fails #195889

Merged

Conversation

MiriamAparicio
Copy link
Contributor

Closes #195436

@MiriamAparicio MiriamAparicio added release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team v8.16.0 labels Oct 11, 2024
@MiriamAparicio MiriamAparicio requested review from a team as code owners October 11, 2024 11:08
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Oct 11, 2024
@MiriamAparicio MiriamAparicio added backport:skip This commit does not require backporting and removed ci:project-deploy-observability Create an Observability project labels Oct 11, 2024
@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Oct 11, 2024
Copy link
Contributor

@cauemarcondes cauemarcondes left a 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.

@MiriamAparicio MiriamAparicio force-pushed the 195436-fallback-fetch-apm-package branch from 4c8651d to 808ce7c Compare October 11, 2024 11:45
Comment on lines 58 to 67
// 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;
});
Copy link
Contributor

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?

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 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

Copy link
Contributor

@cauemarcondes cauemarcondes Oct 14, 2024

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?

@elasticmachine
Copy link
Contributor

⏳ Build in-progress

  • Buildkite Build
  • Commit: 47d797a
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-195889-47d797a77795

History

Copy link
Contributor

@yngrdyn yngrdyn left a comment

Choose a reason for hiding this comment

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

LGTM 👏🏼

@crespocarlos
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x
8.17
8.16

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

crespocarlos pushed a commit to crespocarlos/kibana that referenced this pull request Nov 27, 2024
crespocarlos pushed a commit to crespocarlos/kibana that referenced this pull request Nov 27, 2024
crespocarlos added a commit that referenced this pull request Nov 27, 2024
…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]>
crespocarlos added a commit that referenced this pull request Nov 27, 2024
…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]>
crespocarlos added a commit that referenced this pull request Nov 27, 2024
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team v8.16.0 v8.16.2 v8.17.0 v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ObsUX] Set a fallback apm package in case the latest version is not available to install
6 participants