fix(wait-for-konflux): failures due to improper variable references#367
Conversation
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
|
Warning Review limit reached
More reviews will be available in 37 minutes and 33 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe workflow removes two environment variables that previously held Konflux check-name values and replaces all usages with hardcoded strings throughout the pipeline stages, affecting the build check start, build wait, and EC wait operations. ChangesCI Workflow Check Names
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/pushimage-next.yaml (1)
49-56:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winFix repo-token wiring for
wait-for-check-start.yaml
- In
.github/workflows/pushimage-next.yaml,repo-tokenis passed underwith:when calling./.github/workflows/includes/wait-for-check-start.yaml, but that reusable workflow declares it underworkflow_call.secrets; pass it via asecrets:block instead.- In
./.github/workflows/includes/wait-for-check-start.yaml,GH_TOKENis set from${{ inputs.repo-token }}, butrepo-tokenis a secret—use${{ secrets.repo-token }}.# caller (pushimage-next.yaml) uses: ./.github/workflows/includes/wait-for-check-start.yaml with: check-name: ... repository: ${{ github.repository }} ref: ${{ github.ref }} secrets: repo-token: ${{ secrets.GITHUB_TOKEN }}# reusable workflow (wait-for-check-start.yaml) env: GH_TOKEN: ${{ secrets.repo-token }}🤖 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 @.github/workflows/pushimage-next.yaml around lines 49 - 56, The caller job waitForKonfluxBuildStart is passing repo-token under with: but the reusable workflow wait-for-check-start.yaml declares repo-token as a secret; move repo-token into a secrets: block when calling the reusable workflow (e.g., add secrets: repo-token: ${{ secrets.GITHUB_TOKEN }} alongside uses:) and update the reusable workflow to read the secret via env GH_TOKEN: ${{ secrets.repo-token }} instead of inputs.repo-token; ensure the input name(s) (check-name, repository, ref) stay under with: and only the repo-token is supplied under secrets: to match workflow_call.secrets.
🤖 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.
Inline comments:
In @.github/workflows/pushimage-next.yaml:
- Line 66: The check-name string "Red Hat Konflux /
devfile-registry-base-main-on-push" contains a trailing space which prevents
lewagon/wait-on-check-action from matching the check; remove the trailing
whitespace so the check-name exactly matches the target check (update the
check-name value used in the workflow where "check-name: Red Hat Konflux /
devfile-registry-base-main-on-push " appears).
- Line 53: Remove the trailing whitespace in the check-name value so the string
exactly matches what wait-for-check-start.yaml expects: update the check-name
entry containing "Red Hat Konflux / devfile-registry-base-main-on-push" by
deleting the extra space after "on-push" so grep -q exact matching succeeds.
---
Outside diff comments:
In @.github/workflows/pushimage-next.yaml:
- Around line 49-56: The caller job waitForKonfluxBuildStart is passing
repo-token under with: but the reusable workflow wait-for-check-start.yaml
declares repo-token as a secret; move repo-token into a secrets: block when
calling the reusable workflow (e.g., add secrets: repo-token: ${{
secrets.GITHUB_TOKEN }} alongside uses:) and update the reusable workflow to
read the secret via env GH_TOKEN: ${{ secrets.repo-token }} instead of
inputs.repo-token; ensure the input name(s) (check-name, repository, ref) stay
under with: and only the repo-token is supplied under secrets: to match
workflow_call.secrets.
🪄 Autofix (Beta)
❌ Autofix failed (check again to retry)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d6e90d3b-db16-46c9-ba1b-f0585285b1d4
📒 Files selected for processing (1)
.github/workflows/pushimage-next.yaml
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. The agent generated fixes only for
Lines 50–56 needs: indexServerBuild
uses: ./.github/workflows/includes/wait-for-check-start.yaml
with:
- check-name: Red Hat Konflux / devfile-registry-base-main-on-push
+ check-name: Red Hat Konflux / devfile-registry-base-main-on-push
repository: ${{ github.repository }}
ref: ${{ github.ref }}
repo-token: ${{ secrets.GITHUB_TOKEN }}Lines 63–69 uses: lewagon/wait-on-check-action@74049309dfeff245fe8009a0137eacf28136cb3c # v1.5.0
with:
ref: ${{ github.ref }}
- check-name: Red Hat Konflux / devfile-registry-base-main-on-push
+ check-name: Red Hat Konflux / devfile-registry-base-main-on-push
repo-token: ${{ secrets.GITHUB_TOKEN }}
waitForKonfluxECStart: |
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Michael Valdron <mvaldron@redhat.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Michael Valdron <mvaldron@redhat.com>
421cc39 to
6931de7
Compare
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
8660fe5 to
67021f8
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Jdubrick, michael-valdron 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 |
Description of Changes
Summarize the changes you made as part of this pull request.
#345 introduces workflow syntax errors due to improper use of environment variables in specific places, causing the build trigger for the community registry to fail. This PR replaces all usages of these environment variables with the constant string values.
Related Issue(s)
Link the GitHub/GitLab/JIRA issues that are related to this PR.
Acceptance Criteria
Tests
Documentation
Tests Performed
Explain what tests you personally ran to ensure the changes are functioning as expected.
How To Test
Instructions for the reviewer on how to test your changes.
Notes To Reviewer
Any notes you would like to include for the reviewer.
Summary by CodeRabbit