Skip to content

Conversation

@jmguzik
Copy link
Contributor

@jmguzik jmguzik commented Oct 31, 2025

No description provided.

Signed-off-by: Jakub Guzik <jguzik@redhat.com>
Signed-off-by: Jakub Guzik <jguzik@redhat.com>
@coderabbitai
Copy link

coderabbitai bot commented Oct 31, 2025

Walkthrough

Changes refactor the pipeline controller to add manual control message handling. The acquireConditionalContexts function signature is updated to return an additional string value for manual control messages, with corresponding updates to call sites, error paths, and comprehensive test coverage adjustments.

Changes

Cohort / File(s) Summary
Manual control messaging implementation
cmd/pipeline-controller/helpers.go
Updated acquireConditionalContexts to return three values instead of two: (testCmds string, manualControlMessage string, err error). Manual control message logic moved from testContexts prefix inspection to explicit return value. Error handling paths updated to propagate new return signature. sendCommentWithMode modified to use manualControlMessage when provided.
Manual control messaging tests
cmd/pipeline-controller/helpers_test.go
Test structure extended with expectedManualControlMessage field. Test invocation updated to capture three return values from acquireConditionalContexts. Validation logic enhanced to check manual control messages before command assertions. Test cases updated to reflect new function signature.
Documentation fixes
cmd/pipeline-controller/config_data_provider.go
Minor typo fix in RepoLister type comment. No logic or API changes.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Function signature propagation: Verify all call sites of acquireConditionalContexts correctly handle the new three-value return and that no call sites were missed.
  • Error path consistency: Ensure all error return statements in acquireConditionalContexts correctly return the two string values in proper order alongside the error.
  • Manual control message logic: Validate that the transition from testContexts prefix inspection to explicit return value maintains equivalent behavior and correctness.
  • Test coverage completeness: Confirm test cases adequately cover scenarios where manual control messages are present, absent, and across error conditions.

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Description Check ⚠️ Warning No pull request description was provided by the author. The description is completely absent, leaving no information about why these changes were made, what problems they solve, or how the refactoring affects the system. Given that the changes include a significant function signature modification affecting multiple files, some context about the motivation and impact would be helpful for reviewers. Add a pull request description that explains the purpose of the changes. At minimum, describe what the manual control message feature does, why it was needed, and how it impacts the pipeline controller's behavior.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title Check ❓ Inconclusive The PR title "Test dnm2" is extremely vague and generic. It uses non-descriptive terms that don't convey meaningful information about the changeset. While the actual changes include a typo fix, a significant function signature refactoring in helpers.go to return an additional manual control message string, and corresponding test updates, the title provides no indication of these changes. A developer scanning the git history would have no understanding of what this PR accomplishes from the title alone. Consider revising the title to be more descriptive. For example, something like "Add manual control message support to acquireConditionalContexts" would clearly communicate the main change to readers. The current title should be replaced with one that accurately summarizes the primary objective of the changeset.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 31, 2025

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 31, 2025
@jmguzik
Copy link
Contributor Author

jmguzik commented Oct 31, 2025

/pipeline required

@openshift-ci-robot
Copy link
Contributor

Scheduling required tests:
/test e2e

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test integration-optional-test

Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 83a07c1 and b605586.

📒 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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

Comment on lines +327 to +333
if tc.expectedManualControlMessage != "" {
if manualControlMessage != tc.expectedManualControlMessage {
t.Errorf("expected manual control message %q, got %q", tc.expectedManualControlMessage, manualControlMessage)
}
return
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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).

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 31, 2025

@jmguzik: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/breaking-changes b605586 link false /test breaking-changes

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants