Skip to content

feat(api-gateway)!: Remove deprecated renewQuery parameter#11050

Merged
ovr merged 3 commits into
feat/release-v1.7.0from
feat/remove-renew-query
Jun 11, 2026
Merged

feat(api-gateway)!: Remove deprecated renewQuery parameter#11050
ovr merged 3 commits into
feat/release-v1.7.0from
feat/remove-renew-query

Conversation

@ovr

@ovr ovr commented Jun 10, 2026

Copy link
Copy Markdown
Member

BREAKING CHANGE: The renewQuery parameter of the /v1/load REST endpoint and the GraphQL cube query has been removed. Use the cache parameter instead: cache: 'must-revalidate' replaces renewQuery: true, and the default stale-if-slow replaces renewQuery: false.

BREAKING CHANGE: The `renewQuery` parameter of the `/v1/load` REST endpoint
and the GraphQL `cube` query has been removed. Use the `cache` parameter
instead: `cache: 'must-revalidate'` replaces `renewQuery: true`, and the
default `stale-if-slow` replaces `renewQuery: false`.
@ovr ovr requested review from a team and keydunov as code owners June 10, 2026 10:53
@github-actions github-actions Bot added client:core Issues relating to the JavaScript client SDK client:vue Issues relating to the Vue client SDK client:playground Issues relating to the Developer Playground javascript Pull requests that update Javascript code labels Jun 10, 2026
@claude

claude Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Claude finished @ovr's task in 1m 45s —— View job


Code Review: Remove deprecated renewQuery parameter

  • Read diff and check for completeness/consistency
  • Check for residual renewQuery references across packages and Rust
  • Validate semantic equivalence of cache-mode mapping
  • Review tests and docs
Verdict: LGTM with 1 medium + 1 nit — 0 high, 1 medium, 1 nit

The cleanup is thorough and internally consistent on the JS side. renewQuery: true → cacheMode: 'must-revalidate' is preserved everywhere (orchestrator, tests, CachePane). Doc removals are scoped correctly — the now-orphan [ref-schema-ref-preaggs-refreshkey*] link refs were only used inside the deleted sections, so removing them is right. normalizeQueryCacheMode simplification is sound: with renewQuery no longer in the Joi schema, the translation branch is unreachable. The query.cache = undefined clear at the tail of normalization is retained, which is correct (input cache → output cacheMode).

Medium — Rust NormalizedQuery still carries renew_query

rust/cube/cubeorchestrator/src/transport.rs:307 still defines:

#[serde(skip_serializing_if = "Option::is_none")]
pub renew_query: Option<bool>,

This is on the NormalizedQuery struct (line 287) — i.e. the post-normalization shape. After this PR, JS-side normalization strips renewQuery entirely (query.js no longer copies it onto cacheMode, and the Joi schema rejects it). The Rust field will therefore always be None. For consistency with a breaking-change release and to avoid future drift, remove the field plus the two renew_query: None, initializers in query_result_transform.rs:3494 and benches/transform.rs:129. Since the field has skip_serializing_if, removal is wire-compatible.

Nit — PR title scope is narrower than the change

Title is feat(api-gateway)!: but the diff also breaks the public API of @cubejs-client/vue3 (removes renewQuery from the slot scope in QueryBuilder.js) and @cubejs-client/core (removes renewQuery from Query type). Worth either broadening the scope or calling out the additional client-side breakage in the PR body — consumers reading the changelog by scope will miss it.

Other notes

  • packages/cubejs-playground/src/components/CachePane.tsx: replacing query={{ ...query, renewQuery: true }} with cache="must-revalidate" prop on QueryRenderer is correct — the prop has been wired through load() since before this PR (packages/cubejs-client-react/src/QueryRenderer.jsx:88,137).
  • Test renames (basicQueryWithRenew → still named "WithRenew" but now uses cacheMode) are accurate. Names could be updated to WithMustRevalidate for clarity, but not blocking.
  • packages/cubejs-api-gateway/src/types/request.ts RequestQuery type has a pre-existing precedence quirk (A | B & C parses as A | (B & C)) — not introduced here, just flagging.
• [`feat/remove-renew-query`](https://github.com/cube-js/cube/tree/feat/remove-renew-query)

@github-actions github-actions Bot added the rust Pull requests that update Rust code label Jun 10, 2026
@claude

claude Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Claude finished @ovr's task in 1m 29s —— View job


Re-review after latest push

  • Verify new commit 6d5646e addresses prior medium finding
  • Re-scan for residual renewQuery references
  • Validate doc consistency

Verdict: LGTM — 0 high, 0 medium, 1 low (missed doc row)

Details

Resolved since last review

  • Medium (resolved)6d5646e removes renew_query from NormalizedQuery plus the two initializers in query_result_transform.rs and benches/transform.rs. Matches what I flagged; Rust side is now consistent with JS normalization.

Low — one residual doc row in active docs

docs-mintlify/reference/javascript-sdk/reference/cubejs-client-core.mdx:941 still lists renewQuery? | boolean | in the Query type table. The TS Query type no longer has this field (packages/cubejs-client-core/src/types.ts), and the REST/GraphQL docs were updated — this row was missed. Worth deleting in this PR so the active Mintlify reference matches the type. The legacy /docs mirror (docs/content/product/apis-integrations/javascript-sdk/reference/cubejs-client-core.mdx:933) has the same stale row; deprecated per CLAUDE.md, optional to clean up.

Fix this →

Other notes (unchanged from prior review)

  • PR title scope (feat(api-gateway)!) is narrower than the actual breakage — also impacts @cubejs-client/core and @cubejs-client/vue3. Title or PR body could call out the client-side break for changelog readers.
  • QueryCache.renewQuery (orchestrator-internal method) is unrelated to the removed public API parameter — correctly left alone.

feat/remove-renew-query

@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 79.09%. Comparing base (e2d8258) to head (1a2d0e1).

Files with missing lines Patch % Lines
...-query-orchestrator/src/orchestrator/QueryCache.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                  @@
##           feat/release-v1.7.0   #11050   +/-   ##
====================================================
  Coverage                79.09%   79.09%           
====================================================
  Files                      470      470           
  Lines                    95766    95760    -6     
  Branches                  3500     3497    -3     
====================================================
- Hits                     75747    75744    -3     
+ Misses                   19504    19503    -1     
+ Partials                   515      513    -2     
Flag Coverage Δ
cube-backend 58.70% <50.00%> (+<0.01%) ⬆️
cubesql 83.54% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@claude

claude Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Claude Code is working…

I'll analyze this and get back to you.

View job run

@ovr

ovr commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

/bot-review

@claude

claude Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Claude finished @ovr's task in 36s —— View job


Re-review after latest push

Verdict: LGTM — 0 high, 0 medium, 0 low (all prior findings addressed)
  • Verified prior medium (renew_query in Rust NormalizedQuery) resolved by 6d5646e
  • Verified prior low (stale doc row in active Mintlify reference) resolved by 1a2d0e1
  • Final grep for residual renewQuery/renew_query across packages/, rust/, docs-mintlify/

What's in the latest range

  • 6d5646e removes renew_query from NormalizedQuery (rust/cube/cubeorchestrator/src/transport.rs:307 and the two renew_query: None initializers).
  • 1a2d0e1 deletes the orphan renewQuery? | boolean | row in docs-mintlify/reference/javascript-sdk/reference/cubejs-client-core.mdx.

Residual renewQuery mentions (all expected)

  • QueryCache.renewQuery(...) at packages/cubejs-query-orchestrator/src/orchestrator/QueryCache.ts:782 — orchestrator-internal method, unrelated to the removed REST/GraphQL parameter.
  • docs/content/product/apis-integrations/javascript-sdk/reference/cubejs-client-core.mdx:933 — legacy /docs site, deprecated per repo CLAUDE.md. Optional cleanup, not blocking.
  • Various CHANGELOG.md historical entries — correct to leave.

Non-blocking nit (carried from prior review)

  • PR title scope feat(api-gateway)!: is narrower than the actual surface area: the breaking change also affects @cubejs-client/core (Query type) and @cubejs-client/vue3 (QueryBuilder slot scope). Worth calling out in the PR body for changelog readers, but not a code issue.
• [`feat/remove-renew-query`](https://github.com/cube-js/cube/tree/feat/remove-renew-query)

@ovr ovr merged commit a9e1630 into feat/release-v1.7.0 Jun 11, 2026
87 of 88 checks passed
@ovr ovr deleted the feat/remove-renew-query branch June 11, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client:core Issues relating to the JavaScript client SDK client:playground Issues relating to the Developer Playground client:vue Issues relating to the Vue client SDK javascript Pull requests that update Javascript code rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants