@malloy-publisher/skills 0.1.67 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +385 -128
- package/package.json +62 -61
- package/skills/eval-answer/SKILL.md +1 -1
- package/skills/eval-diagnose/SKILL.md +1 -1
- package/skills/eval-import/SKILL.md +1 -1
- package/skills/eval-improve/SKILL.md +1 -1
- package/skills/eval-judge/SKILL.md +1 -1
- package/skills/eval-loop/SKILL.md +1 -1
- package/skills/eval-report/SKILL.md +1 -1
- package/skills/malloy-analysis/SKILL.md +1 -1
- package/skills/malloy-analysis-report/SKILL.md +1 -1
- package/skills/malloy-charts/SKILL.md +1 -1
- package/skills/malloy-classify/SKILL.md +1 -1
- package/skills/malloy-compliance-review/SKILL.md +1 -1
- package/skills/malloy-dashboards/SKILL.md +1 -1
- package/skills/malloy-define/SKILL.md +1 -1
- package/skills/malloy-define-workflow/SKILL.md +1 -1
- package/skills/malloy-discover/SKILL.md +1 -1
- package/skills/malloy-document/SKILL.md +1 -1
- package/skills/malloy-excel-review/SKILL.md +1 -1
- package/skills/malloy-getting-started/SKILL.md +1 -1
- package/skills/malloy-gotchas-modeling/SKILL.md +1 -1
- package/skills/malloy-html-data-apps/SKILL.md +2 -2
- package/skills/malloy-lookml-review/SKILL.md +1 -1
- package/skills/malloy-materialization/SKILL.md +17 -18
- package/skills/malloy-materialization/reference/access-filter.md +3 -3
- package/skills/malloy-materialization/reference/annotation.md +6 -7
- package/skills/malloy-materialization/reference/chaining.md +10 -30
- package/skills/malloy-materialization/reference/estimating.md +2 -2
- package/skills/malloy-materialization/reference/refresh.md +4 -4
- package/skills/malloy-materialization/reference/serving.md +61 -0
- package/skills/malloy-materialization/reference/tuning.md +5 -6
- package/skills/malloy-materialization/reference/why-live.md +8 -8
- package/skills/malloy-model/SKILL.md +2 -2
- package/skills/malloy-model-as-you-go/SKILL.md +1 -1
- package/skills/malloy-modeling/SKILL.md +1 -1
- package/skills/malloy-notebooks/SKILL.md +1 -1
- package/skills/malloy-phrase-detection/SKILL.md +1 -1
- package/skills/malloy-powerbi-review/SKILL.md +1 -1
- package/skills/malloy-publish/SKILL.md +1 -1
- package/skills/malloy-queries/SKILL.md +1 -1
- package/skills/malloy-reports/SKILL.md +1 -1
- package/skills/malloy-review/SKILL.md +1 -1
- package/skills/malloy-run-workflow/SKILL.md +1 -1
- package/skills/malloy-source-unreachable/SKILL.md +1 -1
- package/skills/malloy-materialization/reference/storage.md +0 -85
package/CHANGELOG.md
CHANGED
|
@@ -1,231 +1,488 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.
|
|
3
|
+
## 0.2.0 — 2026-12-06
|
|
4
|
+
|
|
5
|
+
Also released: `@malloy-publisher/skills` 0.2.0, `@malloy-publisher/create-malloy-package` 0.0.86.
|
|
6
|
+
|
|
7
|
+
### Breaking changes
|
|
8
|
+
|
|
9
|
+
#### A `storage=` declaration is now read as an extract, never answered live
|
|
10
|
+
|
|
11
|
+
`#(materialize) storage=` and `#@ persist storage=` are retired. At load, each one is rewritten into
|
|
12
|
+
an extract of its source, view or named query, in the managed DuckLake connection over the
|
|
13
|
+
destination's catalog. That source, view or query is then answered only from the extract's copy.
|
|
14
|
+
The rewrite is never written to disk. Each rewritten declaration raises a `storage-rewritten`
|
|
15
|
+
package warning naming its extract (`<connection>.<file>__<target>__<4 hex>`, or `name=`'s leaf).
|
|
16
|
+
The warning also names what the rewrite inferred: `compare="exact"` on columns that compare
|
|
17
|
+
case-insensitively at the origin, a cast on a numeric with no fixed scale, and the connection's
|
|
18
|
+
project for a BigQuery table that names none. It names what was not applied as well:
|
|
19
|
+
`freshness.fallback`, `queryMetadata`, and `#@ -persist` on a reader. A `#(rollup) storage=` over a
|
|
20
|
+
source that is not rewritten drops `storage=` and becomes a database rollup. A rollup over a
|
|
21
|
+
rewritten source is refused on its own.
|
|
22
|
+
|
|
23
|
+
Whether a source converts is the compiler's answer: one whose root, through aliases, `extend`,
|
|
24
|
+
`include` and imports, is a query or a `.sql()` read is copied as a query over the name it starts
|
|
25
|
+
from (`source: b is a extend { … }` reads as `b is a -> { select: * } extend { … }`). When that
|
|
26
|
+
name is itself a rewritten source, the extract reads its copy, as a chained extract. A copy holds
|
|
27
|
+
only `a`'s columns, so when `a` defines anything else, `b` fails to load (below).
|
|
28
|
+
|
|
29
|
+
**What to do before upgrading.**
|
|
30
|
+
|
|
31
|
+
- Add a managed DuckLake connection (`"managed": true`) over the catalog of each storage destination
|
|
32
|
+
a `storage=` names. Otherwise the package fails to load with
|
|
33
|
+
`[extract-destination-unconfigured] <dest> has no managed DuckLake connection over its catalog: add one`.
|
|
34
|
+
- Build each extract once. An extract cannot adopt a `storage=` table, so every rewritten
|
|
35
|
+
declaration answers 409 `EXTRACT_AWAITING_BUILD` until its first generation binds. A host builds it once
|
|
36
|
+
it plans the release; a standalone server's first run builds it.
|
|
37
|
+
- Some declarations fail the whole package's load, one `<file>:<line>: [<code>] <message>` line
|
|
38
|
+
each, until you edit the source or drop `storage=`:
|
|
39
|
+
- a declaration the rewrite cannot convert: `inline=`, a nested result (a `nest:`) in its
|
|
40
|
+
output, a source whose own connection is a managed database (drop `storage=`: it builds in that
|
|
41
|
+
connection itself), or a source rooted on a table (`conn.table('x')`, directly or under other
|
|
42
|
+
sources): `[extract-not-query] <q>'s storage="<dest>" is retired, and <q> is not a query: write
|
|
43
|
+
it as a query, e.g. source: <name> is <connection>.table('x') -> { select: * } extend { … }, or
|
|
44
|
+
drop storage=`;
|
|
45
|
+
- a source built on another (`b is a extend { … }`, `a include { … }`, or a bare `b is a`) whose
|
|
46
|
+
head `a` defines anything a copy of its rows cannot carry: a measure, a view, a join, a
|
|
47
|
+
dimension read through a join, a `primary_key`, a `timezone:`, an internal or private field, a
|
|
48
|
+
classified field, or a `#(classification)` or `#(carries)` on `a`. These sources fail to load
|
|
49
|
+
until rewritten, even when `b` reads none of it, and an `include` that leaves such a field out
|
|
50
|
+
fails the same way:
|
|
51
|
+
`[extract-not-query] <q>'s storage="<dest>" is retired, and <q> builds on <head>, whose
|
|
52
|
+
measures (…) a copy of its rows cannot carry: write <q> as a query that selects the columns it
|
|
53
|
+
needs, then extend it, or drop storage=`;
|
|
54
|
+
- a declaring file that does not compile as written (the rewrite never decides from the text);
|
|
55
|
+
when what failed is a read at the origin, the declaration keeps serving a generation already
|
|
56
|
+
bound at its address; without one, an origin that cannot be reached refuses that extract
|
|
57
|
+
alone (`extract-origin-unreachable`, readers answer 409) and one that answers without a table
|
|
58
|
+
the file reads fails the load (`extract-origin-incompatible`, a new finding code). A bound
|
|
59
|
+
generation is held only while the text it was decided from, notes included, is unchanged,
|
|
60
|
+
which its build records in its snapshot tag; a generation built before this release records
|
|
61
|
+
none, and is refused while its origin cannot be read until it is rebuilt;
|
|
62
|
+
- two `storage=` declarations on one definition, or one note over a statement of several;
|
|
63
|
+
- a copied query that reads a given or a gated source;
|
|
64
|
+
- an access gate, or a `where:`, that reads a column inferred to compare exactly, through any
|
|
65
|
+
dimension, rename or join, on the source itself or on any source or query that reads it;
|
|
66
|
+
- a target whose query reads a field with a class, by lineage (renamed, computed or joined),
|
|
67
|
+
which its copy cannot carry;
|
|
68
|
+
- a column no stored type holds;
|
|
69
|
+
- an origin that cannot be described, unless a generation is already bound.
|
|
70
|
+
|
|
71
|
+
- A generated extract is described at its origin at load. On an origin with no describer yet (any
|
|
72
|
+
connection but Postgres, BigQuery, DuckDB and a `publisher` proxy), the package fails to load
|
|
73
|
+
with `extract-origin-unsupported`; drop `storage=` there until that origin is supported.
|
|
74
|
+
- When more than one managed DuckLake connection, or more than one storage destination, is over a
|
|
75
|
+
destination's catalog, name the managed connection after the destination, or the load fails
|
|
76
|
+
naming the candidates.
|
|
77
|
+
|
|
78
|
+
See [docs/extracts.md](https://github.com/malloydata/publisher/blob/main/docs/extracts.md#rewritten-storage-declarations).
|
|
79
|
+
|
|
80
|
+
([#2272](https://github.com/malloydata/publisher/pull/2272) by @kylenesbit)
|
|
81
|
+
|
|
82
|
+
#### The storage tier is removed: a stored table builds only in its source's own connection
|
|
83
|
+
|
|
84
|
+
Publisher no longer builds or serves a table in a storage destination, except an extract's. A
|
|
85
|
+
`storage=` declaration is rewritten into an extract (see the entry above), and every other stored
|
|
86
|
+
table (`#@ persist`, `#(materialize)`, a rollup, a persisted view or named query) is built in its
|
|
87
|
+
source's own connection and served from there. A storage destination now holds only extracts, and
|
|
88
|
+
backs managed DuckLake catalogs.
|
|
89
|
+
|
|
90
|
+
**What breaks, and what a host must change.**
|
|
91
|
+
|
|
92
|
+
- **`BuildInstruction.destination` on a stored table is refused.** A build instruction that names
|
|
93
|
+
`destination` for a source that is not an extract answers 400 `BUILD_INSTRUCTIONS_INVALID`, and
|
|
94
|
+
its message names `BuildInstruction.destination`. Omit `destination`: the source builds in its own
|
|
95
|
+
connection. An extract's instruction still names the storage destination over its target
|
|
96
|
+
catalog, as before.
|
|
97
|
+
- **A persist source on a managed database is a database build.** A host that sent
|
|
98
|
+
`destination=<the managed database>` for a `#@ persist` or `#(materialize)` source whose own
|
|
99
|
+
connection is that managed database (a same-catalog build into its `materialized` schema) must
|
|
100
|
+
now send no `destination`. The table is built in the source's own connection, at the name the
|
|
101
|
+
plan gives it, like any database table.
|
|
102
|
+
- **`LedgerEntry.storageDestinationName` and `ManifestReference.storageDestinationName` are
|
|
103
|
+
refused**, each with a 400 naming the field, and `ManifestReference.schema` is gone. Omit them.
|
|
104
|
+
- **A manifest entry for a stored table that names a storage destination is not bound.** Such an
|
|
105
|
+
entry, written by an earlier release's storage build, serves nothing: its source answers live
|
|
106
|
+
until the host builds it in its own connection and binds the new entry. Extract entries are bound
|
|
107
|
+
as before.
|
|
108
|
+
- **The `DELETE …/storageDestinations/{destinationName}/schemas/{schemaName}/tables/{tableName}`
|
|
109
|
+
route (`delete-storage-destination-table`) is removed.** Drop a destination's table through the
|
|
110
|
+
admin API (`DELETE /catalogs/{catalog}/schemas/{schema}/tables/{table}`), or an extract
|
|
111
|
+
generation through `drop-storage-materialized-table`.
|
|
112
|
+
- **Wire values removed:** the `storage` tier (on `RefusedSource.tier`, `MaterializationItem.tier`,
|
|
113
|
+
the `/status` digest and the path report's server), `Package.storageServeBindings` and
|
|
114
|
+
`PackageServingState.storageServeBindings` (and the `StorageServeBinding` schema), and
|
|
115
|
+
`PersistSourcePlan.joinedTerms` (only a `storage=` table read it; a join to a given-scoped source
|
|
116
|
+
is still served from the database table, with the joined source's givens applied per caller at
|
|
117
|
+
read, as live applies them).
|
|
118
|
+
An extract's refusal reports `RefusedSource.tier` `extract`.
|
|
119
|
+
- **In the v1 API, `PersistedSource.destinationName` is removed**, with the `storage` value of the
|
|
120
|
+
tier enums (the served answer's tier and `RefusedSource.tier`). A persisted source builds in its
|
|
121
|
+
own connection, so there is no destination to report. `TableAddress.destinationName` stays, and
|
|
122
|
+
now names only an extract's table.
|
|
123
|
+
- **Refusal reason `storage_source_unsupported` is renamed `managed_author_sql`.** It is the reason
|
|
124
|
+
a source on a `managed` DuckLake connection that carries author SQL (an `.sql()` source, a `sql_*`
|
|
125
|
+
expression, or a file or URL read as a table) is refused, on `RefusedSource.reason` and the
|
|
126
|
+
`publisher_materialization_eligibility_refused_total` metric's `reason` label. A client that
|
|
127
|
+
switches on the old value should switch on the new one; which sources are refused is unchanged.
|
|
128
|
+
- **The `PUBLISHER_PERSIST_ADDRESS_INCLUDES_DESTINATION` setting** (`persist.addressIncludesDestination`)
|
|
129
|
+
is retired: it is ignored, with a startup warning.
|
|
130
|
+
|
|
131
|
+
**Behaviour that changes with it.**
|
|
132
|
+
|
|
133
|
+
- **Incremental refresh on DuckDB.** An incremental `#@ persist` or `#(materialize)` source on a
|
|
134
|
+
DuckDB connection is built and served in that connection, a full build then deltas, with
|
|
135
|
+
`merge_key=`, `lookback=`, late-row checks and `--reseed` as on Postgres. It was refused at plan
|
|
136
|
+
as `incremental_unsupported`.
|
|
137
|
+
- **An incremental pair table rebuilds in full.** A pair table (`inline=` on a join_many) has no
|
|
138
|
+
incremental delta in a database table: its `refresh="incremental"` is accepted, the table is
|
|
139
|
+
rebuilt in full on each refresh and served, and `materialize-pair-full-refresh` says so.
|
|
140
|
+
|
|
141
|
+
Tables an earlier release built in a storage destination are not dropped by Publisher. Reclaim them
|
|
142
|
+
through the admin API once nothing binds them.
|
|
4
143
|
|
|
5
|
-
|
|
144
|
+
([#2287](https://github.com/malloydata/publisher/pull/2287) by @kylenesbit)
|
|
6
145
|
|
|
7
|
-
|
|
146
|
+
#### A connection's digest no longer hashes a credential or setupSQL, so some stored tables rebuild once
|
|
8
147
|
|
|
9
|
-
|
|
148
|
+
**[BREAKING] A stored table's address no longer depends on a password, token, secret key or a
|
|
149
|
+
connection's `setupSQL`.** A connection's digest is hashed into the address (`sourceEntityId`) of
|
|
150
|
+
every stored table built on it, and that address is returned by the API, kept in the run store and
|
|
151
|
+
logged. Some drivers hashed text that can carry a credential, so a credential's hash could reach
|
|
152
|
+
those places. Publisher now masks each credential in a connection string or URL before hashing,
|
|
153
|
+
and leaves a user's `setupSQL` out of the digest entirely. Host, port, database, user, path,
|
|
154
|
+
catalog and the other identifying fields are hashed as before.
|
|
10
155
|
|
|
11
|
-
|
|
156
|
+
The address moves, once, only for these connections without a `fingerprint`:
|
|
12
157
|
|
|
13
|
-
|
|
158
|
+
- **Postgres** with a password in its `connectionString` (in the userinfo or as a `password=`
|
|
159
|
+
parameter, under any spelling of the name), or a secret setting in its `options`; or with a
|
|
160
|
+
password and an `sslmode` (or the deployment's `PGSSLMODE`), which makes Publisher build a
|
|
161
|
+
connection string with the password in it.
|
|
162
|
+
- **DuckDB** and **Databricks** connections with any `setupSQL`.
|
|
163
|
+
- **Trino** whose `server` URL carries a password.
|
|
164
|
+
- **Postgres reached through a `proxy`**, every one. Its digest hashed the local tunnel's address,
|
|
165
|
+
whose port is chosen afresh each time the tunnel opens, so its address could move on any reopen.
|
|
166
|
+
It now hashes the database it reaches (host, port, user, database) and the bastion's host, so it
|
|
167
|
+
moves once and then holds.
|
|
14
168
|
|
|
15
|
-
|
|
169
|
+
**What to do.** Run a build after upgrading. A stored table on one of these connections is not
|
|
170
|
+
found at its new address until a build writes it there, and is then served as before. Connections
|
|
171
|
+
with a `fingerprint`, and every other connection (MySQL, SQL Server, Snowflake, BigQuery,
|
|
172
|
+
MotherDuck, DuckLake, the Publisher proxy, and the kinds above without those fields), keep their
|
|
173
|
+
addresses.
|
|
16
174
|
|
|
17
|
-
|
|
175
|
+
**Editing `setupSQL` no longer moves an address**, and neither does rotating a credential. After a
|
|
176
|
+
`setupSQL` edit that changes the data a connection reads (a different `ATTACH`, a secret, a search
|
|
177
|
+
path), run a full build, so no table built from the old data keeps serving.
|
|
18
178
|
|
|
19
|
-
|
|
179
|
+
([#2297](https://github.com/malloydata/publisher/pull/2297) by @kylenesbit)
|
|
20
180
|
|
|
21
|
-
|
|
181
|
+
#### A chained extract sits in a later level of the build graph than the extract it reads
|
|
22
182
|
|
|
23
|
-
|
|
24
|
-
#(rollup) grain=["region", "customer_id"]
|
|
25
|
-
measure: buyers is count(customer_id)
|
|
26
|
-
```
|
|
183
|
+
**[fix] In the build plan's `graphs`, an extract is now placed in a level after every level of its graph that holds a source it reads.** Before, every extract went into the graph's first level beside its upstream, so a host that builds a level's sources in parallel could start a chained extract before the extract it reads. `dependsOn` is unchanged, and every persist source stays in the first level, in build order.
|
|
27
184
|
|
|
28
|
-
|
|
29
|
-
- `count(x)` with `x` not in the grain still fails the publish and the load, and the message now says to put `x` in the grain. A distinct count of an expression (`count(upper(email))`) fails too: declare it as a dimension and put that in the grain.
|
|
30
|
-
- A distinct count is read from its own source's rollup only. A query that reads it through a join from another source is answered live.
|
|
185
|
+
**Who is affected:** hosts that read `BuildGraph.nodes` as levels. **What to do:** nothing; a host that follows `dependsOn` already built in the right order. See "The build plan" in docs/extracts.md.
|
|
31
186
|
|
|
32
|
-
|
|
187
|
+
([#2294](https://github.com/malloydata/publisher/pull/2294) by @kylenesbit)
|
|
33
188
|
|
|
34
|
-
(
|
|
189
|
+
#### A hand-written `#(extract)` accepts a `.sql()` source and a source built on a query-shaped name
|
|
35
190
|
|
|
36
|
-
|
|
191
|
+
**[feature] `#(extract)` on a source not written as a query is copied as one when the compiler roots it on a query or a `.sql()` read.** `source: s is pg.sql("…") extend { … }` and `source: b is q extend { … }`, where `q` is itself a query-shaped source, are copied as `pg.sql("…") -> { select: * }` and `q -> { select: * }`, with the source's own extension applied over the copy, as a rewritten `storage=` declaration already was. Before, both failed the load with `extract-not-query`. A source rooted on a table, and one built on a name whose definition holds what a copy of its rows cannot carry (a measure, a view, a join and the like), still fail the load with `extract-not-query`. An origin that cannot be read at load never fails it: such a source is refused alone until its origin answers, while a generation bound at its address keeps serving.
|
|
37
192
|
|
|
38
|
-
**
|
|
193
|
+
**Who is affected:** packages that declared an extract over a `.sql()` source or a query-shaped source's alias. **What to do:** nothing; see docs/extracts.md, "Targets, and running them".
|
|
39
194
|
|
|
40
|
-
|
|
41
|
-
- A query is served from the simulated table when the destination `storage=` names is declared on this server and its catalog exists.
|
|
42
|
-
- When the destination is not declared here (it is the host's), the table is still simulated, its queries are answered live, and a `destination` fact says why.
|
|
43
|
-
- The package-scope compile (`compile_model` at `scope: "package"`) plans the source the same way as the reload, so it reports the host's verdict too.
|
|
44
|
-
- For a source on one of this server's own connections, a `storage=` destination this server does not declare is now reported as a configuration error, with the fix (`basis: "exact"`), instead of as the host's.
|
|
195
|
+
([#2294](https://github.com/malloydata/publisher/pull/2294) by @kylenesbit)
|
|
45
196
|
|
|
46
|
-
A
|
|
197
|
+
#### A hand-written `#(extract)` reads its origin's types and collations at load
|
|
47
198
|
|
|
48
|
-
|
|
199
|
+
**[breaking] A hand-written `#(extract)` is now described at its origin when its package loads, as a generated one already was, so the extract outcome rule decides it the same way.** With no generation bound, a finding of the origin's state fails the package's load. Those findings are `extract-type-unmapped`, `extract-numeric-unconstrained`, `extract-collation-unacknowledged`, `extract-collation-unsupported`, `extract-watermark-unsupported` and `extract-origin-incompatible`. With a generation bound, the extract keeps serving that generation with a warning, and its builds fail. An origin that cannot be reached never fails the load: with nothing bound, that extract alone is refused (409 `EXTRACT_REFUSED`), and with a generation bound it keeps serving it, warned. Before, a hand-written extract's types and collations were read only at build, so a new extract over a case-insensitive column loaded and then failed every build. `/status` now reports an extract refused by an origin-state finding as `refused`, with its `finding`, as its readers are refused.
|
|
49
200
|
|
|
50
|
-
|
|
201
|
+
**Who is affected:** packages with a hand-written extract whose origin column needs an acknowledgement, such as a case-insensitive column with no `#(column) compare="exact"`, or a numeric with no precision. **What to do:** fix the line the load error names; see docs/extracts.md, "Findings". A chained extract, which reads another extract's copy, is not described.
|
|
51
202
|
|
|
52
|
-
|
|
203
|
+
([#2294](https://github.com/malloydata/publisher/pull/2294) by @kylenesbit)
|
|
53
204
|
|
|
54
|
-
(
|
|
205
|
+
#### A misspelled `#(extract)` fails the load
|
|
55
206
|
|
|
56
|
-
|
|
207
|
+
**[breaking] A note that reaches for `#(extract)` but misspells it (`#(extrct)`, `#(Extract)`, `# (extract)`, `#(extracts)`, or a malformed `#(extract into=…)`) now fails the publish and the load with `materialization-near-miss`, naming `#(extract)`.** It used to be an `annotation-near-miss` warning, so the extract silently did not exist. This matches every other materialization route. Only spellings within one edit of `extract` are caught. Ordinary words two edits away that another app may route on (`#(exact)`, `#(extra)`, `#(retract)`) are not.
|
|
57
208
|
|
|
58
|
-
**
|
|
209
|
+
**Who is affected:** a package with such a misspelling. **What to do:** correct the spelling the error names. See [docs/extracts.md](https://github.com/malloydata/publisher/blob/main/docs/extracts.md#targets-and-running-them).
|
|
59
210
|
|
|
60
|
-
|
|
211
|
+
([#2294](https://github.com/malloydata/publisher/pull/2294) by @kylenesbit)
|
|
61
212
|
|
|
62
|
-
|
|
213
|
+
#### A stored source whose build reads an extract's address says it is never built
|
|
63
214
|
|
|
64
|
-
**[
|
|
215
|
+
**[fix] The `upstream_unread` warning on a stored source whose build reads an extract's address no longer promises that a reload will plan it.** Such a source (an extension that writes only `#@ name=` over a `#@ persist` base that reads an extract, say) is never built: an extract's address names no table, and a reader reads the extract's bound generation. The warning now says so, and names the two fixes: read it without storing it, or store over the extract query's own source. It is still answered from the extract it reads, never from the extract's origin.
|
|
65
216
|
|
|
66
|
-
**
|
|
217
|
+
**Who is affected:** nobody's answers change. **What to do:** nothing.
|
|
67
218
|
|
|
68
|
-
|
|
219
|
+
([#2294](https://github.com/malloydata/publisher/pull/2294) by @kylenesbit)
|
|
69
220
|
|
|
70
|
-
|
|
221
|
+
#### An extract's address is read from its connection's configuration, so an outage holds what is bound
|
|
71
222
|
|
|
72
|
-
|
|
223
|
+
**[fix] An extract's address no longer depends on opening its origin's connection.** Its dataset identity is read from the environment's configuration of the connection. So an outage keeps the address, and the generation bound there keeps serving with an `extract-origin-unreachable` warning, on a running server and after a restart alike, standalone and hosted. An outage here means a lookup of the connection that fails, a DuckDB connection whose `ATTACH` of a remote database fails, or an origin that refuses every read. With nothing bound, that extract alone is refused (409 `EXTRACT_REFUSED`) and the load succeeds. A generated extract's hold still needs its decision digest to match.
|
|
73
224
|
|
|
74
|
-
|
|
225
|
+
Before, a connection whose lookup failed was refused whatever was bound. A lookup error that named credentials or configuration was read as an incompatible origin and could fail the load; a read that the origin refuses for its login is still incompatible.
|
|
75
226
|
|
|
76
|
-
|
|
227
|
+
Only two cases give no address. A connection missing from the environment's configuration is refused alone, whatever is bound. A configuration that does not say which dataset it reaches (`extract-connection-identity-incomplete`) fails the load. See docs/extracts.md, "The outcome rule".
|
|
77
228
|
|
|
78
|
-
([#
|
|
229
|
+
([#2294](https://github.com/malloydata/publisher/pull/2294) by @kylenesbit)
|
|
79
230
|
|
|
80
|
-
|
|
231
|
+
#### A query answered from an extract reports `servedFrom: "extract"`
|
|
81
232
|
|
|
82
|
-
|
|
233
|
+
**[feature] A query whose run read an extract's generation now reports `servedFrom: "extract"`, never null.** Null means a live answer, and an extract never answers live, so the value said the opposite of what happened. The same value is on the access record's `servedFrom` and the `publisher.query` span's `malloy.model.query.served_from`, and the route counter `publisher_query_route_total` counts the query as `leg="extract"`, `outcome="used"`, in place of `live`. A query that read a database table beside an extract (a mixed answer) also reports `extract`; its path report's `servedBy` is `kind: extract` with each extract listed, and now also names the database table that answered by its `tableId`, `origin`, `tier` and `via` (its `dataAsOf` is left out, since each extract carries its own). MCP `execute_query` describes the value, and no longer lists the retired `storage`.
|
|
83
234
|
|
|
84
|
-
**
|
|
235
|
+
**Who is affected:** clients that branch on `servedFrom`, and dashboards over `publisher_query_route_total{leg}`. A client generated from the spec gains one enum value. **What to do:** treat `extract` as an answer from a copy, read at its `dataAsOf`. See [the path report](https://github.com/malloydata/publisher/blob/main/docs/extracts.md#the-path-report).
|
|
85
236
|
|
|
86
|
-
|
|
237
|
+
([#2294](https://github.com/malloydata/publisher/pull/2294) by @kylenesbit)
|
|
87
238
|
|
|
88
|
-
|
|
239
|
+
#### An extract build fails when a value cannot be cast to its column's declared type
|
|
89
240
|
|
|
90
|
-
|
|
241
|
+
**[fix] An extract's build now fails, and writes no generation, when a value cannot be cast to its column's declared type** (a boolean the origin returns as `'Y'`, an integer past 38 digits). Before, it retried without that class of casts and stored the types the warehouse computed, leaving the later findings check to catch a lost value. The failure is not retryable (v0 `retryable: false`), its `reason` never quotes the value, and the previous generation keeps serving. `publisher_storage_column_type_mismatch_total{stage="build",declared="cast_failed"}` still counts it.
|
|
91
242
|
|
|
92
|
-
**
|
|
243
|
+
**Who is affected:** extracts whose origin returns a value its declared column type cannot hold. **What to do:** fix the column's type in the extract query (cast it in Malloy), then build again. See "Build failures" in docs/extracts.md.
|
|
93
244
|
|
|
94
|
-
|
|
245
|
+
([#2294](https://github.com/malloydata/publisher/pull/2294) by @kylenesbit)
|
|
95
246
|
|
|
96
|
-
|
|
247
|
+
#### An extract over a stored source is built from the stored table, never the origin
|
|
97
248
|
|
|
98
|
-
|
|
249
|
+
**[feature] An extract whose query reads a `#(materialize)` or `#@ persist` source, a `#(rollup)` base, a `#@ persist` named query, or a `#@ persist` view it calls is now built over that stored table.** Its build routes the extract's own query through the serve router, pinned to the run's stored tables, and builds from the answering leg's SQL. Before, such an extract read the origin's raw rows, so its copy could differ from the table every other reader saw.
|
|
99
250
|
|
|
100
|
-
|
|
251
|
+
- The build plan makes the extract's node depend on each stored table it reads, a level after them.
|
|
252
|
+
- `extract.upstreams` on its manifest entry is now a union by `kind`: `{kind: "extract", target, generation}` for a chained extract (the existing entries, now with `kind`), and `{kind: "stored", sourceEntityId, physicalTableName, builtAt}` for a stored table. The extract's `dataAsOf` is the oldest of its upstreams': for a stored table, the start of the run that built it.
|
|
253
|
+
- An extract whose stored upstream the build plan refused is refused alone, with the new finding code `extract-upstream-refused`: its readers answer 409 `EXTRACT_REFUSED` naming the upstream, and the package still loads.
|
|
254
|
+
- A persisted view is read wherever the extract's compiled query reaches it. Its table answers only a call of the view on its declaring source at the head of the query; any other read (a nest, a join, an extension, a query-shaped source over it, another view built on it, a call through an extension or an import alias, a refined call) refuses the extract at plan time with `extract-upstream-refused`. A refined call of a persisted query (`pq + { limit: 10 }`) is refused the same way.
|
|
255
|
+
- A build fails, the previous generation serving, when no stored table answers the query (a regroup finer than a rollup's grain), when the run holds no table for an upstream, or when a table's age is unknown.
|
|
101
256
|
|
|
102
|
-
**
|
|
257
|
+
**Who is affected:** packages with an extract over a stored source, and hosts that read `extract.upstreams`. **What to do:** a host reads `kind` on each `extract.upstreams` entry, sends a stored upstream's entry (with its `dataAsOf`) in the `referenceManifest` of a run that builds such an extract, and builds in graph order. See docs/extracts.md, "An extract over a stored source".
|
|
103
258
|
|
|
104
|
-
|
|
105
|
-
- A `publisher` proxy connection whose remote answers 401: `Connection "bq_demo": the remote Publisher refused this connection's access token (HTTP 401).`, followed by the fix for a Credible connection, which is `cred login`. A 403 says the token is not allowed to use the connection.
|
|
259
|
+
([#2294](https://github.com/malloydata/publisher/pull/2294) by @kylenesbit)
|
|
106
260
|
|
|
107
|
-
|
|
261
|
+
#### An incremental refresh of a stored table now reads the rows whose watermark is NULL
|
|
108
262
|
|
|
109
|
-
|
|
263
|
+
**[fix] Every delta of a `refresh="incremental"` stored table (`#(materialize)`, `#@ persist`) now re-reads the source's rows whose watermark is NULL, beside its range.** A NULL watermark falls in no range, so before this release a stored table differed from live until its next full rebuild in three ways: a new NULL-watermark row never arrived; without `merge_key=`, a NULL-watermark row the source dropped was never deleted; and with `merge_key=`, a row whose watermark became NULL kept its old values. The range replace's delete and the Snowflake merge's repeated-key probe cover the same rows. Extracts already read NULL-watermark rows on every refresh.
|
|
110
264
|
|
|
111
|
-
|
|
265
|
+
**Who is affected:** incremental stored tables whose watermark column can be NULL. **What to do:** nothing. The next refresh brings the table level with live; a source with many NULL-watermark rows re-reads them on every refresh. See "Incremental refresh" in docs/materialization.md.
|
|
112
266
|
|
|
113
|
-
|
|
267
|
+
([#2294](https://github.com/malloydata/publisher/pull/2294) by @kylenesbit)
|
|
114
268
|
|
|
115
|
-
|
|
269
|
+
#### A compile check describes only the extracts it changes
|
|
116
270
|
|
|
117
|
-
|
|
271
|
+
**[fix] `compile_model`, and any what-if compile of edited text, no longer describes every hand-written or generated extract against its origin on each call.** An extract the text leaves as the load read it reuses the load's describe, so its origin is not asked again. An extract the text adds or changes is described, all at once, waiting on its origin at most 5 seconds, past which the check reports it as `extract-origin-unreachable`. Before, each call described every extract one after another, waiting up to 30 seconds on each. See [docs/extracts.md](https://github.com/malloydata/publisher/blob/main/docs/extracts.md).
|
|
118
272
|
|
|
119
|
-
|
|
273
|
+
([#2294](https://github.com/malloydata/publisher/pull/2294) by @kylenesbit)
|
|
120
274
|
|
|
121
|
-
|
|
275
|
+
#### Every stored table's manifest entry carries `dataAsOf`
|
|
122
276
|
|
|
123
|
-
|
|
277
|
+
**[feature] Every database entry a run builds now carries `dataAsOf`, whether or not its table declares a `freshness.window`.** It is the start of the run that built or last refreshed the table, or the oldest stored table that build read. A carried entry keeps its own. A host-orchestrated run stamps it too, and still leaves the window and fallback to the host. An extract over a stored table measures its own `dataAsOf` from this value. Before, the entry carried it only when the table declared a window, or when an extract read it in the same run. So an extract over a table built in an earlier run, and unchanged since, could not build. This is additive output.
|
|
124
278
|
|
|
125
|
-
**
|
|
279
|
+
**Upgrade note.**
|
|
280
|
+
- **Tables built before this release.** A stored table built by an earlier release has no `dataAsOf` on its entry. An extract over it fails its build with a message to rebuild the table, until that table is built again once (a reseed, or any change that rebuilds it).
|
|
281
|
+
- **Hosts.** A host that echoes entries in a `referenceManifest` or a bound manifest must echo `dataAsOf` unchanged. Without it, an extract over that table fails its build.
|
|
126
282
|
|
|
127
|
-
|
|
283
|
+
See [docs/extracts.md](https://github.com/malloydata/publisher/blob/main/docs/extracts.md).
|
|
128
284
|
|
|
129
|
-
|
|
285
|
+
([#2294](https://github.com/malloydata/publisher/pull/2294) by @kylenesbit)
|
|
130
286
|
|
|
131
|
-
|
|
287
|
+
#### `#(extract)` with `#(materialize)` or `#@ persist` on one definition fails the load
|
|
132
288
|
|
|
133
|
-
([#
|
|
289
|
+
**[breaking] A definition whose own notes declare `#(extract)` together with `#(materialize)`, or with `#@ persist`, now fails the package's load with `extract-and-stored`:** `<file>:<line>: [extract-and-stored] <q> declares both #(extract) and #(materialize): an extract is a copy that replaces its origin, and #(materialize) stores a table in the source's own database, so keep one`. The two mechanisms cannot both own one definition's table. `#@ -persist` beside `#(extract)` is not a declaration and still loads.
|
|
134
290
|
|
|
135
|
-
|
|
291
|
+
**Who is affected:** packages that annotate one source, view or named query with both. **What to do:** keep one of the two annotations; see docs/extracts.md, "Findings".
|
|
136
292
|
|
|
137
|
-
|
|
293
|
+
([#2294](https://github.com/malloydata/publisher/pull/2294) by @kylenesbit)
|
|
138
294
|
|
|
139
|
-
|
|
140
|
-
- `ducklake` environment connections, and `motherduck` through the same lookup path (exercised by unit stubs only, not against MotherDuck), each death abandoning the dead instance, until more than four have been abandoned in the process; past that, one whose instance dies stays down (below);
|
|
141
|
-
- a pooled storage destination (the DuckLake session pool, `duckdb.sessionsPerDestination`): a death retires the whole pool and the next lookup builds a fresh one. A session whose own join statement killed the instance logs `destination_session_join_killed_instance` once, and that pool never joins again;
|
|
142
|
-
- a package's DuckDB sandbox;
|
|
143
|
-
- the `publisher.db` store, which reopens in place;
|
|
144
|
-
- the SQL parser, which resets.
|
|
295
|
+
#### BREAKING: an unbuilt extract answers 409 `EXTRACT_AWAITING_BUILD`, and an extract's entry names its place in `destination`
|
|
145
296
|
|
|
146
|
-
|
|
297
|
+
**[breaking] The 409 a reader of an extract with no generation bound gets is now `reason: EXTRACT_AWAITING_BUILD`, renamed from `EXTRACT_NOT_BUILT`.** A client or router that retries or routes on the old code must match the new one. The message is unchanged.
|
|
147
298
|
|
|
148
|
-
|
|
299
|
+
**[breaking] `ExtractStatus.state` `not_built` is now `awaiting_build`**, the word a stored table's serve verdict already uses for "nothing bound yet". The other states (`bound`, `refused`, `expired`) are unchanged.
|
|
149
300
|
|
|
150
|
-
**[
|
|
301
|
+
**[breaking] An extract's manifest entry and its `ExtractStatus` name the storage destination in `destination`, renamed from `storageDestinationName`.** The value is unchanged: the name of the storage destination over the target connection's catalog, the same field name the build instruction already uses. For this release only, an extract's entry that still names its destination in `storageDestinationName` is accepted on input and bound as if it named it in `destination`. Publisher writes only `destination`, and the old name stops being read in the next release. `storageDestinationName` stays on `ManifestEntry` as a retained field, for an earlier release's storage entry, which is never bound. An extract's plan entry still reports its target's kind in `origin`; its `extract` block is what marks it as an extract.
|
|
151
302
|
|
|
152
|
-
**
|
|
303
|
+
**Who is affected:** a control plane that builds, binds or reports extracts. **What to do:** read and echo `destination` on extract entries (a host that still sends `storageDestinationName` keeps working for this release), read `awaiting_build`, and match `EXTRACT_AWAITING_BUILD`, all in the same upgrade. See [docs/extracts.md](https://github.com/malloydata/publisher/blob/main/docs/extracts.md).
|
|
153
304
|
|
|
154
|
-
|
|
305
|
+
([#2294](https://github.com/malloydata/publisher/pull/2294) by @kylenesbit)
|
|
155
306
|
|
|
156
|
-
|
|
307
|
+
#### An extract's build is counted, timed and costed like any other build
|
|
157
308
|
|
|
158
|
-
**[
|
|
309
|
+
**[feature] Each extract build is reported through the build metrics and log events**: `publisher_materialization_build_total{kind="extract",tier="extract"}` with its outcome and failure class (`billed_read_lost` included), `publisher_materialization_build_duration_ms` (`method` `full` or `delta`), `publisher_materialization_build_read_bytes{tier="extract"}`, and the `materialization.build.finished` / `materialization.build.failed` log events. Before, an extract build was only counted in the run's tally. An extract's manifest entry now carries `queryCostBytes`, the bytes its origin read scanned, when the warehouse reports them (null for a chained extract, which reads no warehouse, and for a delta).
|
|
159
310
|
|
|
160
|
-
**
|
|
311
|
+
**Who is affected:** operators with dashboards over the build metrics. **What to do:** nothing; a new `kind` and `tier` value appear.
|
|
161
312
|
|
|
162
|
-
|
|
313
|
+
([#2294](https://github.com/malloydata/publisher/pull/2294) by @kylenesbit)
|
|
163
314
|
|
|
164
|
-
|
|
315
|
+
#### The extracts contract is served, and two retired values are deleted
|
|
165
316
|
|
|
166
|
-
**
|
|
317
|
+
**[feature] Every extract surface in the API specs is now served.** The specs no longer mark the extract components, codes and routes as "in development; not yet emitted by any release": the build plan's `extract` block, the build instruction's and the manifest entry's `extract`, `/status` `extracts`, the finding codes, the path report's `extract` kind, the `EXTRACT_*` 409 and 400 reasons, `describe-extract`, and `drop-storage-materialized-table`. See [docs/extracts.md](https://github.com/malloydata/publisher/blob/main/docs/extracts.md).
|
|
167
318
|
|
|
168
|
-
**
|
|
319
|
+
**[breaking] `RefusedSource.tier` no longer lists `colocated`.** No release has produced it since `database` replaced it, and no client reads it. `ServeVerdict.tier` still accepts it as retained.
|
|
169
320
|
|
|
170
|
-
|
|
321
|
+
**[change] `publisher_materialization_drop_tables_total{occasion}` no longer has the value `delete`.** Nothing produced it. A caller's drop, through either drop route, is `caller`; Publisher's own is `reclaim`.
|
|
171
322
|
|
|
172
|
-
|
|
323
|
+
**Who is affected:** a client generated from the spec that matches `colocated` on `RefusedSource.tier`, and a dashboard that selects `occasion="delete"`. **What to do:** drop those matches.
|
|
173
324
|
|
|
174
|
-
|
|
325
|
+
([#2294](https://github.com/malloydata/publisher/pull/2294) by @kylenesbit)
|
|
175
326
|
|
|
176
|
-
|
|
327
|
+
#### A keyed load accepts a column widened into an unconstrained `numeric`
|
|
177
328
|
|
|
178
|
-
|
|
329
|
+
**[fix] A keyed load no longer refuses an object whose column moved from an integer or a decimal into an unconstrained `numeric`, or stayed `numeric`, as a `type_change`.** Those moves lose no value, and the load now accepts them. Before, an unconstrained `numeric` was compared as if it held no digits at all, so `INTEGER` → `numeric` and `numeric` → `numeric` were refused. A decimal written with spaces inside its parentheses, as in `decimal( 10, 2 )`, is now read as a decimal. Before, it compared only to the same spelling.
|
|
179
330
|
|
|
180
|
-
|
|
331
|
+
**Who is affected:** loads of objects into a table whose columns include an unconstrained `numeric`, or a decimal spelled with spaces. **What to do:** nothing.
|
|
181
332
|
|
|
182
|
-
|
|
333
|
+
([#2294](https://github.com/malloydata/publisher/pull/2294) by @kylenesbit)
|
|
183
334
|
|
|
184
|
-
|
|
185
|
-
- No bind serves an entry at a withheld address, whatever connection it names, on either tier. No manifest a model compiles over, a query reads over or a build renders over holds one.
|
|
186
|
-
- An entry whose `connectionName` names another connection than its address's planned sources is declined on every bind path and is not read as a build's upstream. It is counted on `publisher_served_copy_bind_total` with the new decline reason `connection_mismatch`.
|
|
187
|
-
- An entry that names no connection is trusted only when no other configured connection may share its connection's digest. Which connections may share one is read from each connection's own digest, as builds and serves resolve it, without opening the connection: its `fingerprint` from config, else the driver's digest of its configuration (no attach, no catalog, no login). Only a connection reached through a proxy tunnel is opened to read it, under a 5-second timeout. A digest that cannot be read makes its connection a peer of the connections it could collide with (its own driver family, and every fingerprinted connection), never of the whole environment, and it is read again at the next bind or run; a build refused only for want of that reading is `retryable: true`, and says so. Otherwise the entry is declined (`connection_mismatch`). As a build upstream it is never read: a build that reads it fails with the new `SourceFailure.code` `upstream_connection_unproven` (`retryable: false`), and its table is not written. With no planned source at an entry's address (including when no build plan computed), an entry naming a connection whose digest another may share is declined too.
|
|
188
|
-
- A source whose connection did not resolve no longer gets an address hashed from an undefined digest, which every such connection's identical SQL shared. It has no address (`address_unresolved` when a run meets it), is not built, and answers live.
|
|
335
|
+
#### execute_query tells an agent how old an extract answer is
|
|
189
336
|
|
|
190
|
-
**
|
|
337
|
+
**[feature] On an answer that read an extract, MCP `execute_query`'s compact `path.servedBy` carries `dataAsOf`: the oldest `dataAsOf` among the extracts the query read.** The answer is no fresher than that instant. No other answer carries it; the full per-extract list stays on the REST path report (`path.servedBy.extracts[].dataAsOf`). See [docs/ai-agents.md](https://github.com/malloydata/publisher/blob/main/docs/ai-agents.md).
|
|
191
338
|
|
|
192
|
-
|
|
193
|
-
- Any deployment where two configured connections can have one digest. That includes connections given one `fingerprint`, and also, with no fingerprint, connections whose driver hashes the same settings. Two BigQuery connections on one project have one digest whatever their credentials, because the driver hashes only the project and setup SQL. Connections configured identically under two names have one digest too.
|
|
194
|
-
- Sources whose SQL is identical across such connections now answer live.
|
|
195
|
-
- Unnamed manifest entries and references on such connections are no longer bound or read.
|
|
339
|
+
([#2294](https://github.com/malloydata/publisher/pull/2294) by @kylenesbit)
|
|
196
340
|
|
|
197
|
-
|
|
198
|
-
- Give each connection a fingerprint of its own, then rebuild.
|
|
199
|
-
- A stored table built before this release over a shared address, or downstream of one, may hold another connection's rows. Its sources answer live from now on, but the table is not rebuilt through Publisher while the connections still share a digest. Once they have distinct fingerprints, rebuild the affected downstream tables.
|
|
200
|
-
- The two new `omittedSources` reasons, the new decline reason and the new `SourceFailure.code` `upstream_connection_unproven` are additions to open sets. `OmittedSource.reason` is a plain string in the v0 spec, documented as an open set, so a generated client accepts the new values. The v1 spec has no `omittedSources`.
|
|
341
|
+
#### A generated extract refused because a notebook imports a model says so
|
|
201
342
|
|
|
202
|
-
|
|
343
|
+
**[fix] When a notebook in the package imports a model, each generated extract that a finding about its origin would otherwise hold on its bound generation is refused, and the refusal now says why.** The message used to say the extract's "text, its notes included, changed since its bound generation was decided", even when nothing had changed. It now says that a notebook in the package imports a model whose cells are not read, so no generated extract in the package keeps its bound generation. This applies to every generated extract in the package, whichever model the notebook imports. A notebook's cells are also no longer folded into a generated extract's decision digest. The notebook check already refuses the hold, so the fold added nothing.
|
|
203
344
|
|
|
204
|
-
|
|
345
|
+
**Who is affected:** packages with a `storage=` declaration rewritten into an extract and a notebook that imports a model. **What to do:** nothing. [docs/extracts.md](https://github.com/malloydata/publisher/blob/main/docs/extracts.md#rewritten-storage-declarations) describes the hold.
|
|
205
346
|
|
|
206
|
-
|
|
347
|
+
([#2294](https://github.com/malloydata/publisher/pull/2294) by @kylenesbit)
|
|
207
348
|
|
|
208
|
-
|
|
209
|
-
- **A malformed note that is `required` or `implicit`**, including one that misspells the flag (`requried`, `implict`) or gives it a value that is not false (`required=true`), makes the source answer no query until it is fixed: each query is refused with the same 400 a missing required value gets (`required_filter`), saying which filter cannot be applied, and the warning is an `error`. Answering without a filter the author declared required is what this fix stops; an `implicit` filter is set by infrastructure such as row-level security, whose value would otherwise match no filter and restrict nothing.
|
|
210
|
-
- **A `#(filter)` written between `source:` and the source's name** is filed by Malloy where filters are not read, so it still does not apply; the package now carries a `filter-annotation-not-read` warning for it. Move the note above the `source:` statement.
|
|
349
|
+
#### Warnings and refusals no longer advise `storage=`
|
|
211
350
|
|
|
212
|
-
**
|
|
351
|
+
**[fix] The messages that still told an author to use, drop or move a `storage=` destination now name what applies today.** Every stored table is built on its source's own connection, and a `storage=` is rewritten into an extract, so that advice no longer led anywhere useful:
|
|
213
352
|
|
|
214
|
-
(
|
|
353
|
+
- `rollup-unknown-key` lists the keys a `#(rollup)` reads as `grain=`, `name=` and `freshness.window=` / `freshness.fallback=`. A `storage=` on a rollup is still dropped with its `storage-rewritten` warning. An empty `storage=""` on a rollup is refused as `rollup-invalid`, with a message saying to remove it.
|
|
354
|
+
- `materialization-table-collision`, and the warning for `#@ persist` sources that share a table, say `on connection "<name>"`, not `in destination "<name>"`.
|
|
355
|
+
- The `sql_embed_bare` warning and serve-verdict fix say to embed the source as a query, `%{ <source> -> { select: * } }`, and no longer mention a storage destination.
|
|
356
|
+
- The `served-copy-not-served` warning for a hidden column says "its stored table", not "its v1 `storage=` table".
|
|
215
357
|
|
|
216
|
-
|
|
358
|
+
The served copy's `cross_connection_join`, `cross_connection_unbuilt` and `sql_embed_cross_connection` reasons, and the path report's `CROSS_CONNECTION` skip, are no longer produced. They could not happen: Malloy refuses a join or a `%{}` across connections when it compiles the author's file. They stay in the spec, marked retained. `publisher_served_copy_outcome_total` no longer lists them as `reason` values.
|
|
217
359
|
|
|
218
|
-
|
|
360
|
+
**Who is affected:** anyone who matches on these message texts. **What to do:** nothing; the codes are unchanged.
|
|
361
|
+
|
|
362
|
+
([#2294](https://github.com/malloydata/publisher/pull/2294) by @kylenesbit)
|
|
363
|
+
|
|
364
|
+
#### BREAKING: a stored source over an extract is refused under its own mechanism's not-built warning code
|
|
365
|
+
|
|
366
|
+
**[breaking] The warning code `extract-reader-stored` is retired.** A stored source that builds on, derives from or joins a definition reading an extract's target is still refused alone, never failing the load, with `RefusedSource.reason` `extract_reader_stored` (v1 `EXTRACT_READER_STORED`) and the same message. Its warning code and route are now the stored source's own mechanism's, as any other refusal of it:
|
|
367
|
+
|
|
368
|
+
- `#(materialize)`: `materialize-not-built`, route `materialize`;
|
|
369
|
+
- `#(rollup)` or `#@ preaggregate`: `rollup-not-built`, route `rollup`;
|
|
370
|
+
- a persisted view or query: `persist-view-not-built` or `persist-query-not-built`, route `@`;
|
|
371
|
+
- a `#@ persist` source: `persist-not-built`, route `@`.
|
|
372
|
+
|
|
373
|
+
The load warning line reads `<file>:<line>: [<code>] <message>`, and `publisher_annotation_findings_total{code}` counts it under that code; `extract-reader-stored` is no longer a label value.
|
|
374
|
+
|
|
375
|
+
**Who is affected:** a client, dashboard or alert that matches the warning code `extract-reader-stored`. **What to do:** match `RefusedSource.reason` `extract_reader_stored` to find these refusals, or the mechanism's `*-not-built` code. See [docs/extracts.md](https://github.com/malloydata/publisher/blob/main/docs/extracts.md).
|
|
376
|
+
|
|
377
|
+
([#2294](https://github.com/malloydata/publisher/pull/2294) by @kylenesbit)
|
|
378
|
+
|
|
379
|
+
#### One outcome rule for extract findings, decided at load, standalone and hosted alike
|
|
380
|
+
|
|
381
|
+
**[breaking] A hand-written `#(extract)` whose finding comes from the author's text or the configuration now fails the package's load, as a generated extract already did.** That covers `extract-caller-dependent`, `extract-key-not-output`, `extract-table-unqualified`, `extract-file-outside-package`, `extract-connection-identity-incomplete` and `extract-origin-unsupported`: each is reported as a `<file>:<line>: [<code>] <message>` line in the package's load error. Before, such an extract was refused alone and its readers failed 409 `EXTRACT_REFUSED`.
|
|
382
|
+
|
|
383
|
+
A finding of the origin's state (`extract-type-unmapped`, `extract-numeric-unconstrained`, `extract-collation-unacknowledged`, `extract-collation-unsupported`, `extract-watermark-unsupported`, `extract-origin-incompatible`) fails the load when no generation is bound at the extract's address. With one bound, the extract keeps serving it with a warning and its builds fail, as before; `extract-watermark-unsupported` now holds this way too. An origin that cannot be reached (`extract-origin-unreachable`) never fails the load: with nothing bound, that extract alone is refused (409 `EXTRACT_REFUSED`). The rule is the same on a standalone server, whose bound generations come from its own run store, and on a host, whose come from its manifest. `/status` now reports an extract held this way as `bound` with its `finding` set, where it said `refused`. The host rule that rejected a publish carrying a refusal with an empty `fix` is no longer part of the contract.
|
|
384
|
+
|
|
385
|
+
**Who is affected:** packages whose hand-written extracts were refused at load for one of those reasons. **What to do:** fix the line the load error names; see docs/extracts.md, "Findings".
|
|
386
|
+
|
|
387
|
+
([#2294](https://github.com/malloydata/publisher/pull/2294) by @kylenesbit)
|
|
388
|
+
|
|
389
|
+
#### The drop metric spells an extract's tier `extract`
|
|
390
|
+
|
|
391
|
+
**[change] `publisher_materialization_drop_tables_total{tier}` counts a dropped extract generation (or a table an older release recorded in a storage destination) as `tier="extract"`, not `tier="storage"`.** `extract` is now the one word for the place an extract lives, on every wire field and metric label: it is already `RefusedSource.tier`'s value for an extract's refusal, and the build metrics use it too.
|
|
392
|
+
|
|
393
|
+
**Who is affected:** operators with a dashboard or alert on `publisher_materialization_drop_tables_total{tier="storage"}`. **What to do:** change the selector to `tier="extract"`. The series under `storage` stops growing after the upgrade.
|
|
394
|
+
|
|
395
|
+
([#2294](https://github.com/malloydata/publisher/pull/2294) by @kylenesbit)
|
|
396
|
+
|
|
397
|
+
#### A persisted view called on a source imported from another file is served from its table
|
|
398
|
+
|
|
399
|
+
**[fix] A query that calls a `#@ persist` view on a source the model imports from the file that declares it (`import "f.malloy"`, then `run: a -> by_id`) is now answered from the view's stored table.** Before, the view leg declined it as `SHAPE_MISMATCH` ("the query does not call `by_id` on the source that declares it"), so the query ran live. An extract over such a view failed its build ("no stored table answers its query") instead of reading the stored table. A call through an import alias, or through an extension, is still not answered by the view leg. A `#(rollup)` over an imported base, and a `#@ persist` query whose source is imported, were already answered from their tables, with the base's gates re-applied for each caller, and still are: the three legs now read an imported run target by one rule.
|
|
400
|
+
|
|
401
|
+
**Who is affected:** packages that call a persisted view from a file other than the one that declares it. **What to do:** nothing.
|
|
402
|
+
|
|
403
|
+
([#2294](https://github.com/malloydata/publisher/pull/2294) by @kylenesbit)
|
|
404
|
+
|
|
405
|
+
### Features
|
|
406
|
+
|
|
407
|
+
- **server:** extracts, phase 4: readers fail closed on every surface; runs rules; neverLive is emitted ([#2199](https://github.com/malloydata/publisher/pull/2199) by @kylenesbit)
|
|
408
|
+
- **server:** extracts, a staged origin read for origins with no passthrough ([#2283](https://github.com/malloydata/publisher/pull/2283) by @kylenesbit)
|
|
409
|
+
- **server:** extracts, SQL Server origin: describe, collation, qualification, the exact staged read and watermarks ([#2289](https://github.com/malloydata/publisher/pull/2289) by @kylenesbit)
|
|
410
|
+
- **server:** extracts, the DuckDB origin read and DuckLake chains ([#2286](https://github.com/malloydata/publisher/pull/2286) by @kylenesbit)
|
|
411
|
+
- **server:** extracts, Snowflake origin: describe, collation, identity, qualification and the exact read ([#2217](https://github.com/malloydata/publisher/pull/2217) by @kylenesbit)
|
|
412
|
+
|
|
413
|
+
### Fixes
|
|
414
|
+
|
|
415
|
+
#### Table metadata routes quote the table path
|
|
416
|
+
|
|
417
|
+
**[fix] A table read (`GET …/connections/{conn}/schemas/{schema}/tables/{table}`, with or without `include=collations`, the package-scoped and legacy `/projects` forms, and `search_database_schema`) now reads the table path as a dotted list of names, each quoted in the connection's dialect, as the `stats` route already did.** A name with a space or other character that needs quoting, such as the `main.Odd Name` a table listing returns, is now found. Text that is not a name is read as part of one, so it answers 404, and a path that does not parse (an unclosed quote, an empty part) answers 400. Ordinary names, quoted names and DuckDB file names such as `orders.csv` read as before, and the answer names the table as it was requested. BigQuery, which reads a table through its API, and `publisher` proxy connections, whose remote reads the path, are unchanged.
|
|
219
418
|
|
|
220
|
-
|
|
419
|
+
A `publisher` connection hands the table path to the Publisher it proxies to, which reads and quotes it there, so upgrade those remote Publishers along with this one. A DuckLake connection now places a quoted one- or two-part path under its catalog as it does an unquoted one.
|
|
221
420
|
|
|
222
|
-
|
|
421
|
+
([#2280](https://github.com/malloydata/publisher/pull/2280) by @kylenesbit)
|
|
223
422
|
|
|
224
|
-
|
|
423
|
+
#### Text that only looks like an extract no longer breaks a package that declares none
|
|
225
424
|
|
|
226
|
-
|
|
425
|
+
**[fix] A notebook that mentions `(extract)` no longer fails its package's load.** Any `.malloynb` holding the text `(extract)` anywhere, a markdown cell included, was refused as an `extract-in-notebook` finding, and the whole package failed to load. Now only an extract note in a code cell is refused, as Malloy reads one: not text in prose, a comment or a string.
|
|
426
|
+
|
|
427
|
+
**[fix] A model whose comment or tag only looks like `#(extract)` compiles again on the main thread.** A file holding `// #(extract …)` in a comment, a tag on another route such as `#(extract-later)`, or a malformed one such as `#(extract into=…)` loaded and queried, but `compile_model` (`POST …/compile`) refused it as "could not be loaded", as did every other compile that runs outside the load worker. A comment's `(extract)` did the same once the file was edited and not yet reloaded. Both the load's scan and those compiles now read a file as declaring an extract only when Malloy reads an extract note in it.
|
|
428
|
+
|
|
429
|
+
**[change] `#[extract]`, `#<extract>` and `#{extract}` declare an extract, as `#(extract)` does.** Malloy routes all four spellings to `extract`, and Publisher already enforced `#[authorize]` and the like as gates. These three spellings were not read as declarations by the load, and a compile outside the load worker refused the file instead. A package that uses one now binds it, or fails its load with the finding a miswritten `#(extract)` gets.
|
|
430
|
+
|
|
431
|
+
**[fix] A compile that reads a declaring file edited since the package loaded answers `424`, saying to reload, not a generic `500`.** Its extract targets are answered only from their copies, which are bound at load, so the file is never compiled live. The answer is the one a model that does not compile gets (`424`, with the file and "reload the package" in the message), and an MCP tool reports it with Malloy advice instead of an internal error. Everything else that sorts errors now reads it as a compile failure too: a materialization build that meets it is classed not retryable, the report lint counts it as a compile failure rather than reporting the lint incomplete, the package-load metrics label it `compilation_error`, and a `.malloynb` cell's `run:` that meets it is refused as not queryable.
|
|
432
|
+
|
|
433
|
+
**[fix] A package whose extract declarations cannot be bound fails its load with a `400`, not a retryable `503`.** The load answered `503` "Package-load worker pool unavailable: The package's #(extract) declarations cannot be bound: …", which told a client and a router to retry a load that fails the same way every time, and an MCP tool advised retrying. It now answers the declaration error itself: `400`, the same message without the prefix, Malloy advice over MCP, and a `/status` `loadErrors` entry whose message is that error, never `transient`. A version's rebind no longer retries it as a busy worker either. The load-failure `status` label on the package-load metrics moves from `pool_unavailable` to `policy_rejected`, the label every other `400` load refusal carries. A managed connection that cannot be looked up for now (a DuckLake catalog being replaced or lost, a DuckDB instance being replaced, a transient database error) is not miswritten: the load fails as that refusal, a retryable `503` that `/status` reports as `transient`, and only a name the environment does not have is refused as `extract-into-invalid`. Any other failure to look the connection up fails the load as itself.
|
|
434
|
+
|
|
435
|
+
**[fix] `compile_model` at `append` scope says why it cannot check a model whose extracts were bound from other text.** It answered `400` "the model could not be loaded to check it against". It now answers the same `424` a query does, naming the file and saying to reload the package.
|
|
436
|
+
|
|
437
|
+
**[fix] Storage file cleanup and extract generation expiry work at any snapshot count.** Past about 125,000 snapshots in a DuckLake destination's catalog under Node (about a million under Bun), both failed with "Maximum call stack size exceeded" before expiring anything. They now expire any number; 10,000 snapshots expire in one call in well under a second.
|
|
438
|
+
|
|
439
|
+
**[fix] An extract is never answered live because the load missed its declaration.** The load looked for declarations only in the package's listed `.malloy` files, and in what they import once one of them declared, and it read imports its own way. A declaration in a file imported under another name (`import "i.txt"`) or from a dot directory (`import ".hidden/i.malloy"`), imported in a triple-quoted string, or imported through the package's realpath (a linked package root, watch mode, macOS `/var`) could be compiled without being bound, and its target's readers then resolved through the managed connection, live. Now the load also follows the imports of every model and every notebook code cell, nested, whatever each imported file is named, so a declaration imported by a plain relative path binds, or fails the load with its finding. Whatever the load's scan misses, the compile's own file reader refuses: a file holding an extract note that the load did not bind fails the load with `[extract-invalid] declares an extract the package's load did not bind`, in the load worker, in every compile on the main thread, and in a served copy's compile, on the worker or inline. An import that leaves the package is still refused by the compile, and a malformed import (`import i.malloy`, an unterminated string) now fails with Malloy's syntax error instead of a retryable `503`.
|
|
440
|
+
|
|
441
|
+
**[fix] A linear report's tile is one query expression.** A tile runs as `run: <tile>`, so a tile whose text went on past the expression (an `import`, another statement, a definition) compiled that text too, outside what the report's model declares. Such a report is now refused at load: it shows no tiles, and the package carries a `notebook-cells-unreadable` error naming the tile, as for any other notebook the reader cannot show.
|
|
442
|
+
|
|
443
|
+
([#2271](https://github.com/malloydata/publisher/pull/2271) by @kylenesbit)
|
|
444
|
+
|
|
445
|
+
#### An extract note nothing can bind fails the load
|
|
446
|
+
|
|
447
|
+
**[change] Packages that loaded before can now fail to load: a `#(extract)` that no definition carries fails the load with `extract-invalid`.** A note on a `run:`, an import, a join, a field, a query stage, a view inside a query, or the model (`##(extract)`, a `##|(extract)` block) was ignored. Nothing was declared, so the target its author meant to copy was read through the managed connection, as any table is. The load now refuses it with a finding that says where the note sits and that an extract annotates a named query, a view, or a source written as a query, such as `#(extract) on a run: statement is not read: …`. Move the note onto one of those, or delete it. A note on a named query, a view or a query-shaped source declares as before, and a file with a syntax error gets Malloy's error, not this finding. See [Targets, and running them](docs/extracts.md#targets-and-running-them).
|
|
448
|
+
|
|
449
|
+
**[fix] A view declared in a join's own source is never read as a view of the outer source.** `#(extract)` on `view: v` inside `join_one: u is … extend { … }` was declared as the outer source's `s.v`. Its copy could not build when `s` has no view `v`; when `s` has one, it copied and served `s`'s view, which nothing annotated. Such a note is now refused as `#(extract) on a view inside a join`, so a package that relied on it fails to load.
|
|
450
|
+
|
|
451
|
+
([#2282](https://github.com/malloydata/publisher/pull/2282) by @kylenesbit)
|
|
452
|
+
|
|
453
|
+
#### DuckDB secrets created by a connection's setupSQL stay with that connection
|
|
454
|
+
|
|
455
|
+
**[fix] A secret a DuckDB connection's `setupSQL` creates is now visible only to that connection (pre-existing, 0.18.14 and earlier).** A `duckdb` connection that attaches databases runs its `setupSQL` before Publisher locks it down. A `CREATE PERSISTENT SECRET` (or `CREATE SECRET … IN local_file`) there was stored in a directory every such connection on the server, and later servers on the same host, also read. Each DuckDB instance now opens with a secret directory of its own, removed when the instance closes; a process exit (a shutdown or a crash) leaves it, and nothing reads it again. A persistent secret in `setupSQL` still works for the connection that created it, for as long as that connection is open; it is no longer kept across restarts or seen by any other connection. `setupSQL` is accepted only when `PUBLISHER_ALLOW_DUCKDB_SETUP_SQL` is set.
|
|
456
|
+
|
|
457
|
+
**When you upgrade:** nothing to change. Earlier versions kept those secrets in `publisher-duckdb/no-persistent-secrets` under the DuckDB temp directory (`PUBLISHER_DUCKDB_TEMP_DIRECTORY`, or the system temp directory). Publisher no longer reads it, and deletes it at startup (on Windows, delete it by hand).
|
|
458
|
+
|
|
459
|
+
([#2284](https://github.com/malloydata/publisher/pull/2284) by @kylenesbit)
|
|
460
|
+
|
|
461
|
+
#### An extract cannot read a DuckDB connection that has setupSQL
|
|
462
|
+
|
|
463
|
+
**[change] An extract that reads a DuckDB connection with any `setupSQL` is refused with `extract-connection-identity-incomplete`.** An extract's table name hashes the dataset each connection it reads reaches, and a DuckDB connection's `setupSQL` is not read for that yet: any statement in it, a comment included, could change which data a name reads. This includes `setupSQL` kept only as filler, such as `SELECT 1` on a connection that reads files or URLs. The finding says `<q> reads <conn>, whose setupSQL is not read for an extract's identity yet`. Read the data through the package's built-in `duckdb` connection, or attach it with the connection's `attachedDatabases`, or extract from another connection. A DuckDB connection with no `setupSQL` keeps its extracts' table names. See [The table's name](docs/extracts.md#the-tables-name).
|
|
464
|
+
|
|
465
|
+
([#2291](https://github.com/malloydata/publisher/pull/2291) by @kylenesbit)
|
|
466
|
+
|
|
467
|
+
#### The retired shared DuckDB secret directory is deleted at startup
|
|
468
|
+
|
|
469
|
+
**[change] At startup, Publisher deletes `publisher-duckdb/no-persistent-secrets` under the DuckDB temp directory (`PUBLISHER_DUCKDB_TEMP_DIRECTORY`, or the system temp directory).** Earlier versions kept secrets that a connection's `setupSQL` created there, and nothing reads that directory any more. The cleanup is best effort. It removes only that exact path, and only when it is a real directory owned by the server's user, never a symlink. It logs one line when the directory exists and never fails startup. On Windows it leaves the directory in place; delete it by hand.
|
|
470
|
+
|
|
471
|
+
([#2292](https://github.com/malloydata/publisher/pull/2292) by @kylenesbit)
|
|
472
|
+
|
|
473
|
+
#### A rollup, persisted view or persisted query in a file that declares an extract is served from its table
|
|
474
|
+
|
|
475
|
+
**[fix] A database-tier `#(rollup)`, `#@ persist` view or `#@ persist` query (`query:`) is now answered from its stored table when the file that declares it, or a file that imports it, also declares an `#(extract)`.** Before, the table was built, but every query on the source was answered live: the path report said `MISSING_FIELD` (`the query does not compile against the rollup`), and the log warned `A #(rollup) rollup variant did not compile` with `<file> is not the text its extracts were bound from`. The text Publisher generates over the stored table for the declaring file, and for each file that imports it, was checked as if it were an unreloaded edit of that file. It is now read as written. Every author file is still checked as before.
|
|
476
|
+
|
|
477
|
+
**Who is affected:** packages that declare an extract in the same file as a database-tier rollup, persisted view or persisted query, or in a file that imports one. **What to do:** nothing. Those queries are answered from the stored tables.
|
|
478
|
+
|
|
479
|
+
([#2293](https://github.com/malloydata/publisher/pull/2293) by @kylenesbit)
|
|
480
|
+
|
|
481
|
+
- **server:** the lockdown classifies whitespace as DuckDB does ([#2279](https://github.com/malloydata/publisher/pull/2279) by @kylenesbit)
|
|
482
|
+
|
|
483
|
+
### Other changes
|
|
227
484
|
|
|
228
|
-
- **
|
|
229
|
-
- **
|
|
485
|
+
- **server:** the unbound-extract realpath specs import by file URL, which Windows reads ([#2295](https://github.com/malloydata/publisher/pull/2295) by @kylenesbit)
|
|
486
|
+
- **server:** one materialization model for stored tables and extracts ([#2296](https://github.com/malloydata/publisher/pull/2296) by @kylenesbit)
|
|
230
487
|
|
|
231
488
|
Every release's notes: https://github.com/malloydata/publisher/releases
|