Uh oh!
There was an error while loading. Please reload this page.
fix(ci): check out the repo in the lambda deploy job - #312
Merged
Conversation
The deploy job's `Thread step (live)` uses ./.github/actions/slack-deploy, but the job never ran actions/checkout, so the action was not on disk: Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under '/home/runner/work/branch/branch/.github/actions/slack-deploy'. Did you forget to run actions/checkout before running your local action? Every Lambda Deploy that actually shipped a lambda has failed on that step since threaded notifications landed (#270) — the aws update-function-code call succeeded first, so the code deployed and only the notification failed. The one green run in that window was a migrations-only dispatch, where deploy is skipped. It is the only job in the repo that used the local action without checking out; prep, migrate, notify, frontend-deploy and terraform-apply all do. Checkout goes first because it cleans the workspace and would otherwise wipe the downloaded lambda.zip. Also make finalize honour job-level results. It decided pass/fail purely from the lambda-result-* .meta files, which record the aws-cli step's outcome, so a job that died after writing its .meta still finalized as a green deploy — which is why Slack reported the run complete while GitHub showed it red. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
nourshoreibah
marked this pull request as ready for review
August 12, 2026 01:52
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Fixes the
Lambda Deployfailure onfeat(roles): project roles are Admin, Director, Student (#311)(run 31554276329).What actually happened
The lambdas deployed fine.
Deploy lambdawas ✓ on all three of projects / expenditures / donors andmigratewas ✓ — the roles change is live in production. The job died on the step after the deploy:The
deployjob'sThread step (live)uses the local composite action./.github/actions/slack-deploy, but the job never ranactions/checkout, so the action wasn't on disk. It is the only job in the repo that used the local action without checking out —prep,migrate,notify,frontend-deployand all fourterraform-applyjobs already do.Not a regression from #311
Every
Lambda Deployonmainthat actually shipped a lambda has failed this way since threaded notifications landed (#270):Deploy lambda✓,Thread step (live)✗, Notify ✓Deploy lambda✓,Thread step (live)✗, Notify ✓migrations_only, sodeploywas skippedThe only green run in that window is the one where the
deployjob never ran. That's the tell.Why Slack said "complete" while GitHub went red
Separate bug, and the reason there was no failure notification.
finalizedecided pass/fail purely from thelambda-result-*/*.metafiles, and those recordsteps.deploy.outcome— the aws-cli call, which succeeded. A job that dies after writing its.metastill finalized green. The Slack thread also stopped updating aftermigrate, because the per-lambda live steps are posted by the step that couldn't load.So
finalizegains aforce-failureinput, andnotifypasses it the actual job results.Changes
lambda-deploy.yml—actions/checkout@v4as the first step ofdeploy. First, not last: checkout cleans the workspace and would wipe the downloadedlambda.zip.slack-deploy/action.yml— new optionalforce-failureinput (default'false'), seedinganyFailin finalize mode.lambda-deploy.yml—notifypassesforce-failure: ${{ needs.migrate.result == 'failure' || needs.deploy.result == 'failure' }}.Verification
actionlint(via Docker) — no findings on either changed file. The one repo-wide non-shellcheck finding is pre-existing, inregenerate-db-types.yaml.node --check.deploystep order confirmed:checkout→ compute name → download artifact → creds → deploy..metafiles:.metacontentsforce-failuresuccess(the shape of run 31554276329)truesuccessfalsedonors|failurefalsedonors|failuretrueNote for the reviewer
Merging this won't exercise the fix —
Lambda Deploy'spathsfilter isapps/backend/lambdas/**,shared/types/**,apps/backend/db/migrations/**, and this PR only touches.github/**. It gets validated on the next lambda merge, or by running the workflow manually withmigrations_only: false.terraform-apply'snotifyhas the same latent.meta-only blind spot, but it isn't broken today (all its jobs check out), so I left it alone.🤖 Generated with Claude Code