fix(ci): provide PD auth secret to the compose precheck - #31
Conversation
apache/hugegraph#3189 made docker-compose-hstore.yml require HG_PD_AUTH_SECRET_KEY during interpolation, and Hubble in that topology now bind-mounts a generated, gitignored conf/hubble/hstore.local.properties with create_host_path: false. The strict-mode precheck set neither, so compose up failed at interpolation and so did the always() compose down. Generate a masked hex secret next to the admin password, export it through GITHUB_ENV so the log dump and teardown steps interpolate too, and run the upstream set-hubble-pd-password.sh when the source ships it. Older source revisions are unaffected.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. Walkthrough工作流现在为 HStore 拓扑生成并导出 PD 密钥,并在 ChangesHStore 发布流程
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The CI precheck now prepares the PD authentication secret and HStore password file before Compose starts, while retaining compatibility with source revisions that lack the helper. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
Problem
The scheduled
latestpublish has failed onmastertwo nights running, at Start compose stack with local images:Stop compose stack fails right after with the same message, because
docker compose downinterpolates the same files. That one is a follow-on failure: the stack never started.apache/hugegraph#3189 (
60c8803, merged 2026-09-09 14:09 UTC) put the PD REST API behind HTTP Basic auth and changeddocker/docker-compose-hstore.ymlin two ways that matter here:pdandserverread${HG_PD_AUTH_SECRET_KEY:?...}, so compose refuses to render the file without it.hubblenow bind-mountsconf/hubble/hstore.local.propertieswithcreate_host_path: false. That file is gitignored.docker/set-hubble-pd-password.shgenerates it and writes the secret in asoperations.pd.password.The precheck does neither. Setting only the variable is not enough. Against
60c8803, with the secret exported and no generated file, creating the Hubble container fails:Fix
Both changes are in Start compose stack with local images:
GITHUB_ENV. The log dump and teardown steps run their own compose commands, so they need it as well. Hex also meets the printable ASCII requirement inset-hubble-pd-password.sh.docker/set-hubble-pd-password.sh hstorewhen the HStore topology is in use and the source ships the script.Source revisions from before apache/hugegraph#3189 ignore the extra variable and have no script, so release builds of older tags take the same path as before.
Impact
Scheduled
latestpublish onmastersince the upstream change:The last green scheduled run on
masterwas 2026-09-09 01:09 UTC (run 34298003705), about 13 hours before apache/hugegraph#3189 merged. Neither failed run pushed images.Verification
actionlint1.7.12, with its bundled shellcheck, passes on the changed workflow.docker/directory of apache/hugegraph@60c8803. I extracted the Start and Stoprun:blocks from this branch and ran them withbash --noprofile --norc -eo pipefail. Building the images was out of scope, so the finalup -d --waitwas narrowed toup --no-deps --no-start hubble.HG_PD_AUTH_SECRET_KEYtoGITHUB_ENV, and generatedhstore.local.propertieswith a matchingoperations.pd.password. The Hubble container was created with that file mounted.GITHUB_ENV, exited 0 and left no containers, networks or volumes behind.60c8803, which is where PD checks the secret sent by the Server'swait-storage.shand by Hubble. Aworkflow_dispatchrun of this change withpublishoff, like thecx-pr-30-e2erun for fix(ci): base compose stack on hstore topology #30, would cover it.Summary by CodeRabbit