Tolerate BWC branch patch version bump - #20871
Conversation
When a patch release (e.g., 2.19.5) is published and the release branch is bumped to the next patch (2.19.6), BWC tests on main fail because Version.java still references the old patch version. This causes all in-flight PRs to fail until Version.java is updated. This change relaxes the logic so that BWC tests will still pass if the checked out code uses a patch version one greater than expected. This prevents CI failures every time a release branch increments its patch version, but still prevents the main branch from drifting by more than one patch version. Signed-off-by: Andrew Ross <andrross@amazon.com>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #20871 +/- ##
============================================
+ Coverage 73.30% 73.38% +0.08%
- Complexity 72280 72337 +57
============================================
Files 5796 5797 +1
Lines 330263 330323 +60
Branches 47663 47676 +13
============================================
+ Hits 242102 242420 +318
+ Misses 68754 68506 -248
+ Partials 19407 19397 -10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Thanks @andrross , I think this is pretty clever idea, the only issue I see here is that we may let some changes that require version specific logic to slip in, a hypothetical (but real) example:
I certainly see the benefits, the alternative I see (which could be a bit easier / straightforward to implement), is to have some sort of automerge (like dependabot does): on version bump, merge the active pull requests with target branch. In any case, certainly +1 to try it out, would love to have an option to cap it by time: relax BWC version fallback to one week, hard fail after (although that would require more work for doubtful benefits). |
When a patch release (e.g., 2.19.5) is published and the release branch is bumped to the next patch (2.19.6), BWC tests on main fail because Version.java still references the old patch version. This causes all in-flight PRs to fail until Version.java is updated. This change relaxes the logic so that BWC tests will still pass if the checked out code uses a patch version one greater than expected. This prevents CI failures every time a release branch increments its patch version, but still prevents the main branch from drifting by more than one patch version. Signed-off-by: Andrew Ross <andrross@amazon.com>
|
FYI @reta, didn't have much success with this approach. It turns out FullClusterRestart has some test assertions that fail on a patch mismatch: https://build.ci.opensearch.org/job/gradle-check/72679/testReport/ |
When a patch release (e.g., 2.19.5) is published and the release branch is bumped to the next patch (2.19.6), BWC tests on main fail because Version.java still references the old patch version. This causes all in-flight PRs to fail until Version.java is updated. This change relaxes the logic so that BWC tests will still pass if the checked out code uses a patch version one greater than expected. This prevents CI failures every time a release branch increments its patch version, but still prevents the main branch from drifting by more than one patch version. Signed-off-by: Andrew Ross <andrross@amazon.com> Signed-off-by: Aparajita Pandey <aparajita31pandey@gmail.com>
When a patch release (e.g., 2.19.5) is published and the release branch is bumped to the next patch (2.19.6), BWC tests on main fail because Version.java still references the old patch version. This causes all in-flight PRs to fail until Version.java is updated. This change relaxes the logic so that BWC tests will still pass if the checked out code uses a patch version one greater than expected. This prevents CI failures every time a release branch increments its patch version, but still prevents the main branch from drifting by more than one patch version. Signed-off-by: Andrew Ross <andrross@amazon.com>
When a patch release (e.g., 2.19.5) is published and the release branch is bumped to the next patch (2.19.6), BWC tests on main fail because Version.java still references the old patch version. This causes all in-flight PRs to fail until Version.java is updated.
This change relaxes the logic so that BWC tests will still pass if the checked out code uses a patch version one greater than expected. This prevents CI failures every time a release branch increments its patch version, but still prevents the main branch from drifting by more than one patch version.
I tested this manually with a local 3.5 branch. Works as expected when I bump 3.5.0 to 3.5.1, but fails with 3.5.2.
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.