@malloy-publisher/server 0.9.10 → 0.9.12
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/dist/app/api-doc.yaml +121 -45
- package/dist/app/assets/{EnvironmentPage-DfL-2Fy5.js → EnvironmentPage-BFcCRfvE.js} +1 -1
- package/dist/app/assets/{HomePage-Cc5z85GD.js → HomePage-C0LnSonK.js} +1 -1
- package/dist/app/assets/MainPage-D3EM60u0.js +1 -0
- package/dist/app/assets/ModelPage-B1wvZV7r.js +2 -0
- package/dist/app/assets/PackagePage-QZ59dwip.js +1 -0
- package/dist/app/assets/RenderedResult-CDiXJAh9.es-C9BYYEfH.js +153 -0
- package/dist/app/assets/{RouteError-Bc7-ukP7.js → RouteError-v8LP_Q9x.js} +1 -1
- package/dist/app/assets/ThemeEditorPage-B5l2nzAq.js +1 -0
- package/dist/app/assets/ToggleButtonGroup-C6Lespxy.js +1 -0
- package/dist/app/assets/{documentRoutes-CvCc_EZs.js → documentRoutes-xv0fP4cS.js} +1 -1
- package/dist/app/assets/editPageMounted-COiBq84S.js +2 -0
- package/dist/app/assets/index-5On9Gkpl.js +480 -0
- package/dist/app/assets/{index-DugQbYOk.js → index-BG7MWz9o.js} +1 -1
- package/dist/app/assets/{index-DnRXl1Nu.js → index-Dynd6zeI.js} +1 -1
- package/dist/app/assets/{index-Ddy-NxB_.js → index-mIetEOsB.js} +1 -1
- package/dist/app/assets/index.es-FZZk_rEa.js +143 -0
- package/dist/app/index.html +1 -1
- package/dist/package_load_worker.mjs +128 -17
- package/dist/server.mjs +966 -647
- package/dist/sshcrypto-cqb52edz.node +0 -0
- package/package.json +2 -1
- package/dist/app/assets/MainPage-Cv63Ip_P.js +0 -1
- package/dist/app/assets/ModelPage-DvyYSgri.js +0 -2
- package/dist/app/assets/PackagePage-BDzBa7qB.js +0 -1
- package/dist/app/assets/RenderedResult-Dp1Qdajz.es-woQDtiv_.js +0 -153
- package/dist/app/assets/ThemeEditorPage-DShPXmlS.js +0 -1
- package/dist/app/assets/ToggleButtonGroup-WO-9ZUmS.js +0 -1
- package/dist/app/assets/index-BvSbJtsT.js +0 -483
- package/dist/app/assets/index.es-BhMC9nt1.js +0 -195
package/dist/app/index.html
CHANGED
|
@@ -16,7 +16,7 @@ SPDX-License-Identifier: MIT
|
|
|
16
16
|
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap"
|
|
17
17
|
/>
|
|
18
18
|
<title>Malloy Publisher</title>
|
|
19
|
-
<script type="module" crossorigin src="/assets/index-
|
|
19
|
+
<script type="module" crossorigin src="/assets/index-5On9Gkpl.js"></script>
|
|
20
20
|
<link rel="stylesheet" crossorigin href="/assets/index-DUqldpo0.css">
|
|
21
21
|
</head>
|
|
22
22
|
<body>
|
|
@@ -13053,15 +13053,36 @@ function filesystemAccessFailure(error) {
|
|
|
13053
13053
|
function isMysqlConfigFault(code) {
|
|
13054
13054
|
return typeof code === "string" && (MYSQL_CONFIG_CODES.has(code) || code.startsWith("HANDSHAKE_"));
|
|
13055
13055
|
}
|
|
13056
|
-
function
|
|
13057
|
-
|
|
13056
|
+
function isSqlserverConnectTimeout(error, code) {
|
|
13057
|
+
return code === "ETIMEOUT" && error.name === "ConnectionError";
|
|
13058
|
+
}
|
|
13059
|
+
function wrappedError(error) {
|
|
13060
|
+
if (error.cause instanceof Error)
|
|
13061
|
+
return error.cause;
|
|
13062
|
+
return error.originalError;
|
|
13063
|
+
}
|
|
13064
|
+
function causeChainHasTlsVerificationFailure(error) {
|
|
13065
|
+
let current = wrappedError(error);
|
|
13058
13066
|
for (let depth = 0;depth < 8 && current instanceof Error; depth++) {
|
|
13067
|
+
const { code } = current;
|
|
13068
|
+
if (typeof code === "string" && TLS_VERIFICATION_CODES.has(code)) {
|
|
13069
|
+
return true;
|
|
13070
|
+
}
|
|
13071
|
+
current = wrappedError(current);
|
|
13072
|
+
}
|
|
13073
|
+
return false;
|
|
13074
|
+
}
|
|
13075
|
+
function isConnectionFailure(error) {
|
|
13076
|
+
for (const current of causeChain(error)) {
|
|
13059
13077
|
const { code, fatal } = current;
|
|
13060
13078
|
if (typeof code === "string") {
|
|
13061
13079
|
if (NODE_CONNECTION_CODES.has(code))
|
|
13062
13080
|
return true;
|
|
13063
13081
|
if (POSTGRES_CONNECTION_SQLSTATE.test(code))
|
|
13064
13082
|
return true;
|
|
13083
|
+
if (SQLSERVER_CONNECTION_CODES.has(code) || isSqlserverConnectTimeout(current, code)) {
|
|
13084
|
+
return !causeChainHasTlsVerificationFailure(current);
|
|
13085
|
+
}
|
|
13065
13086
|
}
|
|
13066
13087
|
if (fatal === true && !isMysqlConfigFault(code))
|
|
13067
13088
|
return true;
|
|
@@ -13069,13 +13090,18 @@ function isConnectionFailure(error) {
|
|
|
13069
13090
|
if (CODELESS_CONNECTION_MESSAGES.some((re) => re.test(message))) {
|
|
13070
13091
|
return true;
|
|
13071
13092
|
}
|
|
13072
|
-
current = current.cause;
|
|
13073
13093
|
}
|
|
13074
13094
|
return false;
|
|
13075
13095
|
}
|
|
13076
|
-
function
|
|
13096
|
+
function* causeChain(error) {
|
|
13077
13097
|
let current = error;
|
|
13078
13098
|
for (let depth = 0;depth < 8 && current instanceof Error; depth++) {
|
|
13099
|
+
yield current;
|
|
13100
|
+
current = wrappedError(current);
|
|
13101
|
+
}
|
|
13102
|
+
}
|
|
13103
|
+
function isCredentialRejection(error) {
|
|
13104
|
+
for (const current of causeChain(error)) {
|
|
13079
13105
|
const { code } = current;
|
|
13080
13106
|
if (typeof code === "string" || typeof code === "number") {
|
|
13081
13107
|
const value = String(code);
|
|
@@ -13083,12 +13109,13 @@ function isCredentialRejection(error) {
|
|
|
13083
13109
|
return true;
|
|
13084
13110
|
if (MYSQL_AUTH_CODES.has(value))
|
|
13085
13111
|
return true;
|
|
13112
|
+
if (SQLSERVER_AUTH_CODES.has(value))
|
|
13113
|
+
return true;
|
|
13086
13114
|
if (SNOWFLAKE_AUTH_CODES.has(value))
|
|
13087
13115
|
return true;
|
|
13088
13116
|
}
|
|
13089
13117
|
if (current.name === "BigQueryAuthenticationError")
|
|
13090
13118
|
return true;
|
|
13091
|
-
current = current.cause;
|
|
13092
13119
|
}
|
|
13093
13120
|
return false;
|
|
13094
13121
|
}
|
|
@@ -13103,6 +13130,19 @@ function databaseAccessFailure(error) {
|
|
|
13103
13130
|
return new ConnectionFailedError(message);
|
|
13104
13131
|
return;
|
|
13105
13132
|
}
|
|
13133
|
+
function statementRejection(error) {
|
|
13134
|
+
for (const current of causeChain(error)) {
|
|
13135
|
+
const { code, severity } = current;
|
|
13136
|
+
if (severity === "FATAL" || severity === "PANIC")
|
|
13137
|
+
return;
|
|
13138
|
+
if (typeof code !== "string" || !POSTGRES_STATEMENT_SQLSTATES.has(code)) {
|
|
13139
|
+
continue;
|
|
13140
|
+
}
|
|
13141
|
+
const message = current.message;
|
|
13142
|
+
return code === POSTGRES_UNDEFINED_TABLE && POSTGRES_RELATION_MISSING.test(message) ? new TableNotFoundError(message) : new InvalidArgumentError(message);
|
|
13143
|
+
}
|
|
13144
|
+
return;
|
|
13145
|
+
}
|
|
13106
13146
|
function describeFilesystemAccessFailure(errno) {
|
|
13107
13147
|
const code = errno.code ?? "";
|
|
13108
13148
|
const target = errno.path ? ` '${errno.path}'` : "";
|
|
@@ -13242,7 +13282,7 @@ function toQueryTextProblem(problem) {
|
|
|
13242
13282
|
...problem.at ? { at: { range: problem.at.range } } : {}
|
|
13243
13283
|
};
|
|
13244
13284
|
}
|
|
13245
|
-
var GENERIC_INTERNAL_MESSAGE = "Internal server error.", GENERIC_UPSTREAM_MESSAGE = "Upstream connection error.", GENERIC_UNREACHABLE_MESSAGE = "The database connection is down: the database could not be reached, so the query did not run.", GENERIC_AUTH_MESSAGE = "The database rejected the connection's credentials. Check the connection's user, password, key or token.", MAX_LOGGED_DETAIL_CHARS = 2000, FILESYSTEM_ACCESS_DESCRIPTIONS, NODE_CONNECTION_CODES, POSTGRES_CONNECTION_SQLSTATE, CODELESS_CONNECTION_MESSAGES, MYSQL_CONFIG_CODES, POSTGRES_AUTH_SQLSTATE, MYSQL_AUTH_CODES, SNOWFLAKE_AUTH_CODES, NotImplementedError, BadRequestError, InvalidArgumentError, CompileRefusedError, InvalidModelPathError, RenderTagRefusedError, UnparseableTextError, EnvironmentNotFoundError, PackageNotFoundError, ModelNotFoundError, DashboardNotFoundError, SkillNotFoundError, AgentNotFoundError, ConflictError, ConnectionNotFoundError, TableNotFoundError, ConnectionError, ConnectionFailedError, UnconfiguredConnectionError, ConnectionPoolExhaustedError, DestinationNotFoundError, ConnectionAuthError, UnsupportedCatalogFormatError, ModelCompilationError, PackageManifestError, MaterializationEligibilityError, ChainedUpstreamMissingError, ChainedShapeNotCarriedError, PublisherConfigError, ServerConfigurationError, FrozenConfigError, AccessDeniedError, QueryCompileError, NotQueryableError, OffSurfaceError, MaterializationNotFoundError, MaterializationConflictError, WriteConflictError, WriteRolledBackError, WriteRollbackFailedError, WriteVerifyError, InvalidStateTransitionError, ServiceUnavailableError, PackageAdmissionRefusedError, PayloadTooLargeError, ResponseUnserializableError, QueryTimeoutError;
|
|
13285
|
+
var GENERIC_INTERNAL_MESSAGE = "Internal server error.", GENERIC_UPSTREAM_MESSAGE = "Upstream connection error.", GENERIC_UNREACHABLE_MESSAGE = "The database connection is down: the database could not be reached, so the query did not run.", GENERIC_AUTH_MESSAGE = "The database rejected the connection's credentials. Check the connection's user, password, key or token.", MAX_LOGGED_DETAIL_CHARS = 2000, FILESYSTEM_ACCESS_DESCRIPTIONS, NODE_CONNECTION_CODES, POSTGRES_CONNECTION_SQLSTATE, CODELESS_CONNECTION_MESSAGES, MYSQL_CONFIG_CODES, SQLSERVER_CONNECTION_CODES, TLS_VERIFICATION_CODES, POSTGRES_AUTH_SQLSTATE, MYSQL_AUTH_CODES, SQLSERVER_AUTH_CODES, SNOWFLAKE_AUTH_CODES, POSTGRES_STATEMENT_SQLSTATES, POSTGRES_UNDEFINED_TABLE = "42P01", POSTGRES_RELATION_MISSING, NotImplementedError, BadRequestError, InvalidArgumentError, CompileRefusedError, InvalidModelPathError, RenderTagRefusedError, UnparseableTextError, EnvironmentNotFoundError, PackageNotFoundError, ModelNotFoundError, DashboardNotFoundError, SkillNotFoundError, AgentNotFoundError, ConflictError, ConnectionNotFoundError, TableNotFoundError, ConnectionError, ConnectionFailedError, UnconfiguredConnectionError, ConnectionPoolExhaustedError, DestinationNotFoundError, ConnectionAuthError, UnsupportedCatalogFormatError, ModelCompilationError, PackageManifestError, MaterializationEligibilityError, ChainedUpstreamMissingError, ChainedShapeNotCarriedError, PublisherConfigError, ServerConfigurationError, FrozenConfigError, AccessDeniedError, QueryCompileError, NotQueryableError, OffSurfaceError, MaterializationNotFoundError, MaterializationConflictError, WriteConflictError, WriteRolledBackError, WriteRollbackFailedError, WriteVerifyError, InvalidStateTransitionError, ServiceUnavailableError, PackageAdmissionRefusedError, PayloadTooLargeError, ResponseUnserializableError, QueryTimeoutError;
|
|
13246
13286
|
var init_errors = __esm(() => {
|
|
13247
13287
|
init_constants();
|
|
13248
13288
|
init_logger();
|
|
@@ -13268,7 +13308,8 @@ var init_errors = __esm(() => {
|
|
|
13268
13308
|
/^(Error: )?Connection lost: The server closed the connection\.$/,
|
|
13269
13309
|
new RegExp(`^(Error: )?(connect|read|write|getaddrinfo) (${[
|
|
13270
13310
|
...NODE_CONNECTION_CODES
|
|
13271
|
-
].join("|")})\\b`)
|
|
13311
|
+
].join("|")})\\b`),
|
|
13312
|
+
/^Failed to connect to \S+( \(redirected from \S+\))?( in \d+ms| - (?!.*certificate).+)$/i
|
|
13272
13313
|
];
|
|
13273
13314
|
MYSQL_CONFIG_CODES = new Set([
|
|
13274
13315
|
"ER_ACCESS_DENIED_ERROR",
|
|
@@ -13277,9 +13318,46 @@ var init_errors = __esm(() => {
|
|
|
13277
13318
|
"AUTH_SWITCH_PLUGIN_ERROR",
|
|
13278
13319
|
"MYSQL_CLEAR_PASSWORD_NOT_ENABLED"
|
|
13279
13320
|
]);
|
|
13321
|
+
SQLSERVER_CONNECTION_CODES = new Set(["ESOCKET", "EINSTLOOKUP"]);
|
|
13322
|
+
TLS_VERIFICATION_CODES = new Set([
|
|
13323
|
+
"CERT_HAS_EXPIRED",
|
|
13324
|
+
"DEPTH_ZERO_SELF_SIGNED_CERT",
|
|
13325
|
+
"ERR_TLS_CERT_ALTNAME_INVALID",
|
|
13326
|
+
"SELF_SIGNED_CERT_IN_CHAIN",
|
|
13327
|
+
"UNABLE_TO_GET_ISSUER_CERT",
|
|
13328
|
+
"UNABLE_TO_GET_ISSUER_CERT_LOCALLY",
|
|
13329
|
+
"UNABLE_TO_VERIFY_LEAF_SIGNATURE"
|
|
13330
|
+
]);
|
|
13280
13331
|
POSTGRES_AUTH_SQLSTATE = /^28[0-9A-Z]{3}$/;
|
|
13281
13332
|
MYSQL_AUTH_CODES = new Set(["ER_ACCESS_DENIED_ERROR"]);
|
|
13333
|
+
SQLSERVER_AUTH_CODES = new Set(["ELOGIN"]);
|
|
13282
13334
|
SNOWFLAKE_AUTH_CODES = new Set(["390100", "390144", "390195", "390318"]);
|
|
13335
|
+
POSTGRES_STATEMENT_SQLSTATES = new Set([
|
|
13336
|
+
"42601",
|
|
13337
|
+
"42703",
|
|
13338
|
+
"42P01",
|
|
13339
|
+
"42883",
|
|
13340
|
+
"42704",
|
|
13341
|
+
"42P02",
|
|
13342
|
+
"42702",
|
|
13343
|
+
"42725",
|
|
13344
|
+
"42P09",
|
|
13345
|
+
"42P10",
|
|
13346
|
+
"42804",
|
|
13347
|
+
"42846",
|
|
13348
|
+
"42803",
|
|
13349
|
+
"42P20",
|
|
13350
|
+
"42P18",
|
|
13351
|
+
"42P19",
|
|
13352
|
+
"42712",
|
|
13353
|
+
"42701",
|
|
13354
|
+
"42602",
|
|
13355
|
+
"42622",
|
|
13356
|
+
"42809",
|
|
13357
|
+
"42P21",
|
|
13358
|
+
"42P22"
|
|
13359
|
+
]);
|
|
13360
|
+
POSTGRES_RELATION_MISSING = /^relation ".*" does not exist$/;
|
|
13283
13361
|
NotImplementedError = class NotImplementedError extends Error {
|
|
13284
13362
|
constructor(message) {
|
|
13285
13363
|
super(message);
|
|
@@ -21077,7 +21155,7 @@ ${body}`;
|
|
|
21077
21155
|
if (artifactAt < 0) {
|
|
21078
21156
|
return refuse({
|
|
21079
21157
|
line: 1,
|
|
21080
|
-
message: "Line 1: this notebook has no ## artifact note, so its header cannot be told from its cells. Fix: add `## artifact { layout=linear }` after the ##! line."
|
|
21158
|
+
message: "Line 1: this notebook has no ## artifact note, so its header cannot be told from its cells. Fix: add `## artifact { layout=linear tiles=[…] }` after the ##! line."
|
|
21081
21159
|
});
|
|
21082
21160
|
}
|
|
21083
21161
|
const runCount = items.filter((item) => item.kind === "statement" && item.run).length;
|
|
@@ -21277,12 +21355,14 @@ function readReportTag(modelNotes) {
|
|
|
21277
21355
|
const kind = tagText(artifact, "kind");
|
|
21278
21356
|
if (kind !== undefined)
|
|
21279
21357
|
return { status: "kind-removed", kind };
|
|
21280
|
-
const
|
|
21281
|
-
if (
|
|
21282
|
-
return { status: "
|
|
21283
|
-
|
|
21284
|
-
|
|
21285
|
-
|
|
21358
|
+
const hasTiles = artifact.has("tiles");
|
|
21359
|
+
if (hasTiles && artifact.array("tiles") === undefined)
|
|
21360
|
+
return { status: "unparsed" };
|
|
21361
|
+
const declared = tagText(artifact, "layout");
|
|
21362
|
+
const layout = parseLayoutValue(declared) ?? (hasTiles || tags?.tag("dashboard") !== undefined ? "grid" : "linear");
|
|
21363
|
+
if (layout === "linear" && !hasTiles)
|
|
21364
|
+
return declared !== undefined && parseLayoutValue(declared) === undefined ? { status: "cells-removed", unknownLayout: declared } : { status: "cells-removed" };
|
|
21365
|
+
return { status: "report", layout };
|
|
21286
21366
|
}
|
|
21287
21367
|
function readReportTagOfText(text) {
|
|
21288
21368
|
return readReportTag(modelNotesOfText(text));
|
|
@@ -23726,6 +23806,11 @@ function readGivenControlSpec(annotationTexts2) {
|
|
|
23726
23806
|
}
|
|
23727
23807
|
return spec;
|
|
23728
23808
|
}
|
|
23809
|
+
function givenDeclaresNoDefault(given) {
|
|
23810
|
+
const loose = given;
|
|
23811
|
+
const parsed = "default" in loose ? loose.default : loose._internal?.default;
|
|
23812
|
+
return parsed === undefined && loose._internal?.defaultText === undefined;
|
|
23813
|
+
}
|
|
23729
23814
|
function malloyGivenToApi(given) {
|
|
23730
23815
|
const type = given.type;
|
|
23731
23816
|
const renderedType = type.type === "filter expression" ? `filter<${type.filterType}>` : type.type === "array" && type.elementTypeDef?.type ? `${type.elementTypeDef.type}[]` : type.type;
|
|
@@ -23736,7 +23821,8 @@ function malloyGivenToApi(given) {
|
|
|
23736
23821
|
annotations: allNotes.filter((note) => !isReservedRoute(note.route) && note.route !== MARKDOWN_ROUTE).map((note) => note.text),
|
|
23737
23822
|
...readGivenControlSpec(allNotes.map((note) => note.text)),
|
|
23738
23823
|
...allNotes.some((note) => note.route === "secure") && { secure: true },
|
|
23739
|
-
default: given._internal?.defaultText
|
|
23824
|
+
default: given._internal?.defaultText,
|
|
23825
|
+
...givenDeclaresNoDefault(given) && { required: true }
|
|
23740
23826
|
};
|
|
23741
23827
|
}
|
|
23742
23828
|
function collectGivenRefs(value, into) {
|
|
@@ -23900,6 +23986,15 @@ class RpcWaitAccountant {
|
|
|
23900
23986
|
}
|
|
23901
23987
|
}
|
|
23902
23988
|
|
|
23989
|
+
// src/service/experimental_dialects.ts
|
|
23990
|
+
import { getDialect } from "@malloydata/malloy";
|
|
23991
|
+
var BUNDLED_EXPERIMENTAL_DIALECTS = ["sqlserver"];
|
|
23992
|
+
function acceptBundledExperimentalDialects() {
|
|
23993
|
+
for (const name of BUNDLED_EXPERIMENTAL_DIALECTS) {
|
|
23994
|
+
getDialect(name).acceptExperimental();
|
|
23995
|
+
}
|
|
23996
|
+
}
|
|
23997
|
+
|
|
23903
23998
|
// src/materialization_metrics.ts
|
|
23904
23999
|
var resetHooks = [];
|
|
23905
24000
|
function lazyCounter(name, description) {
|
|
@@ -23935,7 +24030,7 @@ var storageServeRoutingCounter = lazyCounter("publisher_storage_serve_routing_to
|
|
|
23935
24030
|
var storageTableRetainedCounter = lazyCounter("publisher_storage_tables_retained_total", "Tables a FAILED run left in a storage= destination and deliberately did not " + "reclaim, because the source is refreshed incrementally and the name may be " + "the one it serves from. Label: destination. Not all of these are orphans — " + "a rebuild at a fresh generational name is, a seed on the live serving name " + "is not, and the manifest entry cannot separate them — so read this as an " + "upper bound on what is accumulating rather than a leak count. It is the " + "only accounting there is until reclaiming a destination exists, which is " + "why it is a counter and not just a log line: the question is a rate, not " + "whether it ever happened.");
|
|
23936
24031
|
var storageBuildFailureCounter = lazyCounter("publisher_storage_build_failures_total", "storage= build failures (federation/passthrough/attach/CTAS), distinct from " + "in-warehouse build failures. Labels: destination (connection name), " + "reason ('build_failed'|'billed_read_not_captured'). The second is the " + "expensive one: the warehouse read ran and was charged, and the rows could " + "not be captured — so a re-drive pays for it again. Worth alerting on " + "separately from a failure that costs only a retry.");
|
|
23937
24032
|
var attributionSkippedCounter = lazyCounter("publisher_storage_build_attribution_skipped_total", "storage= builds whose warehouse read went out UNATTRIBUTED while tagging was " + "on. Label: reason ('job_listing_unavailable'|'tag_failed'|" + "'read_row_not_found'|'read_row_ambiguous'|'cost_query_failed'). " + "The read still ran and the " + "build still succeeded — what was lost is the label in the customer's own " + "query history, and the cost on this side. Without this an operator who " + "turns tagging on and sees nothing has a single log line to go on.");
|
|
23938
|
-
var eligibilityRefusedCounter = lazyCounter("publisher_materialization_eligibility_refused_total", "materialization-eligibility refusals, both tiers. Label: reason " + "('free_parameter'|'given_in_persisted_query'|'dynamic_projection'|" + "'dynamic_join'|'dynamic_joined_where'|'partition_without_storage'|" + "'partition_column_unknown'|'partition_column_not_public'|" + "'merge_key_scope_unresolved'|'preaggregate_over_dynamic_source'|" + "'authorize'|'partition'|'not_duckdb_portable'|" + "'public_surface_unknown'). 'given' is retained on the enum for records " + "that carry it and is no longer produced: where a given sits decides the " + "outcome, so one reason covering every placement cannot be raised.");
|
|
24033
|
+
var eligibilityRefusedCounter = lazyCounter("publisher_materialization_eligibility_refused_total", "materialization-eligibility refusals, both tiers. Label: reason " + "('free_parameter'|'given_in_persisted_query'|'dynamic_projection'|" + "'dynamic_join'|'dynamic_joined_where'|'partition_without_storage'|" + "'partition_column_unknown'|'partition_column_not_public'|" + "'merge_key_scope_unresolved'|'preaggregate_over_dynamic_source'|" + "'authorize'|'partition'|'not_duckdb_portable'|" + "'public_surface_unknown'|'read_only_dialect'). 'given' is retained on the enum for records " + "that carry it and is no longer produced: where a given sits decides the " + "outcome, so one reason covering every placement cannot be raised.");
|
|
23939
24034
|
var serveShapeTierDropCounter = lazyCounter("publisher_storage_serve_shape_tier_drop_total", "storage serve-shape compile escalations: a refinement tier failed to " + "compile and the riskiest category was dropped, or one or more lifted " + "entry points failed to compile and were dropped alone. Label: tier (the " + "failed tier index, 0=full; 'lifts' for dropped lifts).");
|
|
23940
24035
|
var serveShapeTypeFallbackCounter = lazyCounter("publisher_storage_serve_shape_type_fallback_total", "Captured DuckDB column types mapped to json in the serve shape (type " + "fidelity loss). Label: kind ('array'|'unrecognized').");
|
|
23941
24036
|
var chainedStorageBuildCounter = lazyCounter("publisher_storage_chained_build_total", "Chained storage= source builds (a source reading a storage-materialized " + "upstream). Label: outcome ('parent_reuse'|'inline_fallback'|" + "'strict_shape_fallback'|'strict_refused'|'infra_failure'). The " + "parent_reuse share is the headline signal for how far the " + "stack-on-the-parent path gets us vs recompute-from-raw.");
|
|
@@ -25124,7 +25219,16 @@ function assertMergeKeyScopeResolvable(persistSource, terms, annotationFields, w
|
|
|
25124
25219
|
message: `${what} cannot be materialized: it declares 'merge_key=' and is ` + `scoped by a term this pass cannot express as a predicate over the ` + `stored table's own columns (${unscopable.map((term) => `'${term.code}'`).join(", ")}). An incremental refresh matches rows by the merge ` + `key, and the stored table holds every caller's rows, so the match ` + `must also carry the scoping columns or it would update rows ` + `belonging to other callers. Scope this source with a term over its ` + `own columns, or drop 'merge_key=' to refresh by watermark range.`
|
|
25125
25220
|
});
|
|
25126
25221
|
}
|
|
25222
|
+
var READ_ONLY_DIALECTS = new Set(["sqlserver"]);
|
|
25127
25223
|
function assertColocatedPersistNotAuthorizeGated(persistSource, sourceName = persistSource.name, origin = "persist", gateOutcome, annotationFields = {}) {
|
|
25224
|
+
if (!annotationFields.storage && READ_ONLY_DIALECTS.has(persistSource.dialectName)) {
|
|
25225
|
+
recordEligibilityRefused("read_only_dialect");
|
|
25226
|
+
const what2 = origin === "preaggregate" ? `Pre-aggregation rollup '${sourceName}'` : `Source '${sourceName}'`;
|
|
25227
|
+
throw new MaterializationEligibilityError({
|
|
25228
|
+
reason: "read_only_dialect",
|
|
25229
|
+
message: `${what2} cannot be materialized (colocated '#@ persist'): its ` + `connection '${persistSource.connectionName}' is on the ` + `'${persistSource.dialectName}' dialect, whose connection is ` + `read-only and creates no tables, so there is nowhere in the ` + `source warehouse to write the result. The source serves live. ` + `Remove the annotation, or persist a source on a connection that ` + `can write.`
|
|
25230
|
+
});
|
|
25231
|
+
}
|
|
25128
25232
|
const partition = resolvePartitionColumns(persistSource, annotationFields);
|
|
25129
25233
|
if (!partition.ok) {
|
|
25130
25234
|
recordEligibilityRefused(partition.reason);
|
|
@@ -25859,6 +25963,7 @@ function collectColocatedSourceEligibility(compiled) {
|
|
|
25859
25963
|
if (!parentPort) {
|
|
25860
25964
|
throw new Error("package_load_worker.ts must be loaded inside a worker_threads Worker");
|
|
25861
25965
|
}
|
|
25966
|
+
acceptBundledExperimentalDialects();
|
|
25862
25967
|
var port = parentPort;
|
|
25863
25968
|
var nextRpcId = 0;
|
|
25864
25969
|
var pendingRpc = new Map;
|
|
@@ -26381,7 +26486,13 @@ async function prepareForMainThread(job, malloyConfig, load, model) {
|
|
|
26381
26486
|
const pastDeadline = () => performance.now() >= load.softDeadline;
|
|
26382
26487
|
const { modelPath, materializer, importBaseURL } = model;
|
|
26383
26488
|
const renderTagResults = [];
|
|
26384
|
-
|
|
26489
|
+
const targets = renderTagTargets(model.queries, model.sources);
|
|
26490
|
+
if (targets.length > 0 && !load.failed && !pastDeadline()) {
|
|
26491
|
+
try {
|
|
26492
|
+
model.model.queryModel;
|
|
26493
|
+
} catch {}
|
|
26494
|
+
}
|
|
26495
|
+
for (const target of targets) {
|
|
26385
26496
|
if (load.failed || pastDeadline())
|
|
26386
26497
|
break;
|
|
26387
26498
|
try {
|