NO-JIRA: Register the e2e tests for accept in the subfolder#2300
NO-JIRA: Register the e2e tests for accept in the subfolder#2300hongkailiu wants to merge 1 commit into
Conversation
It was missed in openshift#2294 With the fix, the generated metadata from the build binary recognizes the tests in the subfolder: ```console $ CGO_CFLAGS="-I/opt/homebrew/opt/heimdal/include" make build && ./oc-tests-ext update $ cat .openshift-tests-extension/openshift_payload_oc.json| grep Serial | grep accept "name": "[sig-cli][OCPFeatureGate:ClusterUpdateAcceptRisks] oc can operate accept risks [Serial]", $ rg 'accept risks' ./test/e2e ./test/e2e/admin/upgrade/accept/accept.go 62: g.It("can operate accept risks [Serial]", g.Label("tech-preview"), func() { ```
|
@hongkailiu: This pull request explicitly references no jira issue. 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. |
WalkthroughA single blank import for the ChangesTest registration import
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: hongkailiu 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 |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
cmd/oc-tests-ext/dependencymagnet.go (1)
1-2: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winUpdate the file header. It still says registration moved to
e2e.RegisterTests(), but this package continues to register tests through blank imports. Keep the comment aligned with the actual mechanism.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@cmd/oc-tests-ext/dependencymagnet.go` around lines 1 - 2, The file header in dependencymagnet.go is out of sync with how tests are actually registered. Update the top-of-file comment to reflect the current blank-import based registration mechanism used by this package, and remove the outdated reference to e2e.RegisterTests() so the comment matches the actual behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@cmd/oc-tests-ext/dependencymagnet.go`:
- Around line 1-2: The file header in dependencymagnet.go is out of sync with
how tests are actually registered. Update the top-of-file comment to reflect the
current blank-import based registration mechanism used by this package, and
remove the outdated reference to e2e.RegisterTests() so the comment matches the
actual behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: fcaea1c0-3002-47f3-95d4-a6fd333fcd5d
📒 Files selected for processing (1)
cmd/oc-tests-ext/dependencymagnet.go
|
/test e2e-aws-ovn |
|
/verified by @hongkailiu |
|
@hongkailiu: This PR has been marked as verified by 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. |
|
/test e2e-aws-ovn |
|
@hongkailiu: 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. |
It was missed in #2294.
With the fix, the generated metadata from the build binary recognizes the tests in the subfolder:
Apparently, my verification there looked at a wrong case.
Pushing the metadata to the repo (cvo does it) may void a mistake like this but it might not be common practice and it might cause other troubles like this one (internal slack conversation). So I am not going there.
Notice that the above test case is not executed in the presubmit oc-ote-serial. However, this is not related to #2294 because it has been like that from day 1 #2170 . It might be caused by
[OCPFeatureGate:ClusterUpdateAcceptRisks]in the test name (although I have no proof for it). But I have proof that the case is executed in some other jobs.Update
The proof came.
#2302
The presubmit https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_oc/2302/pull-ci-openshift-oc-main-e2e-aws-oc-ote-serial/2074471953715957760 comes with
Summary by CodeRabbit