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

Pin ESS component version for integration testing #6639

Open
rdner opened this issue Jan 30, 2025 · 1 comment
Open

Pin ESS component version for integration testing #6639

rdner opened this issue Jan 30, 2025 · 1 comment
Labels
enhancement New feature or request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Comments

@rdner
Copy link
Member

rdner commented Jan 30, 2025

Describe the enhancement:

Our integration tests interact with the most recent images in the ESS canary region. These are occasionally broken and this blocks our CI until they are fixed again. Which takes at least one day to produce a new snapshot.

To avoid that, we need to pin the ESS stack version using a file (e.g. .ess-stateful-version). Then we read this file before calling the ESS provisioner, extract the version and set it as a part of the "create deployment" request.

After we have the file, we need to setup an automation that create a PR to update it according to the latest snapshot. This way the CI failures would be limited only to this PR and would not block the entire team.

Our ESS provisioner for stateful deployment supports setting component versions. See:

https://github.com/elastic/elastic-agent/blob/main/pkg/testing/ess/create_deployment_request.tmpl.json

Here we call the provisioner:

https://github.com/elastic/elastic-agent/blob/main/magefile.go#L2805-L2826

See the existing update-versions automation here:

https://github.com/elastic/elastic-agent/blob/main/.github/workflows/bump-agent-versions.sh

This is where we get the snapshot versions:

https://github.com/elastic/elastic-agent/blob/main/pkg/testing/tools/snapshots/snapshots.go#L72-L86

This automation is called through here:

https://github.com/elastic/elastic-agent/blob/main/magefile.go#L2027-L2086

What is the definition of done?

  • We have a file with a pinned version of the stack that we use in ESS for integration tests
  • We have an automation that creates PRs that update this file and indicate if the build on the new stack version fails.
@rdner rdner added enhancement New feature or request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team labels Jan 30, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-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-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

No branches or pull requests

2 participants