Skip to content

Fix the invalid Conda Update workflow file (duplicate permissions) - #375

Merged
JarryShaw merged 1 commit into
mainfrom
fix/cron-conda-workflow-syntax
Sep 14, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
fix/cron-conda-workflow-syntax

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

Not a draft — this one is a one-line-class fix for CI noise that affects every branch.

Symptom

Conda Update fails on every push, with no jobs at all and only:

This run likely failed because of a workflow file issue.

Eight such runs in the last day across fix/pcapng-parser-defects, fix/reassembly-and-e2e-tests, fix/bitfield-flag-construction and fix/ipv6-extension-advance.

Cause

.github/workflows/cron-conda.yml declared top-level permissions: twice — once at the head of the file (lines 3-4) and again between the triggers and jobs: (lines 12-13). A YAML mapping cannot repeat a key, so GitHub rejects the file outright.

That also explains the part that looks contradictory: the workflow declares on: push: branches: [main, ], yet it ran on pushes to fix/* branches. A file GitHub cannot parse is a file it cannot apply a branch filter from — it registers the event and fails the run. With the file valid again, pushes to non-main branches should stop creating runs; that is the one claim here I have not been able to verify in advance, and this PR is what tests it.

The duplication came from #327 and #329, which hardened GITHUB_TOKEN scope on this same workflow independently, each adding a block.

Change

One permissions: contents: read block at the top, which is what the conda-update job's own contents: write override is written against. Trailing comma in the branch list tidied while there.

No job, step, trigger or permission scope is changed otherwise — the effective permissions are identical to what the file already intended.

cron-conda.yml declared top-level permissions twice, once at the head of the
file and once between the triggers and the jobs, which YAML forbids: a mapping
cannot repeat a key. GitHub rejected the file, so every push created a run that
failed immediately with "This run likely failed because of a workflow file
issue" and no jobs at all -- including pushes to branches the push filter was
meant to exclude, since a file that cannot be parsed cannot be filtered either.

The two blocks arrived from #327 and #329, which hardened the same workflow
independently. Kept one, and tidied the trailing comma in the branch list.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The change is minimal, restores YAML validity, and preserves the intended permissions model without altering jobs or scopes.

Pull request overview

Fixes a GitHub Actions workflow parsing failure in the “Conda Update” CI workflow by removing a duplicate top-level YAML key, restoring the workflow to a valid, loadable state so triggers and permissions can be applied as intended.

Changes:

  • Removed the second (duplicate) top-level permissions: block that made the workflow invalid YAML.
  • Tidied the push.branches list by removing the trailing comma ([main, ][main]).
File summaries
File Description
.github/workflows/cron-conda.yml Removes duplicate top-level permissions and fixes the push branch filter list to restore a valid workflow file.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@JarryShaw
JarryShaw merged commit 385fdaf into main Sep 14, 2026
50 checks passed
@JarryShaw
JarryShaw deleted the fix/cron-conda-workflow-syntax branch September 14, 2026 16:02
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