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

Stop using the artifact API in artifact downloads #4458

Closed
rdner opened this issue Mar 21, 2024 · 4 comments · Fixed by #4693
Closed

Stop using the artifact API in artifact downloads #4458

rdner opened this issue Mar 21, 2024 · 4 comments · Fixed by #4693
Assignees
Labels
enhancement New feature or request Team:Elastic-Agent Label for the Agent team Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Comments

@rdner
Copy link
Member

rdner commented Mar 21, 2024

Describe the enhancement:

This is a follow up to #4417

We must stop using the artifact API in our artifact downloader here

artifactsURI := fmt.Sprintf("https://artifacts-api.elastic.co/v1/search/%s-SNAPSHOT/elastic-agent", version)

And the artifact fetcher in tests here

artifactsURI := fmt.Sprintf("https://artifacts-api.elastic.co/v1/search/%s/elastic-agent", version.VersionWithPrerelease())

Describe a specific use case for the enhancement or feature:

The artifact API is unstable and we cannot rely on it: recent failure example is https://buildkite.com/elastic/elastic-agent/builds/7900#018e617f-f132-46da-b9cd-625a6741682e

More examples can be found here #4268

Sometimes it starts returning 502 for several minutes and it fails our tests and might fail in production when upgrading to a snapshot (rare use-case).

What is the definition of done?

The artifact downloader in the agent and the artifact fetcher in tests are using an alternative source of versions not involving the artifact API.

@rdner rdner added enhancement New feature or request Team:Elastic-Agent Label for the Agent team labels Mar 21, 2024
@rdner rdner self-assigned this Mar 21, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

@rdner rdner changed the title Stop using the artifact API in the integration test artifact fetcher Stop using the artifact API in artifact downloads Mar 21, 2024
@rdner
Copy link
Member Author

rdner commented Mar 21, 2024

We should be able to just use https://snapshots.elastic.co/ instead.

@rdner
Copy link
Member Author

rdner commented Mar 25, 2024

I talked to the team who owns the snapshot API.

TLDR;

It's possible to get a manifest for a certain version snapshot, e.g. 8.12.3-SNAPSHOT by doing this request https://snapshots.elastic.co/latest/8.12.3-SNAPSHOT.json and getting the build manifest from the manifest_url field of the response.

Which covers our exact use-case described in this issue.

Also, supported use-cases are:

@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Team:Elastic-Agent Label for the Agent team Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants