-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: use correct IAM role for TF apply #694
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,35 +51,15 @@ jobs: | |
with: | ||
is-tagged: ${{ !startsWith(github.head_ref, 'release-please--') }} # If not the release PR branch, assume it is a revert PR | ||
|
||
detect-lambda-changes: | ||
needs: get-version | ||
runs-on: ubuntu-latest | ||
env: | ||
VERSION: ${{ needs.get-version.outputs.version }} | ||
outputs: | ||
lambda-to-rebuild: ${{ steps.filter.outputs.changes }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
with: | ||
ref: ${{ env.VERSION }} | ||
|
||
- name: Filter | ||
id: filter | ||
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | ||
with: | ||
filters: .github/lambda-filter.yml | ||
|
||
test-lambda-code: | ||
needs: [get-version, detect-lambda-changes] | ||
if: needs.detect-lambda-changes.outputs.lambda-to-rebuild != '[]' | ||
needs: get-version | ||
runs-on: ubuntu-latest | ||
env: | ||
VERSION: ${{ needs.get-version.outputs.version }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
image: ${{ fromJSON(needs.detect-lambda-changes.outputs.lambda-to-rebuild) }} | ||
image: [audit-logs, audit-logs-archiver, cognito-email-sender, cognito-pre-sign-up, form-archiver, nagware, notify-slack, reliability, reliability-dlq-consumer, response-archiver, submission, vault-integrity] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've seen this before. Was it done for staging but not for production? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, it was done for the TF apply prod workflow because of the same bug. It's on our list to generate this list dynamically rather than hardcoding it in both workflows. |
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
|
@@ -93,15 +73,14 @@ jobs: | |
lambda-name: ${{ matrix.image }} | ||
|
||
build-lambda-images: | ||
needs: [get-version, detect-lambda-changes] | ||
if: needs.detect-lambda-changes.outputs.lambda-to-rebuild != '[]' | ||
needs: get-version | ||
runs-on: ubuntu-latest | ||
env: | ||
VERSION: ${{ needs.get-version.outputs.version }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
image: ${{ fromJSON(needs.detect-lambda-changes.outputs.lambda-to-rebuild) }} | ||
image: [audit-logs, audit-logs-archiver, cognito-email-sender, cognito-pre-sign-up, form-archiver, nagware, notify-slack, reliability, reliability-dlq-consumer, response-archiver, submission, vault-integrity] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, what is going to happen to the
-release
role? Will it still be used somewhere? How come we did not have a similar issue in staging?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once the
3.10.1
release goes in, I'll get a fix in to remove the-release
role since we won't need it anymore. We didn't have this problem in Staging because its TF apply workflow has always executed on pushes todevelop
, which is what the default SRE OIDC-apply
roles are setup to work with.We needed the
-release
role for Prod because it used to execute against a tag reference. However, with the latest workflow change to support easier revert PRs, it now executes againstdevelop
as well.