Repository navigation
Decode warm-pool config hashes as stored instead of forcing sha256 - #896
Merged
kumarpallav-pplx merged 1 commit intoOct 23, 2026
Merged
Conversation
The warm-pool config reads rewrote every release hash without a `sha256:` prefix into `sha256:<hash>`. Template-manager now registers BLAKE3 identities by default, so a `blake3:<hex>` release became `sha256:blake3:<hex>` and failed to parse. Because the rows are collected into one Result, a single BLAKE3 release on any pool config failed the whole reconcile pass: no refill, promotion, or cleanup for any template. Select `template_releases.hash` as stored and let `ContentHash::from_str` decode it; it already accepts bare sha256, `sha256:`, and `blake3:` forms. Covers enabled, reconcilable, recently-disabled, and autoscaler-retirement config reads.
kumarpallav-pplx
marked this pull request as ready for review
October 23, 2026 04:05
nikhilbirmiwal-pplx
approved these changes
Oct 23, 2026
kumarpallav-pplx
enabled auto-merge
October 23, 2026 04:09
kumarpallav-pplx
deleted the
kumarpallav-pplx/warm-pool-blake3-content-hash
branch
October 23, 2026 04:20
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.
Problem
The warm-pool config reads in
crates/libs/cluster/pool/src/store.rsnormalized the release hash in SQL:Template-manager now registers BLAKE3 template identities by default, so a
blake3:<hex>release is rewritten tosha256:blake3:<hex>. That fails to parse as aContentHash(digest for sha256 must have 64 lowercase hex chars, got 71). The rows are collected into oneResult, so a single BLAKE3 release on any pool config fails the whole warm-pool reconcile pass. No template gets refill, promotion, or cleanup, and pools for BLAKE3 releases never get slots.Fix
Select
template_releases.hashas stored and letContentHash::from_strdecode it. It already accepts bare sha256 hex,sha256:-prefixed, andblake3:-prefixed values, so bare legacy rows keep working. The change applies to the four config reads that shared the rewrite:enabled_configsreconcilable_configsrecently_disabled_configsdelete_empty_disabled_autoscale_configs, reached throughautoscale_configs, the first read of each passobserved_demandkeeps its bare/prefixed matching. Its first arm,r.hash = s.content_hash, already matches BLAKE3 hashes exactly.Tests
config_reads_decode_blake3_release_hashesseeds a pool config on ablake3:release and asserts that all four reads decode it unchanged.Error: ContentHash(InvalidHexLength { algorithm: Sha256, expected: 64, actual: 71 }), the same error the controller logs.cargo test -p pplx-space-cluster-pool --lib: 68 passed, including the existing bare and prefixed sha256 hash tests.cargo test -p pplx-space-cluster-controller-server --lib warm_pool: 69 passed.cargo fmt --all -- --checkandcargo clippy -p pplx-space-cluster-pool -p pplx-space-cluster-controller-server --locked --all-features --all-targets -- -D warningsare clean.Rollout note
Clusters that have already registered BLAKE3 releases on pool configs recover on the first reconcile pass after the cluster-controller picks this up. No data change is needed.