Skip to content

Conversation

@evanh
Copy link
Member

@evanh evanh commented Nov 6, 2025

Reverts #503

If this doesn't fix my issues I will unrevert.

@evanh evanh requested a review from a team as a code owner November 6, 2025 16:14
@evanh evanh closed this Nov 6, 2025
dockerfile_path: './Dockerfile'
build_args: TASKBROKER_GIT_REVISION=${{ github.sha }}
ghcr: ${{ github.event.pull_request.head.repo.fork == false }}
ghcr: true
Copy link

Choose a reason for hiding this comment

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

Bug: Hardcoding ghcr: true causes 403 Forbidden errors when pushing images from fork pull requests due to insufficient GITHUB_TOKEN permissions.
Severity: CRITICAL | Confidence: 1.00

🔍 Detailed Analysis

The change to ghcr: true at .github/workflows/image.yml:31 forces the action to attempt pushing images to GHCR for all pull requests. For pull requests originating from forks, the GITHUB_TOKEN lacks the necessary permissions to push to the upstream organization's GHCR registry, resulting in a 403 Forbidden error. This prevents the CI workflow from completing successfully for external contributions.

💡 Suggested Fix

Reintroduce the conditional ghcr: ${{ github.event.pull_request.head.repo.fork == false }} to prevent pushing to GHCR for fork pull requests. Restore the artifact saving/loading mechanism for PRs.

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: .github/workflows/image.yml#L31

Potential issue: The change to `ghcr: true` at `.github/workflows/image.yml:31` forces
the action to attempt pushing images to GHCR for all pull requests. For pull requests
originating from forks, the `GITHUB_TOKEN` lacks the necessary permissions to push to
the upstream organization's GHCR registry, resulting in a 403 Forbidden error. This
prevents the CI workflow from completing successfully for external contributions.

Did we get this right? 👍 / 👎 to inform future reviews.

assemble-taskbroker-image:
runs-on: ubuntu-latest
needs: [build]
if: ${{ (github.ref_name == 'main' || startsWith(github.ref_name, 'releases/')) && github.event_name != 'pull_request' }}
Copy link

Choose a reason for hiding this comment

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

Bug: E2E job skips for all pull requests because its dependency assemble-taskbroker-image is skipped, and no if: always() is present.
Severity: CRITICAL | Confidence: 1.00

🔍 Detailed Analysis

The assemble-taskbroker-image job at .github/workflows/image.yml:41 is configured with an if condition that causes it to be skipped for all pull requests. The self-hosted-end-to-end job has a needs: [assemble-taskbroker-image] dependency but lacks an if: always() condition or status check. Consequently, when assemble-taskbroker-image is skipped, the self-hosted-end-to-end job is also skipped by default, preventing e2e tests from running for any pull request.

💡 Suggested Fix

Modify the self-hosted-end-to-end job to handle skipped dependencies, possibly by adding if: always() or reintroducing the artifact mechanism for PRs.

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: .github/workflows/image.yml#L41

Potential issue: The `assemble-taskbroker-image` job at `.github/workflows/image.yml:41`
is configured with an `if` condition that causes it to be skipped for all pull requests.
The `self-hosted-end-to-end` job has a `needs: [assemble-taskbroker-image]` dependency
but lacks an `if: always()` condition or status check. Consequently, when
`assemble-taskbroker-image` is skipped, the `self-hosted-end-to-end` job is also skipped
by default, preventing e2e tests from running for any pull request.

Did we get this right? 👍 / 👎 to inform future reviews.

@codecov
Copy link

codecov bot commented Nov 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.83%. Comparing base (836026f) to head (a99a1e7).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #509   +/-   ##
=======================================
  Coverage   88.83%   88.83%           
=======================================
  Files          20       20           
  Lines        5867     5867           
=======================================
  Hits         5212     5212           
  Misses        655      655           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants