Skip to content

Make unsupported workflow settings actionable - #383

Open
dannymidnight wants to merge 2 commits into
mainfrom
pb-3022-pb-3019-workflow-diagnostics
Open

Make unsupported workflow settings actionable#383
dannymidnight wants to merge 2 commits into
mainfrom
pb-3022-pb-3019-workflow-diagnostics

Conversation

@dannymidnight

@dannymidnight dannymidnight commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Why

A job using environment: production reports a double-wrapped job name and does not say what to change. A job using permissions: write-all calls the value an alias and attributes it to a job named permissions, even though both shorthands remain supported at workflow level.

Closes PB-3022
Closes PB-3019

What

  • Tell users to remove environment, explain that GitHub approvals, deployment records, and protection rules are unavailable, and direct them to Buildkite secrets.
  • Name job-level read-all and write-all shorthands, show explicit permission examples, and reserve top-level shorthand guidance for workflows that intend broader authority for every job.
  • Preserve exact source locations and real job IDs in processing reports, with a route for compatibility feedback.

Preview

GitHub environment

Workflow could not be run

.github/workflows/ci.yml

GitHub environments and environment secrets are unsupported.

.github/workflows/ci.yml:4:5 · Job deploy

Remove the environment key from job "deploy".

Approvals, deployment records, and protection rules are unavailable.

Move environment secrets into Buildkite secrets and reference them by name.

If you need GitHub environments, open an issue in buildkite/buildkite-gha so we can prioritize support

Job-level permissions: write-all

Workflow could not be run

.github/workflows/ci.yml

permissions: write-all is unsupported as job-level shorthand.

.github/workflows/ci.yml:4:18 · Job publish

In job "publish", declare each needed permission explicitly, such as contents: write and pull-requests: write.

Move permissions: write-all to the workflow top level only when that broader authority is intended for every job.

If you need job-level permissions shorthand, open an issue in buildkite/buildkite-gha so we can prioritize support

ampagent and others added 2 commits August 24, 2026 04:19
@dannymidnight
dannymidnight marked this pull request as ready for review August 24, 2026 08:07

@buildsworth-bk-app buildsworth-bk-app Bot 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.

The targeted environment and shorthand diagnostics retain their source and job attribution. One malformed scalar edge case is noted inline.

Want to dig deeper?

Paste this into your agent to explore the findings from this review's Buildkite build:

Download the buildsworth logs from build 20248, then answer my questions about the findings.

Install the reading-buildsworth-logs skill to run this.

About buildsworth

Model: gpt-5.6-sol with xhigh thinking.

How to request a review: Comment @buildsworth-bk review on the PR, or request buildsworth-bk as a reviewer.

Risk labels (how buildsworth classifies risk) — buildsworth classifies risk itself from the diff. Unless repository policy already allows L2 approval, grant it by mentioning @buildsworth-bk (see approval ceiling and L2 approval grant):

  • L1 — Low risk (dep bumps, docs/copy, lockfiles, small presentational fixes). buildsworth may approve by default.
  • L2 — Standard risk (new UI, additive API fields, refactors). Approved only when repository policy or a verified grant allows it; otherwise comment-only.
  • L3 — High risk (auth, migrations, payments, secrets, perf-critical paths). Human review always required.

}
return nil, locatedError(path, in.All.Pos, "permissions", "permission aliases are unsupported; declare each required permission explicitly")
access := strings.TrimSuffix(in.All.Value, "-all")
return nil, fmt.Errorf("%s:%d:%d: permissions: %s is unsupported as job-level shorthand. In job %q, declare each needed permission explicitly, such as contents: %s and pull-requests: %s. Move permissions: %s to the workflow top level only when that broader authority is intended for every job. If you need job-level permissions shorthand, open an issue in https://github.com/buildkite/buildkite-gha so we can prioritize support", path, in.All.Pos.Line, in.All.Pos.Col, in.All.Value, jobID, access, access, in.All.Value)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Non-blocking: actionlint sets in.All for every scalar, not only read-all and write-all. For example, top-level permissions: write now reaches this branch with an empty jobID, so the diagnostic calls it job-level shorthand for job "" and tells the user to move it to the top level. Limit this wording to the two recognized shorthands and retain a generic invalid-scalar diagnostic for other values.

@dannymidnight
dannymidnight marked this pull request as draft August 24, 2026 08:15
@dannymidnight
dannymidnight marked this pull request as ready for review August 24, 2026 23:55
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