From 3122c4aa99c974b29d665daae718369346e69b71 Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Wed, 18 Nov 2026 12:25:09 +0000 Subject: [PATCH] ci: restore the restate image from the WarpBuild cache Add an optional `restateImageCacheKey` input to the integration workflow. When restate's CI passes it, restate.tar is restored from the WarpBuild cache instead of being downloaded as an artifact. The artifact download stays as the fallback when the key is empty or the restore misses. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/actions.lock | 6 ++++++ .github/workflows/integration.yaml | 18 +++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock index cb8f49ef..83547238 100644 --- a/.github/workflows/actions.lock +++ b/.github/workflows/actions.lock @@ -20,6 +20,7 @@ workflows: - 'docker/setup-docker-action@v4.7.0' - 'docker/setup-qemu-action@v3.7.0' - 'restatedev/e2e@v2.3' + - 'warpbuilds/cache@v1.4.13' '.github/workflows/pullfrog.yml': - 'actions/checkout@v6.1.0' - 'astral-sh/setup-uv@v5.4.2' @@ -175,3 +176,8 @@ dependencies: - 'actions/setup-java@v4' - 'actions/upload-artifact@v4' - 'enricomi/publish-unit-test-result-action@v2' + 'warpbuilds/cache@v1.4.13': + ref: 'v1.4.13' + commit: 'sha1-40f3443ae7b70e568d6e2070ea897f3df94d7553' + owner_id: 142974432 + repo_id: 721583430 diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml index a2d2807c..1513fbae 100644 --- a/.github/workflows/integration.yaml +++ b/.github/workflows/integration.yaml @@ -31,6 +31,11 @@ on: required: false default: "" type: string + restateImageCacheKey: + description: "WarpBuild cache key of restate.tar, saved by the calling restate workflow. Restored instead of downloading the artifact, which stays the fallback; used together with restateCommit" + required: false + default: "" + type: string restateImage: description: "restate image, superseded by restate commit" required: false @@ -85,12 +90,23 @@ jobs: } } + # The calling restate workflow also saves restate.tar to the WarpBuild cache. Restoring it + # is much faster than the artifact download below, which stays the fallback. `path` must + # match the save in restate's docker.yml, because it is part of the cache version. + - name: Restore restate snapshot from the WarpBuild cache + id: restate-image-cache + if: ${{ inputs.restateCommit != '' && inputs.restateImageCacheKey != '' && github.event_name != 'workflow_dispatch' }} + uses: WarpBuilds/cache/restore@v1.4.13 + with: + path: restate.tar + key: ${{ inputs.restateImageCacheKey }} + ### Download the Restate container image, if needed # Setup restate snapshot if necessary # Due to https://github.com/actions/upload-artifact/issues/53 # We must use download-artifact to get artifacts created during *this* workflow run, ie by workflow call - name: Download restate snapshot from in-progress workflow - if: ${{ inputs.restateCommit != '' && github.event_name != 'workflow_dispatch' }} + if: ${{ inputs.restateCommit != '' && github.event_name != 'workflow_dispatch' && steps.restate-image-cache.outputs.cache-hit != 'true' }} uses: actions/download-artifact@v8.0.2 with: name: restate.tar