EFF-474: Purge imgix after uploading graphics - #541
Merged
Conversation
tashian
force-pushed
the
carl/graphics-imgix-purge
branch
2 times, most recently
from
July 27, 2026 19:01
550a192 to
6b44e9c
Compare
tashian
enabled auto-merge
July 27, 2026 19:05
Updated graphics have not been reaching readers. The workflow uploaded them to S3 correctly, but the site serves graphics through imgix, which caches origin objects for 30 days and does not notice that an object was replaced under the same key. Without a purge the upload is invisible — PR #539's updated entra-id-mappings.png is still serving the old bytes right now. Adds a purge step driven from the same git diff as the upload, so the two lists cannot drift. Verification compares imgix's Last-Modified against the S3 object's timestamp rather than byte size, because imgix rewrites SVGs on serve and a correctly purged SVG never matches its origin byte-for-byte. Also replaces the archived-or-stale third-party S3 action with the AWS CLI and GitHub OIDC. Uploads are now limited to changed files instead of all 128 every run, and the role can only write under graphics/ — the bucket is shared with the Strapi CMS. Clears the Node 20 deprecation warnings. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
tashian
force-pushed
the
carl/graphics-imgix-purge
branch
from
July 27, 2026 19:07
6b44e9c to
71f2e85
Compare
dopey
approved these changes
Jul 27, 2026
This was referenced Jul 27, 2026
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 free
to 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.
The bug
Graphics changes have not been reaching readers, which is why uploading them by hand in the AWS console became a habit.
The site serves graphics through imgix (
smallstep.imgix.net), backed by the CMS images S3 bucket. imgix caches origin objects and does not notice when an object is replaced under the same key — its own docs say to change storage first, then purge. The source is configuredRespect originwith a 30-day default TTL, and nothing set aCache-Controlheader, so every graphic falls through to 30 days. No imgix purge has ever run.The fix
A purge step, driven from the same git diff as the upload so the two lists cannot drift.
Verification compares imgix's
Last-Modifiedagainst the S3 object's own timestamp, not byte size. imgix rewrites SVGs on serve — strips the Illustrator generator comment, rewrites the encoding declaration, reorders attributes — so a correctly purged SVG never matches its origin byte-for-byte. A size check would have warned on all 42 SVGs forever.Purge returns 200 for "received", not "completed", and imgix guarantees no completion time, so verification is advisory (
continue-on-error) and retries in rounds — total wait stays ~50s whether one graphic changed or all 128 did.Also modernized
The old third-party S3 action is archived-or-stale across the board (
jakejarvis/s3-sync-actionis archived;shallwefootball/upload-s3-actionlast saw a commit in June 2024 and is the source of the Node 20 deprecation warnings). AWS publishes no S3 action — the documented pattern isconfigure-aws-credentialsplus the CLI, which is what this does.graphics/*— this bucket is shared with the Strapi CMSs3:DeleteObject: the bucket has no versioning, so deletes are unrecoverable, and the upside was pruning a few unreferenced objectsworkflow_dispatchwithdry_runandfull_syncinputsAlready provisioned
smallstep-docs-assets-uploader, trust pinned torepo:smallstep/docs:ref:refs/heads/mainAWS_ASSETS_ROLE_ARN,AWS_REGION,AWS_ASSETS_BUCKETIMGIX_API_KEYAfter merge
This PR touches no graphics, so it will not trigger itself. Run
workflow_dispatchwithdry_runfirst, thenfull_synconce to clear the backlog, then confirmentra-id-mappings.pnggoes live.Retiring the two 2023 access keys stays for a follow-up, once this is verified green.
Testing
github.event.before) — each yields exactlygraphics/entra-id-mappings.pngshellcheckclean on all four run blocks; YAML parsesentra-id-mappings.pngand correctly passesautocert-arch.png🤖 Generated with Claude Code