int128 / int128/deploy-lambda-action

Unreliable deployment

Open
#679 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
5
Forks
5
Avg merge
21m
Merged PRs (30d)
43

Description

This action releases a code version and immediately updates an alias to point to that version. This is never the desired outcome: new version takes some time to become available. This can result in failures similar to this one.

AWS CLI supports checks to facilitate preventing such premature deployments: lambda wait function-updated-v2 and lambda wait function-active-v2. This should be also doable via JS SDK.

Here's an AWS CLI version that prevents deploying unavailable functions:

set -euo pipefail
version=$(
    aws lambda update-function-code --publish \
    --function-name "$function" \
    --image-uri "$image" \
    | jq -r '.Version'
)
aws lambda wait function-updated-v2 --function-name "$function"
aws lambda wait function-active-v2 --function-name "$function"
aws lambda update-alias \
    --name "$alias_name" \
    --function-name "$function" \
    --function-version "$version"

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the action's deployment entry point and trace the update-function-code and alias-update sequence. Compare the AWS CLI waiters named in the issue with the JavaScript SDK flow, then verify that aliases are updated only after the function is updated and active. Done means deployments no longer point the alias at an unavailable version.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, github-actions, typescript
Domain
ci-cd, cloud, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.