-
Notifications
You must be signed in to change notification settings - Fork 154
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
Fix selection of testing version #6578
Conversation
This pull request is now in conflicts. Could you fix it? 🙏
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
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 am probably missing something but I tried to validate this PR updating the TestFetchUpgradableVersionsAfterFeatureFreeze
unit-test
Index: testing/upgradetest/versions_test.go
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/testing/upgradetest/versions_test.go b/testing/upgradetest/versions_test.go
--- a/testing/upgradetest/versions_test.go (revision 584f0acdbec6b7a42be159242b375dcdf9883649)
+++ b/testing/upgradetest/versions_test.go (date 1738220339468)
@@ -23,6 +23,10 @@
"7.17.16",
"7.17.17",
"7.17.18",
+ "7.17.25",
+ "7.17.26",
+ "7.17.27",
+ "7.17.28",
"8.9.2",
"8.10.0",
"8.10.1",
@@ -38,12 +42,25 @@
"8.12.1",
"8.12.2",
"8.13.0",
+ "8.14.0",
+ "8.15.3+build202411051926",
+ "8.15.4",
+ "8.15.5",
+ "8.16.0",
+ "8.16.1",
+ "8.16.2",
+ "8.16.3",
+ "8.17.0",
+ "8.17.1",
}
snapshotList = []string{
"7.17.19-SNAPSHOT",
+ "7.17.28-SNAPSHOT",
"8.12.2-SNAPSHOT",
"8.13.0-SNAPSHOT",
"8.14.0-SNAPSHOT",
+ "8.17.1-SNAPSHOT",
+ "8.18.0-SNAPSHOT",
}
)
@@ -52,21 +69,19 @@
defer cancel()
expectedUpgradableVersions := []string{
- "8.13.0-SNAPSHOT",
- "8.12.2",
- "8.12.2-SNAPSHOT",
- "8.12.1",
- "8.12.0",
- "8.11.4",
- "7.17.18",
+ "8.18.0-SNAPSHOT",
+ "8.17.1",
+ "8.17.1-SNAPSHOT",
+ "8.16.3",
+ "7.17.28-SNAPSHOT",
}
reqs := VersionRequirements{
- UpgradeToVersion: "8.13.0", // to test that 8.14 is not returned
- CurrentMajors: 3, // should return 8.12.2, 8.12.1, 8.12.0
- PreviousMajors: 3, // should return 7.17.18
- PreviousMinors: 2, // should return 8.12.2, 8.11.4
- SnapshotBranches: []string{"8.13", "8.12"}, // should return 8.13.0-SNAPSHOT, 8.12.2-SNAPSHOT
+ UpgradeToVersion: "9.0.0", // to test that 8.14 is not returned
+ CurrentMajors: 1, // should return 8.12.2, 8.12.1, 8.12.0
+ PreviousMajors: 1, // should return 7.17.18
+ PreviousMinors: 2, // should return 8.12.2, 8.11.4
+ SnapshotBranches: []string{"8.x", "8.17", "7.17"}, // should return 8.13.0-SNAPSHOT, 8.12.2-SNAPSHOT
}
vf := fetcherMock{
but this fails
Expected :[]string{"8.18.0-SNAPSHOT", "8.17.1", "8.17.1-SNAPSHOT", "8.16.3", "7.17.28-SNAPSHOT"}
Actual :[]string{"8.18.0-SNAPSHOT", "8.17.1", "8.17.1-SNAPSHOT", "8.16.3", "8.14.0-SNAPSHOT"}
could you please update the unit-test to capture the example you mention in the description @michalpristas ? 🙂
snapshotList = []string{
"7.17.28-SNAPSHOT",
"8.17.1-SNAPSHOT",
"8.18.0-SNAPSHOT",
} normally we have logic in fetcher to filter branches based on req.SnapshotBranches. but here we have mock that returns |
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.
thanks for the explanation @michalpristas , LGTM
Why are we not including 9.0.0-SNAPSHOT explicitly? Seems like we should probably start testing it, we test 8.18.0-SNAPSHOT and that is always behind the HEAD of the 8.18 branch as well. |
Co-authored-by: Craig MacKenzie <[email protected]>
9.0 or 9.1. ? did not include it as this was not the purpose of this PR |
This pull request is now in conflicts. Could you fix it? 🙏
|
b951f42
to
881f757
Compare
I pushed to resolve merge conflicts in testVersions |
|
now we're failing only on airgapped flakyness |
💚 Build Succeeded
History
|
* mark and skip flaky TestOTelManager_Run * updated test version selection * Update testing/upgradetest/versions.go Co-authored-by: Craig MacKenzie <[email protected]> * updated versions * pin 9.0 * pin 9.0 * removed version pin for 9.0 * Update magefile.go * updated branches * fix previousMinor for pinned 9.0 --------- Co-authored-by: Craig MacKenzie <[email protected]> Co-authored-by: Panos Koutsovasilis <[email protected]> (cherry picked from commit 2614cb5)
* mark and skip flaky TestOTelManager_Run * updated test version selection * Update testing/upgradetest/versions.go Co-authored-by: Craig MacKenzie <[email protected]> * updated versions * pin 9.0 * pin 9.0 * removed version pin for 9.0 * Update magefile.go * updated branches * fix previousMinor for pinned 9.0 --------- Co-authored-by: Craig MacKenzie <[email protected]> Co-authored-by: Panos Koutsovasilis <[email protected]> (cherry picked from commit 2614cb5) # Conflicts: # testing/integration/testdata/.upgrade-test-agent-versions.yml # testing/upgradetest/versions.go
* mark and skip flaky TestOTelManager_Run * updated test version selection * Update testing/upgradetest/versions.go Co-authored-by: Craig MacKenzie <[email protected]> * updated versions * pin 9.0 * pin 9.0 * removed version pin for 9.0 * Update magefile.go * updated branches * fix previousMinor for pinned 9.0 --------- Co-authored-by: Craig MacKenzie <[email protected]> Co-authored-by: Panos Koutsovasilis <[email protected]> (cherry picked from commit 2614cb5) # Conflicts: # testing/integration/testdata/.upgrade-test-agent-versions.yml # testing/upgradetest/versions.go
* mark and skip flaky TestOTelManager_Run * updated test version selection * Update testing/upgradetest/versions.go Co-authored-by: Craig MacKenzie <[email protected]> * updated versions * pin 9.0 * pin 9.0 * removed version pin for 9.0 * Update magefile.go * updated branches * fix previousMinor for pinned 9.0 --------- Co-authored-by: Craig MacKenzie <[email protected]> Co-authored-by: Panos Koutsovasilis <[email protected]> (cherry picked from commit 2614cb5) # Conflicts: # testing/integration/testdata/.upgrade-test-agent-versions.yml # testing/upgradetest/versions.go
* mark and skip flaky TestOTelManager_Run * updated test version selection * Update testing/upgradetest/versions.go Co-authored-by: Craig MacKenzie <[email protected]> * updated versions * pin 9.0 * pin 9.0 * removed version pin for 9.0 * Update magefile.go * updated branches * fix previousMinor for pinned 9.0 --------- Co-authored-by: Craig MacKenzie <[email protected]> Co-authored-by: Panos Koutsovasilis <[email protected]> (cherry picked from commit 2614cb5) # Conflicts: # testing/upgradetest/versions.go
SLightly changing algorithm to select test versions
with config
these available versions
resolved to
before change:
after change:
as we wanted 1 previous major in case of target
9.0.0
it is8.x
and 2 previous minors so out of
8.x
we took latest patches for8.17
and8.16
as released ones