-
Notifications
You must be signed in to change notification settings - Fork 143
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
Introduce upgrade tests from released versions #2955
Introduce upgrade tests from released versions #2955
Conversation
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
This pull request does not have a backport label. Could you fix it @pchila? 🙏
NOTE: |
🌐 Coverage report
|
This pull request is now in conflicts. Could you fix it? 🙏
|
de6ffd0
to
4ba5334
Compare
buildkite test this |
1 similar comment
buildkite test this |
This pull request is now in conflicts. Could you fix it? 🙏
|
4ba5334
to
2384643
Compare
buildkite test this |
2384643
to
608a4db
Compare
Last integration test didn't run any tests... There's probably an issue with the test enumeration... |
9d40f55
to
ee5ae5e
Compare
buildkite test this |
…previous major version
…latest previous major version
Co-authored-by: Blake Rouse <[email protected]>
769022d
to
bde7012
Compare
## What does this PR do? This PR filters out versions that too new from agent upgrade integration tests, allowing backport of those test on release branches. This PR needs to backported together with #2955 onto 8.9 branch ## Why is it important? We want to have working upgrade tests with relevant versions also on release branches
## What does this PR do? This PR filters out versions that too new from agent upgrade integration tests, allowing backport of those test on release branches. This PR needs to backported together with #2955 onto 8.9 branch ## Why is it important? We want to have working upgrade tests with relevant versions also on release branches (cherry picked from commit 3de585e) # Conflicts: # testing/integration/upgrade_test.go
## What does this PR do? This PR adds upgrade tests for both standalone and managed agent from some versions of the current and previous major release to the latest snapshot. The tests will select: - up to 2 versions with the same major version as the current agent - up to 1 version from a previous major version These versions are retrieved using the Artifact API and working backwards through the versions, excluding snapshots. The _up to_ part is because under certain circumstances (new major release, for example) we may not find enough versions fitting the criteria. The tests `TestStandaloneUpgrade` and `TestFleetManagedUpgrade` will start a subtest (using `t.Run()`) for each version to be used as a starting point for the upgrade and then upgrade it to the latest version of agent. Current limitations: - We are currently using the ArtifactFetcher so the starting elastic agent version all come from the artifact API. For all agent versions that allow the `--skip-verify` we use the packaged elastic agent as artifact for the upgrade via `--sourceURI` parameter ## Why is it important? We need to have automated tests for the common upgrade scenarios to detect upgrade issues as soon as possible in the development cycle. ## How to test this PR locally We can run the integration tests using `AGENT_VERSION="8.10.0-SNAPSHOT" GOTEST_FLAGS="-test.run ^(TestFleetManagedUpgrade|TestStandaloneUpgrade)$" mage integration:test` or if you want to run just a specific version upgrade scenario we can use (for example only standalone upgrade from 8.9.0 to 8.10.0-SNAPSHOT): `AGENT_VERSION="8.10.0-SNAPSHOT" GOTEST_FLAGS="-test.run ^TestStandaloneUpgrade/Upgrade_8.9.0_to_8.10.0-SNAPSHOT$"` --------- Co-authored-by: Blake Rouse <[email protected]> (cherry picked from commit cfd059d) # Conflicts: # testing/integration/upgrade_test.go
## What does this PR do? This PR adds upgrade tests for both standalone and managed agent from some versions of the current and previous major release to the latest snapshot. The tests will select: - up to 2 versions with the same major version as the current agent - up to 1 version from a previous major version These versions are retrieved using the Artifact API and working backwards through the versions, excluding snapshots. The _up to_ part is because under certain circumstances (new major release, for example) we may not find enough versions fitting the criteria. The tests `TestStandaloneUpgrade` and `TestFleetManagedUpgrade` will start a subtest (using `t.Run()`) for each version to be used as a starting point for the upgrade and then upgrade it to the latest version of agent. Current limitations: - We are currently using the ArtifactFetcher so the starting elastic agent version all come from the artifact API. For all agent versions that allow the `--skip-verify` we use the packaged elastic agent as artifact for the upgrade via `--sourceURI` parameter ## Why is it important? We need to have automated tests for the common upgrade scenarios to detect upgrade issues as soon as possible in the development cycle. ## How to test this PR locally We can run the integration tests using `AGENT_VERSION="8.10.0-SNAPSHOT" GOTEST_FLAGS="-test.run ^(TestFleetManagedUpgrade|TestStandaloneUpgrade)$" mage integration:test` or if you want to run just a specific version upgrade scenario we can use (for example only standalone upgrade from 8.9.0 to 8.10.0-SNAPSHOT): `AGENT_VERSION="8.10.0-SNAPSHOT" GOTEST_FLAGS="-test.run ^TestStandaloneUpgrade/Upgrade_8.9.0_to_8.10.0-SNAPSHOT$"` --------- Co-authored-by: Blake Rouse <[email protected]> (cherry picked from commit cfd059d) # Conflicts: # testing/integration/upgrade_test.go
…3173) This is an automatic backport of pull request #2955 done by [Mergify](https://mergify.com). --------- Co-authored-by: Paolo Chilà <[email protected]>
This PR filters out versions that too new from agent upgrade integration tests, allowing backport of those test on release branches. This PR needs to backported together with #2955 onto 8.9 branch We want to have working upgrade tests with relevant versions also on release branches
What does this PR do?
This PR adds upgrade tests for both standalone and managed agent from some versions of the current and previous major release to the latest snapshot.
The tests will select:
These versions are retrieved using the Artifact API and working backwards through the versions, excluding snapshots.
The up to part is because under certain circumstances (new major release, for example) we may not find enough versions fitting the criteria.
The tests
TestStandaloneUpgrade
andTestFleetManagedUpgrade
will start a subtest (usingt.Run()
) for each version to be used as a starting point for the upgrade and then upgrade it to the latest version of agent.Current limitations:
--skip-verify
we use the packaged elastic agent as artifact for the upgrade via--sourceURI
parameterWhy is it important?
We need to have automated tests for the common upgrade scenarios to detect upgrade issues as soon as possible in the development cycle.
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files[ ] I have added an entry in./changelog/fragments
using the changelog toolAuthor's Checklist
How to test this PR locally
We can run the integration tests using
AGENT_VERSION="8.10.0-SNAPSHOT" GOTEST_FLAGS="-test.run ^(TestFleetManagedUpgrade|TestStandaloneUpgrade)$" mage integration:test
or if you want to run just a specific version upgrade scenario we can use (for example only standalone upgrade from 8.9.0 to 8.10.0-SNAPSHOT):
AGENT_VERSION="8.10.0-SNAPSHOT" GOTEST_FLAGS="-test.run ^TestStandaloneUpgrade/Upgrade_8.9.0_to_8.10.0-SNAPSHOT$"
Related issues
Use cases
Screenshots
Logs
Questions to ask yourself