ci: split Lambda layer publish credentials by region - #633
Conversation
| role-to-assume: ${{ secrets.LAYER_PUBLISH_ROLE_ARN }} | ||
| role-session-name: otelLayerPublish | ||
| aws-region: us-east-1 | ||
| role-to-assume: ${{ secrets[matrix.publish_target.role_secret] }} |
| - name: Resolve publish targets | ||
| id: publish-targets | ||
| env: | ||
| LAYER_REGIONS: ${{ inputs.regions || vars.LAYER_PUBLISH_REGIONS }} |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| - name: Resolve publish targets | ||
| id: publish-targets | ||
| env: | ||
| LAYER_REGIONS: ${{ inputs.regions || vars.LAYER_PUBLISH_REGIONS }} |
There was a problem hiding this comment.
Codex AI review
[P1] Resolve the environment-scoped variable from an environment job
vars.LAYER_PUBLISH_REGIONS is now evaluated in build-distributions, which does not target the lambda-layer-publish environment. Environment-level variables are unavailable there, so release runs will see an empty value and silently select every credential group, potentially publishing to unintended Regions or failing on missing role secrets. Resolve targets in a job bound to that environment and pass its output to the matrix, or move the variable to repository/organization scope and update the documentation accordingly.
Codex AI reviewOne blocking workflow regression found. The static YAML tests do not cover GitHub environment-variable scoping. Reviewed commit |
Claude AI reviewNo blocking findings. This is a CI-only change that splits Lambda layer publishing into a credential-scoped matrix; it touches no SDK runtime code, so replay/determinism/serialization semantics are not affected. The new Residual operational risk (not a code defect): the removed Reviewed commit |
Summary
mainTesting
python -m pytest .github/scripts/tests/test_resolve_layer_publish_targets.py .github/scripts/tests/test_lambda_layer_publish_workflow.py .github/scripts/tests/test_build_lambda_layer.py .github/scripts/tests/test_parse_sdk_branch.py .github/scripts/tests/test_resolve_layer_sdk_version.py(18 passed)actionlint .github/workflows/lambda-layer-publish.yml .github/workflows/test-parser.yml