Repository navigation
fix(pool): provenance tagging + private-ECR pull grants for pool workers (#1148) - #1201
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
The pooled job script uploads outputs with spored provenance upload, as task run does, but the worker policy lacked s3:PutObjectTagging and s3:PutObjectAnnotation, so pooled outputs landed untagged. Grant them on every bucket a worker writes, from the same action list task run uses. pool create gains --container; a private-ECR image adds ecr:ReadOnly, decided by the same helper as task run. Fixes #1148
scttfrdmn
force-pushed
the
fix/1148-pool-grants
branch
from
October 20, 2026 01:28
4feee9f to
3439b9f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pool workers now get the provenance tagging actions
spawn task rungrants, plus an ECR pull grant when the pool's tasks run a private-ECR image.Fixes #1148
What changed
taskproto.GeneratePooledJobScript) runsspored provenance uploadfor outputs, astask rundoes; that step is not gated onsignalComplete. The worker policy granted onlys3:PutObject, so uploads fell back to untaggedaws s3 cp.poolWorkerPolicynow grants the provenance actions on the results bucket and on every--s3-writebucket. Read-only buckets do not get them. The list is now one var,provenanceWriteActions, shared bytaskStagingPolicyForand the pool.pool create, so the pool cannot read the image from a spec.pool create --container IMAGE(repeatable) declares the images instead.ecrPullPoliciesis the oldtaskExtraPolicieslogic generalised to several images, withtaskExtraPoliciesnow delegating to it. It addsecr:ReadOnlywhen any declared image is private ECR. The role request is built by a new pure function,poolWorkerRoleConfig.Gates (each watched failing against a revert that compiles)
TestPoolWorkerPolicyGrantsTaskRunsProvenanceActions: discovers the provenance actions astaskStagingPolicyFor(provenance=true)minus(false), fails if it finds none, then requires each on the results bucket and the write bucket but not the read bucket--s3-writestatements3:PutObjectRetentionto task run's provenance statement onlyTestPoolECRGrantMatchesTaskRun: pool grant ifftaskExtraPoliciesgrants, over a corpus of private-ECR, public ECR, Docker Hub, bare and ghcr images (asserts both sides are exercised), plus the mixed and none casesPolicies:frompoolWorkerRoleConfigTestPoolContainerFlagReachesTheRoleMerge note
Rebased onto main after #1192, #1198 and #1200 merged.
poolWorkerRoleConfigkeeps #1198's per-poolRoleName/Tagsand adds this PR'scontainersparameter andPolicies. #1198's concurrent-grants gate still passes, and still fails with the shared role name restored.Checks
make check: all steps passed exceptcheck-build-tags, which fails on the/private/tmpworktree path (known on main).make check-docs: clean.semgrep --config=auto --error: clean.Not verified
Not run on AWS. nf-spawn, which creates pools for its users, will need to pass
--containerfor private-ECR processes. That is a separate change in nf-spawn.