perf(images): persist multi-platform build caches#21
Conversation
- add an optional registry cache backend to the reusable image workflow - share the Hubble build cache across latest and release publishes - preserve the existing GHA cache path for all other components - expose image, platform, and cache parameters in the workflow summary
- update the reusable image workflow to actions/checkout v7 - use the latest stable major for every shared workflow consumer - keep the Docker action chain on its current stable major aliases
- use a dedicated registry cache tag for latest builds - use a separate registry cache tag for release builds - prevent release cache exports from replacing the master cache index
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
Walkthrough本次变更为可复用镜像发布工作流增加 registry 构建缓存支持,保留 GHA 缓存回退逻辑,并将构建步骤统一改用解析后的缓存输出;Hubble latest 与 release 工作流分别配置缓存镜像。 Changes镜像构建缓存
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR updates the shared image publishing workflow to optionally use a durable Docker registry-backed BuildKit cache (instead of the default GitHub Actions cache), and applies that option specifically to the Hubble latest/release workflows with separate cache references to avoid cache-manifest contention. It also upgrades the shared checkout step to actions/checkout@v7.
Changes:
- Add optional registry cache support (
type=registry) to_publish_image_reusable.yml, while keeping the GHA cache as the default fallback. - Configure Hubble latest/release wrappers to use distinct
registry_cache_imagetags for isolated caches. - Emit cache backend/reference details into the job step summary and bump
actions/checkoutto v7 in the reusable workflow.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/publish_release_hubble_image.yml | Adds a dedicated release cache ref (hugegraph/hubble:buildcache-release) to enable durable registry caching for Hubble release builds. |
| .github/workflows/publish_latest_hubble_image.yml | Adds a dedicated latest cache ref (hugegraph/hubble:buildcache-latest) to enable durable registry caching for Hubble scheduled/latest builds. |
| .github/workflows/_publish_image_reusable.yml | Introduces cache backend selection (registry vs GHA), outputs cache parameters, writes a build-parameter summary, and upgrades checkout to v7. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- keep registry cache selection optional for shared callers - preserve GHA cache fallback when the matrix key is absent - make the reusable workflow contract explicit
- move PD, Store, and Server caches to Docker Hub registry - seed durable caches during strict integration prechecks - isolate caches by image and publish channel - share BUILDPLATFORM cache with read-only arm64 jobs - upgrade checkout steps and expose cache strategy
Summary
Why
Hubble caches had been evicted before the next real publish, while PD/Store/Server arm64 builds commonly spend 40–90 minutes running Maven under QEMU. Registry caches survive long gaps and allow the native BUILDPLATFORM build stage from apache/hugegraph#3092 to be reused by the arm64 runtime image jobs.
Companion Dockerfile change: apache/hugegraph#3092.
Hubble Dockerfile change: apache/hugegraph-toolchain#740.
Cache topology
Verification
The first publish creates cold registry caches. A subsequent publish should be used to measure hot-cache hit rate and arm64 duration. Real arm64 runtime health validation remains required for apache/hugegraph#3092.