Light, fluffy, and always free - The AWS Local Emulator alternative
ci: stop the compat jobs writing per-PR image caches (#2725)
Hector Ventura54dacfc56fa3
diff --git a/.github/workflows/compatibility.yml b/.github/workflows/compatibility.ymlindex 90c6fea874..494f633d77 100644--- a/.github/workflows/compatibility.yml+++ b/.github/workflows/compatibility.yml@@ -38,8 +38,12 @@ jobs:build-args: VERSION=latestload: truetags: floci-compat-shim-test+ # Read-only; warm-compat-caches.yml produces this scope on main. Unlike+ # floci-native above, these layers are worth caching: the image builds+ # FROM a published floci/floci tag and its cost is a microdnf install+ # that changes only when the Dockerfile does. Writing from here would+ # put a per-PR copy no other PR can read back into the budget.cache-from: type=gha,scope=compat-shim- cache-to: type=gha,scope=compat-shim,mode=max- name: Unflagged aws sqs call routes to AWS_ENDPOINT_URLrun: |@@ -133,8 +137,14 @@ jobs:file: docker/Dockerfile.native-packagetags: floci:test-nativeoutputs: type=docker,dest=/tmp/floci-native-image.tar- cache-from: type=gha,scope=floci-native- cache-to: type=gha,scope=floci-native,mode=max+ # No layer cache here, deliberately. The `COPY native/$TARGETARCH/`+ # below brings in a binary that changes every commit, and Docker layer+ # reuse is sequential, so nothing after it can ever be reused. Measured:+ # the build imported a cache manifest but reported **zero CACHED+ # layers** — it was write-only. `mode=max` still stored the whole image+ # including that volatile multi-hundred-MB binary layer, per PR ref,+ # which was the largest single consumer of the repo's 10 GB budget.+ # The step costs ~19-28s either way.- name: Compress native imagerun: gzip /tmp/floci-native-image.tardiff --git a/.github/workflows/warm-compat-caches.yml b/.github/workflows/warm-compat-caches.ymlindex e9af842ee7..f93b5aa64b 100644--- a/.github/workflows/warm-compat-caches.yml+++ b/.github/workflows/warm-compat-caches.yml@@ -34,6 +34,9 @@ on:# (go.sum is gitignored, so filtering on it would match nothing.) Only 8# commits in 90 days touch this directory, so watching all of it is cheap.- 'compatibility-tests/sdk-test-go/**'+ # compat-shim's inputs (see the `shim` job below)+ - 'docker/Dockerfile.compat'+ - 'bin/awslocal'# No *.tf entry: compat-terraform and compat-opentofu resolve nothing at# build time — `COPY . .` is their final layer, after the yum install and# bats clones — so .tf changes invalidate no cached work.@@ -93,3 +96,31 @@ jobs:# No `load:` — the image itself is discarded; only the cache is wanted.cache-from: type=gha,scope=${{ matrix.test }}cache-to: type=gha,scope=${{ matrix.test }},mode=max++ shim:+ name: warm / compat-shim+ # Produces the scope that compatibility.yml's compat-aws-cli-shim job reads.+ # Worth warming, unlike floci-native: this image builds FROM a published+ # floci/floci tag and its cost is a microdnf install of python3/pip/unzip that+ # changes only when the Dockerfile does — genuinely stable layers, with nothing+ # volatile above them.+ runs-on: ubuntu-24.04-arm+ timeout-minutes: 20++ steps:+ - name: Checkout repository+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1++ - uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0++ - name: Build and cache compat shim image+ uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0+ with:+ context: .+ file: docker/Dockerfile.compat+ # Must match the consumer's build-args, or the layers key differently+ # and the warm is silently useless (compatibility.yml:38).+ build-args: VERSION=latest+ # No `load:` — the image is discarded; only the cache is wanted.+ cache-from: type=gha,scope=compat-shim+ cache-to: type=gha,scope=compat-shim,mode=max