Skip to content

Bump dependent cube versions when upstream metric/dimension changes#2210

Draft
shangyian wants to merge 10 commits into
DataJunction:mainfrom
shangyian:bump-cubes-upstream-change
Draft

Bump dependent cube versions when upstream metric/dimension changes#2210
shangyian wants to merge 10 commits into
DataJunction:mainfrom
shangyian:bump-cubes-upstream-change

Conversation

@shangyian
Copy link
Copy Markdown
Collaborator

@shangyian shangyian commented Jun 2, 2026

Summary

When a metric or dimension node's query is updated, downstream cubes were silently excluded from propagation. Thus, a cube's element list doesn't change when an upstream metric's SQL changes, so the diff-based update path produces no version bump. Any consumer that gates workflow regeneration on cube version IDs would see no change and skip updating, leaving stale SQL in production.

The fixes include:

  • _propagate_update_downstream now fetches all downstreams with include_cubes=True, revalidates non-cube nodes as before, then calls bump_cube_versions for downstream cubes.
  • bump_cube_versions is the single shared implementation: creates a new minor revision for each cube via create_cube_node_revision, which re-validates and rebuilds columns correctly.

Deduplication is handled by the existing visited-node sets in both propagation paths.

Test Plan

  • PR has an associated issue: #
  • make check passes
  • make test shows 100% unit test coverage

Deployment Plan

@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 2, 2026

Deploy Preview for thriving-cassata-78ae72 canceled.

Name Link
🔨 Latest commit b3cd6a3
🔍 Latest deploy log https://app.netlify.com/projects/thriving-cassata-78ae72/deploys/6a204d67c6ab7e0008e5a35a

@shangyian shangyian force-pushed the bump-cubes-upstream-change branch 2 times, most recently from 22d15b6 to 0459da1 Compare June 2, 2026 08:04
@shangyian shangyian changed the title Bump cubes upstream change Bump dependent cube versions when upstream metric/dimension changes Jun 2, 2026
@shangyian shangyian force-pushed the bump-cubes-upstream-change branch from 0459da1 to 81ad51a Compare June 2, 2026 15:59
@shangyian shangyian force-pushed the bump-cubes-upstream-change branch from 532e445 to b5b2e24 Compare June 3, 2026 07:31
@shangyian shangyian force-pushed the bump-cubes-upstream-change branch from b5b2e24 to efefacf Compare June 3, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant