fix(gorilla-s3): align prefix-template placeholder vocabulary with agent - #92
Merged
Merged
Conversation
Pre-v7 the backend's `bucket_prefix` accepted only the long-form
`{year}`/`{month}`/`{day}`/`{hour}` placeholders, but the agent-side
`gorillas3processor` (and the v6 demo deploy's
`ASAP_GORILLA_S3_PREFIX_TEMPLATE`) writes objects under the
short-form `{YYYY}`/`{MM}`/`{DD}`/`{HH}` spelling. So when a
deploy used the short-form template, `{tenant}` and `{metric}`
substituted but the timestamp placeholders stayed literal — every
backend `index.json` fetch issued a path like
`default/<metric>/{YYYY}/{MM}/{DD}/{HH}/index.json` that missed the
real chunks on disk.
Issue #46 criterion ⑥ (freshness probes) surfaced as 0 samples on
every path because of this — the chunks were on MinIO, the routing
table directed the query through the Gorilla engine, but the cold
store could not find them. v7 dual-routing closed the routing-side
gap; this aligns the placeholder vocabulary so the chunks are
actually located.
The fix accepts BOTH spellings; existing deploys using the long-form
keep working unchanged.
3 new tests: long-form preserved, agent-side aliases work,
mixed-form works.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 7, 2026
Closed
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.
Summary
Pre-v7 the backend's
bucket_prefixaccepted only{year}/{month}/{day}/{hour}placeholders, but the agent-sidegorillas3processor(and the v6 demo'sASAP_GORILLA_S3_PREFIX_TEMPLATE) writes objects under the short-form{YYYY}/{MM}/{DD}/{HH}spelling. Result: when a deploy used the short-form template, the backend substituted{tenant}and{metric}but left the timestamp placeholders literal, so everyindex.jsonfetch issued a literal{YYYY}/{MM}/{DD}/{HH}path that missed the chunks on disk.Why this matters
Issue #46 criterion ⑥ (freshness probes) surfaced as 0 samples on every path during the v7 demo even though:
last_over_time(http_freshness_probe_*[10s])to the Gorilla engine.LastOverTimeplanner accepted the query.default/http_freshness_probe_archive/2026/05/07/04/part-*.gor.default/http_freshness_probe_archive/{YYYY}/{MM}/{DD}/{HH}/index.json— a literal path containing the placeholder text.This PR aligns the placeholder vocabulary so the chunks are actually located. Backwards-compatible: long-form names still work; short-form aliases just resolve to the same value.
Test plan
bucket_prefix_supports_long_form_placeholders,bucket_prefix_supports_agent_side_yyyy_mm_dd_hh_placeholders,bucket_prefix_handles_mixed_long_and_short_placeholderscargo test -p query_engine_rust --lib bucket_prefix— 3/3 pass🤖 Generated with Claude Code