Skip to content

Fix scheduled CI upgrade check workflows failing at startup - #65168

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix-scheduled-upgrade-check-permissions
Apr 13, 2026
Merged

Fix scheduled CI upgrade check workflows failing at startup#65168
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix-scheduled-upgrade-check-permissions

Conversation

@potiuk

@potiuk potiuk commented Apr 13, 2026

Copy link
Copy Markdown
Member

The scheduled upgrade-check wrappers (scheduled-upgrade-check-main.yml and scheduled-upgrade-check-v3-2-test.yml) declared permissions: contents: read, which capped the permissions of the reusable upgrade-check.yml workflow they call. That workflow needs contents: write and pull-requests: write to push the upgrade branch and open the draft PR via breeze ci upgrade --create-pr.

As a result every scheduled run since #64836 failed immediately with startup_failure:

The workflow is requesting 'contents: write, pull-requests: write', but is only allowed 'contents: read, pull-requests: none'.

See failing run: https://github.com/apache/airflow/actions/runs/24329934582

This raises the caller permissions in both scheduled wrappers to match the ceiling required by the callee so the upgrade PR job can actually run.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.6)

Generated-by: Claude Code (Opus 4.6) following the guidelines

The scheduled upgrade check wrappers declared `contents: read`, which
caps the permissions of the reusable `upgrade-check.yml` they call.
That workflow needs `contents: write` and `pull-requests: write` to
push the upgrade branch and open a draft PR, so every scheduled run
failed immediately with startup_failure:

  The workflow is requesting 'contents: write, pull-requests: write',
  but is only allowed 'contents: read, pull-requests: none'.

Raise the caller permissions to the ceiling required by the callee so
the scheduled upgrade PR job can actually run.

@bugraoz93 bugraoz93 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just a curious question. If I set these permissions for other CIs, it won't cause anything from forked branches to make any writes, right? This still needs 4 eyes. Additionally, let's assume it is not a scheduled job

@potiuk
potiuk merged commit 8291f37 into apache:main Apr 13, 2026
142 checks passed
@potiuk
potiuk deleted the fix-scheduled-upgrade-check-permissions branch April 13, 2026 18:57
github-actions Bot pushed a commit that referenced this pull request Apr 13, 2026
…kflows (#65168)

The scheduled upgrade check wrappers declared `contents: read`, which
caps the permissions of the reusable `upgrade-check.yml` they call.
That workflow needs `contents: write` and `pull-requests: write` to
push the upgrade branch and open a draft PR, so every scheduled run
failed immediately with startup_failure:

  The workflow is requesting 'contents: write, pull-requests: write',
  but is only allowed 'contents: read, pull-requests: none'.

Raise the caller permissions to the ceiling required by the callee so
the scheduled upgrade PR job can actually run.
(cherry picked from commit 8291f37)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
@github-actions

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-2-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-2-test PR Link

potiuk added a commit that referenced this pull request Apr 13, 2026
…kflows (#65168) (#65176)

The scheduled upgrade check wrappers declared `contents: read`, which
caps the permissions of the reusable `upgrade-check.yml` they call.
That workflow needs `contents: write` and `pull-requests: write` to
push the upgrade branch and open a draft PR, so every scheduled run
failed immediately with startup_failure:

  The workflow is requesting 'contents: write, pull-requests: write',
  but is only allowed 'contents: read, pull-requests: none'.

Raise the caller permissions to the ceiling required by the callee so
the scheduled upgrade PR job can actually run.
(cherry picked from commit 8291f37)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
@potiuk

potiuk commented Apr 13, 2026

Copy link
Copy Markdown
Member Author

t a curious question. If I set these permissions for other CIs, it won't cause anything from forked branches to make any writes, right? This still needs 4 eyes. Additionally, let's assume it is not a scheduled job

Yep. Wokrflows from fork cannot get write access nor secrets.

vatsrahul1001 pushed a commit that referenced this pull request Apr 15, 2026
…kflows (#65168) (#65176)

The scheduled upgrade check wrappers declared `contents: read`, which
caps the permissions of the reusable `upgrade-check.yml` they call.
That workflow needs `contents: write` and `pull-requests: write` to
push the upgrade branch and open a draft PR, so every scheduled run
failed immediately with startup_failure:

  The workflow is requesting 'contents: write, pull-requests: write',
  but is only allowed 'contents: read, pull-requests: none'.

Raise the caller permissions to the ceiling required by the callee so
the scheduled upgrade PR job can actually run.
(cherry picked from commit 8291f37)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
vatsrahul1001 pushed a commit that referenced this pull request Apr 15, 2026
…kflows (#65168) (#65176)

The scheduled upgrade check wrappers declared `contents: read`, which
caps the permissions of the reusable `upgrade-check.yml` they call.
That workflow needs `contents: write` and `pull-requests: write` to
push the upgrade branch and open a draft PR, so every scheduled run
failed immediately with startup_failure:

  The workflow is requesting 'contents: write, pull-requests: write',
  but is only allowed 'contents: read, pull-requests: none'.

Raise the caller permissions to the ceiling required by the callee so
the scheduled upgrade PR job can actually run.
(cherry picked from commit 8291f37)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
vatsrahul1001 pushed a commit that referenced this pull request Apr 15, 2026
…kflows (#65168) (#65176)

The scheduled upgrade check wrappers declared `contents: read`, which
caps the permissions of the reusable `upgrade-check.yml` they call.
That workflow needs `contents: write` and `pull-requests: write` to
push the upgrade branch and open a draft PR, so every scheduled run
failed immediately with startup_failure:

  The workflow is requesting 'contents: write, pull-requests: write',
  but is only allowed 'contents: read, pull-requests: none'.

Raise the caller permissions to the ceiling required by the callee so
the scheduled upgrade PR job can actually run.
(cherry picked from commit 8291f37)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
vatsrahul1001 pushed a commit that referenced this pull request Apr 15, 2026
…kflows (#65168) (#65176)

The scheduled upgrade check wrappers declared `contents: read`, which
caps the permissions of the reusable `upgrade-check.yml` they call.
That workflow needs `contents: write` and `pull-requests: write` to
push the upgrade branch and open a draft PR, so every scheduled run
failed immediately with startup_failure:

  The workflow is requesting 'contents: write, pull-requests: write',
  but is only allowed 'contents: read, pull-requests: none'.

Raise the caller permissions to the ceiling required by the callee so
the scheduled upgrade PR job can actually run.
(cherry picked from commit 8291f37)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants