Skip to content

fix(deploy): [INFRA-670] drop actions: write that breaks every artifacts-cicd consumer - #287

Merged
arrowplum merged 10 commits into
mainfrom
fix/INFRA-670-artifacts-cicd-actions-permission
Aug 7, 2026
Merged

fix(deploy): [INFRA-670] drop actions: write that breaks every artifacts-cicd consumer#287
arrowplum merged 10 commits into
mainfrom
fix/INFRA-670-artifacts-cicd-actions-permission

Conversation

@arrowplum

@arrowplum arrowplum commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Since v4.0.0, every workflow that calls reusable_artifacts-cicd fails as an invalid workflow before a single job starts:

The nested job 'deploy' is requesting 'actions: write', but is only allowed 'actions: none'.

artifacts-cicd grants its children {contents: read, id-token: write}. b4cb401 (#251) added actions: write to the deploy job and actions: read to create-release-bundle, and a nested job cannot request more than its caller holds. Neither is used: both jobs only move artifacts within the current run.

INFRA-670

Changes

  • reusable_deploy-artifacts.yaml: drop actions: write. reusable_create-release-bundle.yaml: drop actions: read.
  • check_reusable_workflow_permissions.sh and its bats test, which required both. The guardrail was asserting the bug.
  • test_composable-minimal-permissions.yaml: drop the NuGet fixtures so it runs without SSL.com secrets.
  • Six docs that instructed callers to grant the scopes, plus the unused grants in two examples and the integration test.

Why this didn't cause a failure that was caught?

A workflow that fails validation produces no check runs, so the pull request reports green:

PR merged checks reported workflows that never started
#251 2026-06-08 24 success 4
#276 2026-07-20 34 success 4, including the test it added as proof
#281, cut v4.0.0 2026-07-24 34 success 3

main is protected by rulesets covering review and force-push, but none of them contains a required_status_checks rule, so a workflow that never reported blocked nothing.

Two tests would have caught this on the day it landed. test_artifacts-cicd.yaml grants exactly what a consumer grants, and it startup-failed on every branch from 2026-06-08 until this PR. test_composable-minimal-permissions.yaml, added by #276 as evidence that the permissions were correct, has never passed once: the ceiling stopped it from starting, and behind that it was missing the SSL.com secrets its NuGet fixtures demand.

The docs drifted the same way. Six files told consumers to grant actions: write and actions: read, and create-release-bundle/README.md documented a caller workaround that was never true, since a job requests its permissions unconditionally and validation never reads input values.

Unblocks the aerospike-graph-service onboarding (INFRA-669), pinned to v3.7.0 until this ships.

Related

  • #288 (INFRA-673) guards the flat-JAR sibling-POM path added here. Stacked on this branch.

  • 87 tests across three bats files cannot fail: their setup() runs set +eu; trap - ERR, which is how bats detects a failed assertion, so every bare [[ ]] is inert. Needs its own ticket.

alexs-aero
alexs-aero previously approved these changes Aug 6, 2026

@alexs-aero alexs-aero 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.

lgtm

- The permissions no longer exist, so the files have no subject for the rationale.
- Why they were removed lives in 0d5d81a, 33521dc and INFRA-670, not in the source.
- Canary comment trimmed to the live constraint: nupkg fixtures demand SSL.com secrets.
…sted

- Six docs still required actions: write/read for the metadata handoff; both transfers are same-run.
- Troubleshooting now says to move off the affected refs instead of granting the permission.
- Drops the unused actions: write from the two examples and the integration test.
- A POM inheriting fields from <parent> resolved empty and clobbered good values.
- Adds a regression test; it fails without the guard.
- The test sets -e locally because setup() disables errexit, making bare assertions inert.
- Explaining an absent requirement adds a concept to hold without changing what to do.
- Drops the validation-error troubleshooting entries; that error cannot occur at this ref.
- Keeps this PR to the permission fix; the guard patches an unrelated flat-JAR change.
- Guard and its tests continue on fix/INFRA-673-jar-metadata-inherited-pom.

@alexs-aero alexs-aero 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.

lgtm

@arrowplum

Copy link
Copy Markdown
Contributor Author

step security warning false positive (mirror is valid) merging.

@arrowplum
arrowplum merged commit a0b1fe5 into main Aug 7, 2026
62 of 63 checks passed
@arrowplum
arrowplum deleted the fix/INFRA-670-artifacts-cicd-actions-permission branch August 7, 2026 16:50
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