Skip to content

Report cache build status before stopping docker - #469

Merged
michaelxiao7 merged 2 commits into
masterfrom
aws-cache-status-tag
Aug 27, 2026
Merged

Report cache build status before stopping docker#469
michaelxiao7 merged 2 commits into
masterfrom
aws-cache-status-tag

Conversation

@michaelxiao7

Copy link
Copy Markdown
Contributor

The cache build reports its final status by calling set_metadata, which on GCP is a curl to the metadata server but on AWS tags the EC2 instance by running the AWS CLI in a container, so it cannot run after this script has masked and stopped the docker daemon.

Move the status write ahead of the docker stop so the AWS cache builder can tell a finished build from one that died, since it reads that status once the instance has powered itself off.

This changes nothing on GCP, where the call never depended on docker.

PHP-151845

@michaelxiao7
michaelxiao7 marked this pull request as ready for review August 27, 2026 14:06
@michaelxiao7
michaelxiao7 requested review from a team as code owners August 27, 2026 14:06
@michaelxiao7 michaelxiao7 self-assigned this Aug 27, 2026

@pantherman594 pantherman594 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm we're in a weird situation here. We want to clean up unnecessary files before saving the cache image, which we need to stop docker to do. But we need docker to write to the metadata. I think it should be fine since the signal to the cache builder is the instance shutting down, not the metadata getting set

@michaelxiao7
michaelxiao7 merged commit 637be23 into master Aug 27, 2026
15 of 17 checks passed
@michaelxiao7
michaelxiao7 deleted the aws-cache-status-tag branch August 27, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants