navapbc / template-infra

A template to set up foundational infrastructure for your application in AWS
Apache License 2.0
10 stars 2 forks source link

Race condition when building the same app version for the same commit #606

Closed lorenyu closed 4 months ago

lorenyu commented 4 months ago

There's a race condition that causes the build process to fail occasionally since two jobs can both check to see if a particular commit tag was already built and published, and both decide to start building that commit if it hasn't been published yet. But that means one of them will fail when trying to publish. For example see this failed deploy: https://github.com/navapbc/platform-test/actions/runs/9195364424/attempts/1 which succeeded on a retry.

Prioritization notes

High priority since it should be a small fix and is currently causing noise and longer term will lead platform devs to start to ignore notifications

Design/implementation notes

Add the commit hash into the concurrency control for the build and publish workflow