-
Notifications
You must be signed in to change notification settings - Fork 292
Test dnm2 #4798
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?
Test dnm2 #4798
Conversation
Signed-off-by: Jakub Guzik <jguzik@redhat.com>
WalkthroughChanges refactor the pipeline controller to add manual control message handling. The Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Pre-merge checks and finishing touches❌ Failed checks (2 warnings, 1 inconclusive)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jmguzik The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/pipeline required |
|
Scheduling required tests: Scheduling tests matching the |
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: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (3)
cmd/pipeline-controller/config_data_provider.go(1 hunks)cmd/pipeline-controller/helpers.go(7 hunks)cmd/pipeline-controller/helpers_test.go(10 hunks)
| ) | ||
|
|
||
| // RepoLister is a function that returns a list of "org/repo" strings that should be processed | ||
| // RepoLister i s a function that returns a list of "org/repo" strings that should be processed |
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.
Fix the new typo in the RepoLister comment.
The updated wording now reads “i s” instead of “is”. Please remove the extra space to keep the doc comment readable.
🤖 Prompt for AI Agents
In cmd/pipeline-controller/config_data_provider.go around line 13, the doc
comment for RepoLister contains a typo "i s" instead of "is"; edit the comment
to remove the extra space so it reads "is" (e.g., change 'i s' to 'is') to
restore correct wording and readability.
| if tc.expectedManualControlMessage != "" { | ||
| if manualControlMessage != tc.expectedManualControlMessage { | ||
| t.Errorf("expected manual control message %q, got %q", tc.expectedManualControlMessage, manualControlMessage) | ||
| } | ||
| return | ||
| } | ||
|
|
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.
Tighten assertions around manualControlMessage.
Right now we only check the positive case. If expectedManualControlMessage is empty we silently ignore any unexpected manual message, and when a manual message is expected we return before confirming testCmds stayed empty. Please extend the test to assert that manualControlMessage == "" whenever no message is expected, and that testCmds is empty in the manual branch. Without these checks a regression could slip through unnoticed.
🤖 Prompt for AI Agents
In cmd/pipeline-controller/helpers_test.go around lines 327 to 333, the test
only asserts the positive case for expectedManualControlMessage and returns
early, leaving two gaps: it never fails if an unexpected manualControlMessage
appears when none is expected, and it doesn't assert that testCmds remained
empty in the manual branch. Fix by adding an assertion that manualControlMessage
== "" whenever tc.expectedManualControlMessage is empty, and in the branch where
tc.expectedManualControlMessage is non-empty assert testCmds is empty before
returning (i.e., move or add the testCmds emptiness check into the manual branch
prior to the return).
|
@jmguzik: The following test failed, say
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. |
No description provided.