Skip to content

Remove name from externally-registered pre-aggregations - #2411

Open
shangyian wants to merge 1 commit into
mainfrom
preagg-drop-name
Open

Remove name from externally-registered pre-aggregations#2411
shangyian wants to merge 1 commit into
mainfrom
preagg-drop-name

Conversation

@shangyian

@shangyian shangyian commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Externally-registered pre-aggregations asked users for a name. It was ceremony, and dropping it exposed a real bug that this PR fixes in the same change.

The name was ceremony. Reconciliation never read it: the apply finds the
rows a spec maps to by decomposing its metrics and matching on revision,
grain and measure identity, and deletes by row identity. The column
comment claimed an availability-by-name callback, but the only callback
is POST /preaggs/{preagg_id}/availability/, addressed by integer id.

Supplying a name is now an error rather than silently ignored, on both
the deploy spec and POST /preaggs/register (which passed it unrendered
where the deploy path passed the rendered name, so the two were never
comparable anyway). The database column stays, nullable, so rows written
before this still load.

Deployment results now label a pre-aggregation by the external table it
adopts plus the grain it covers -- the table alone is ambiguous, since
one registration can produce a pre-agg per grain group.

Dropping the name also exposes a real divergence: the dry run planned
creates, updates and deletes by name membership while the apply worked
by row identity, so editing a spec's grain but keeping its name previewed
a single update where the apply did a create plus a delete. The preview
now resolves each spec to its grain groups and matching rows the same way
the apply does -- decomposition needs no query service, only the physical
column binding does -- and reports the operations the apply will perform.
A spec it cannot resolve yet (a first deploy also creates the metrics it
refers to) is reported once as UNKNOWN, and the leftover rows are then
reported as UNKNOWN too rather than promised for deletion.
@netlify

netlify Bot commented Aug 12, 2026

Copy link
Copy Markdown

Deploy Preview for thriving-cassata-78ae72 ready!

Name Link
🔨 Latest commit 8cb70d1
🔍 Latest deploy log https://app.netlify.com/projects/thriving-cassata-78ae72/deploys/6a7c472bbba0d300084bd5f9
😎 Deploy Preview https://deploy-preview-2411--thriving-cassata-78ae72.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@shangyian shangyian changed the title Stop asking for a name on an externally-registered pre-aggregation Remove name from externally-registered pre-aggregations Aug 12, 2026
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