-
Notifications
You must be signed in to change notification settings - Fork 98
TRT-2505: Add major update variant
#3214
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
base: main
Are you sure you want to change the base?
TRT-2505: Add major update variant
#3214
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
@petr-muller: This pull request references TRT-2505 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
WalkthroughSwitches release extraction to return parsed version.Version slices, broadens upgrade-detection regex and replaces prior string-based multi/minor logic with a new upgradeVariant(logger, releases, jobName) helper; updates setRelease to use Version. Adds many test cases and small snapshot value changes. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 6 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.5.0)Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions Comment |
|
/hold I'd like to clarify some details in TRT-2505 first |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: petr-muller The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@petr-muller: This pull request references TRT-2505 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Scheduling required tests: |
|
@petr-muller: This pull request references TRT-2505 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
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.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@pkg/variantregistry/ocp.go`:
- Around line 320-323: The major/minor upgrade detection regexes
(upgradeMajorMinorRegex and related upgradeOutOfChangeRegex/upgradeRegex) are
too strict and miss common adjacent-version forms like "-4.10-4.11" or
"-4.10-to-4.11", causing upgradeVariant logic to misclassify as "micro"; update
upgradeMajorMinorRegex to also match two adjacent version tokens separated by a
single token (dash, "to", or similar single-token separators) and ensure it
still detects single-version-major markers like "-4.10-major" and "-4.10-minor";
verify the adjusted pattern is used by the upgradeVariant code path and keep
upgradeOutOfChangeRegex and upgradeRegex semantics unchanged while broadening
allowed separators so typical "-4.10-4.11" and "-4.10-to-4.11" job names are
classified as major/minor upgrades.
This is the most direct approach suggested by TRT-2505; any upgrade job following a typical update job name pattern where the last version is suffixed with a `-major` segment is considered to be a major update job.
1d0b4ee to
9ef9c9f
Compare
|
@petr-muller: This pull request references TRT-2505 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@petr-muller: This pull request references TRT-2505 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/hold cancel |
| Suite: unknown | ||
| Topology: ha | ||
| Upgrade: minor | ||
| Upgrade: micro |
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.
The job name is ...release-4.12-amd64-nightly-4.12-upgrade-from-aro-4.12-aro-f60 so previously these were misclassified.
|
Scheduling required tests: |
Move the code responsible for detecting update variant into a single method operating over `version.Version` structure.
Resolves the following misclassified jobs, surfaced after code cleanup:
```
ocp_test.go:1754:
Summary of changes:
ocp_test.go:1757: Changed Upgrade (minor -> micro)
- periodic-ci-openshift-openshift-tests-private-release-4.12-amd64-nightly-4.12-upgrade-from-aro-4.12-aro-f60
- periodic-ci-openshift-openshift-tests-private-release-4.13-amd64-nightly-4.13-upgrade-from-aro-4.13-aro-f60
- periodic-ci-openshift-openshift-tests-private-release-4.14-amd64-nightly-4.14-upgrade-from-aro-4.14-aro-f60
- periodic-ci-openshift-openshift-tests-private-release-4.15-amd64-nightly-4.15-upgrade-from-aro-4.15-aro-f60
ocp_test.go:1759:
****** Run `make update-variants` to update the snapshot and accept these changes.
````
9ef9c9f to
8f79ce7
Compare
|
@petr-muller: This pull request references TRT-2505 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Scheduling required tests: |
|
@petr-muller: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
The first commit is the most direct approach using a regexp suggested by TRT-2505; any upgrade job following a certain name pattern where the last version is suffixed with a
-majorsegment is considered to be a major update job.The second commit overwrites the direct approach with a slightly more ambitious change that centralizes upgrade variant detection code into a single method over the
version.Versiondata structures, with a fallback to substring matches. I prefer this variant but kept it in a separate commit for the case we'd prefer the minimal change.Summary by CodeRabbit
New Features
Tests
Chores
✏️ Tip: You can customize this high-level summary in your review settings.