@substrat-run/control-plane-api 0.206.0 → 0.207.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/dist/api.d.ts.map +1 -1
- package/dist/api.js +80 -4
- package/dist/api.js.map +1 -1
- package/dist/vertical-client.d.ts +31 -3
- package/dist/vertical-client.d.ts.map +1 -1
- package/dist/vertical-client.js +54 -11
- package/dist/vertical-client.js.map +1 -1
- package/package.json +10 -10
package/dist/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2D,KAAK,kBAAkB,EAAoB,KAAK,cAAc,EAAwB,MAAM,yBAAyB,CAAC;AACxL,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAI9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AAE9G,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EA8BL,KAAK,qBAAqB,
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2D,KAAK,kBAAkB,EAAoB,KAAK,cAAc,EAAwB,MAAM,yBAAyB,CAAC;AACxL,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAI9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AAE9G,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EA8BL,KAAK,qBAAqB,EA8F1B,CAAC,EAkBD,KAAK,cAAc,EAEnB,KAAK,uBAAuB,EAK7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAOV,UAAU,EACV,kBAAkB,EAGlB,wBAAwB,EACxB,o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uGAAuG;IACvG,gBAAgB,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;KAAE,CAAC;IACtF;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAkHF,wFAAwF;AACxF,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAGxC,uFAAuF;AACvF,eAAO,MAAM,sBAAsB,QAEmC,CAAC;AAsavE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;iBASzB,CAAC;AAqCH,yFAAyF;AACzF,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAgI7C,8FAA8F;AAC9F,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAehD;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,EAAE,MAKxC,CAAC;AAgBJ;;;GAGG;AACH,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAmCzC,KAAK,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAkMjE;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAEvF;AAwCD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAAE,SAAS,EAAE,IAAI,CAAA;CAAE,CAAC,CA26YhG"}
|
package/dist/api.js
CHANGED
|
@@ -4,7 +4,7 @@ import { PREVIEW_CONNECTIONS_REFUSAL } from './connection-relay.js';
|
|
|
4
4
|
import { bindingChangeRefusal, bindingOptionsRefusal, connectionBindingOptions, refusesBindingChange } from './connection-binding-options.js';
|
|
5
5
|
import { resolveObservabilityWindow } from './observability-window.js';
|
|
6
6
|
import { Hono } from 'hono';
|
|
7
|
-
import { MARKUP_SEED, MARKUP_SEED_EFFECTIVE_FROM, markupPercentFor, markupRowInput, permissionKey, parseHostname, withLabel, RESERVED_LABEL_SEPARATOR, adminAction, lakeEventsInput, ownerTransferInput, memberInviteInput, memberRoleInput, ASSET_PART_PREFIX, assetHash, STORE_DRIVERS, storeDriverErasesSubjects, storeDriverServesVertical, storeCatalogOperation, storeDriverBasisAdmits, channelName, connectLinkId, connectionActivity, connectionActivitySource, connectionCredential, connectionCertificate, connectionFilter, connectionHealthState, connectionProvider, connectorDispatchKind, PROVISION_SIBLING_KIND, ARCHIVE_SCOPE_KIND, PROVISION_TENANT_KIND, SET_ENTITLEMENTS_KIND, MODEL_USAGE_KIND, SWEEP_RUNS_KIND, toConnectionHealthEntry, CONNECTION_EXPIRY_WARNING_DAYS, CONNECTION_STALE_DAYS, connectionProbe, connectionSendTest, connectionSendTestResult, connectionSenders, createTenantInput, entitlementGrantInput, hostname as hostnameSchema, hostnameRegion, hostnameStatus, identityLink, errorCode, issueStatus, issueStatusInput, FINDINGS_LIMIT_DEFAULT, FINDINGS_LIMIT_MAX, findingCursorOf, findingKind, findingRuleInput, findingStatus, findingStatusInput, listPageQuery, matchesOutboundHost, pageOf, platformRequestFilter, principalId as principalIdSchema, impersonationStamp, promotionAcknowledgement, bindAcknowledgement, rebindAcknowledgement, provisionableJurisdiction, publishVersionInput, queryScopeInput, readScopeTableInput, entityHistoryInput, eventFacetInput, eventCauseInput, eventEffectsInput, invocationEventsInput, deadLettersInput, lifecycleFlowInput, operationSeriesCount, operationSeriesInput, delegatedReadParams, createOrgInput, roleKey as roleKeySchema, peerSwitch, verticalSlug, scopeText, systemSwitch, DEFAULT_DENIAL_LIMIT, DENIAL_LIMIT_MAX, denialGroupBy, registerVerticalInput, platformScriptCollision, platformScriptRefusal, PLATFORM_SCRIPT_NAMES, serviceDimensions, sweepRunKind, sweepRunOutcome, scopeDump, mergeDumpPages, dataSubjectId as dataSubjectIdSchema, scopeId as scopeIdSchema, scopeStatus, requestRollupReading, costRollupReading, costAttribution, cloudflareUsageDay, meterDaysReading, verticalOwnersReading, utcDay, storageShape, surfaceName, modelUsageLine, tenantId as tenantIdSchema, tenantStatus, versionOrigin, z, PROBLEM_CONTENT_TYPE, toProblem, validationIssuesFrom, redrainEventsInput, importCursorMove, importCursorAcknowledgementMissing, REDRAIN_BATCH, migrationsOnTop, substratError, errorCodeOf, envVarSpec, capabilityFilterQuery, capabilityId as capabilityIdSchema, PLATFORM_FEATURES_HEADER, PLATFORM_FEATURE_SCOPE_SWEEPER, PLATFORM_FEATURE_SOURCE_BUILDS, SOCIAL_RELAY_VERTICALS, isVerticalConnectorProvider, previewTag, buildPreviewTagPrefix, } from '@substrat-run/contracts';
|
|
7
|
+
import { MARKUP_SEED, MARKUP_SEED_EFFECTIVE_FROM, markupPercentFor, markupRowInput, permissionKey, parseHostname, withLabel, RESERVED_LABEL_SEPARATOR, adminAction, lakeEventsInput, ownerTransferInput, memberInviteInput, memberRoleInput, ASSET_PART_PREFIX, assetHash, STORE_DRIVERS, storeDriverErasesSubjects, storeDriverServesVertical, storeCatalogOperation, storeDriverBasisAdmits, channelName, connectLinkId, connectionActivity, connectionActivitySource, connectionCredential, connectionCertificate, connectionFilter, connectionHealthState, connectionProvider, connectorDispatchKind, PROVISION_SIBLING_KIND, ARCHIVE_SCOPE_KIND, PROVISION_TENANT_KIND, SET_ENTITLEMENTS_KIND, MODEL_USAGE_KIND, SWEEP_RUNS_KIND, toConnectionHealthEntry, CONNECTION_EXPIRY_WARNING_DAYS, CONNECTION_STALE_DAYS, connectionProbe, connectionSendTest, connectionSendTestResult, connectionSenders, createTenantInput, entitlementGrantInput, hostname as hostnameSchema, hostnameRegion, hostnameStatus, identityLink, errorCode, issueStatus, issueStatusInput, FINDINGS_LIMIT_DEFAULT, FINDINGS_LIMIT_MAX, findingCursorOf, findingKind, findingRuleInput, findingStatus, findingStatusInput, listPageQuery, matchesOutboundHost, pageOf, platformRequestFilter, principalId as principalIdSchema, impersonationStamp, promotionAcknowledgement, bindAcknowledgement, rebindAcknowledgement, provisionableJurisdiction, publishVersionInput, queryScopeInput, readScopeTableInput, entityHistoryInput, eventFacetInput, eventCauseInput, eventEffectsInput, invocationEventsInput, deadLettersInput, lifecycleFlowInput, operationSeriesCount, operationSeriesInput, delegatedReadParams, createOrgInput, roleKey as roleKeySchema, peerSwitch, verticalSlug, scopeText, systemSwitch, DEFAULT_DENIAL_LIMIT, DENIAL_LIMIT_MAX, denialGroupBy, registerVerticalInput, platformScriptCollision, platformScriptRefusal, PLATFORM_SCRIPT_NAMES, serviceDimensions, sweepRunKind, sweepRunOutcome, scopeDump, mergeDumpPages, dataSubjectId as dataSubjectIdSchema, scopeId as scopeIdSchema, scopeDumpSample, scopeStatus, requestRollupReading, costRollupReading, costAttribution, cloudflareUsageDay, meterDaysReading, verticalOwnersReading, utcDay, storageShape, surfaceName, modelUsageLine, tenantId as tenantIdSchema, tenantStatus, versionOrigin, z, PROBLEM_CONTENT_TYPE, toProblem, validationIssuesFrom, redrainEventsInput, importCursorMove, importCursorAcknowledgementMissing, REDRAIN_BATCH, migrationsOnTop, substratError, errorCodeOf, envVarSpec, capabilityFilterQuery, capabilityId as capabilityIdSchema, PLATFORM_FEATURES_HEADER, PLATFORM_FEATURE_SCOPE_SWEEPER, PLATFORM_FEATURE_SOURCE_BUILDS, SOCIAL_RELAY_VERTICALS, isVerticalConnectorProvider, previewTag, buildPreviewTagPrefix, } from '@substrat-run/contracts';
|
|
8
8
|
import { upstreamHandleIn, upstreamReferenceOf, withUpstreamReference } from '@substrat-run/contracts';
|
|
9
9
|
import { mailInAddressAct, mailInStanding } from '@substrat-run/contracts';
|
|
10
10
|
import { ENGINE_ENTITLEMENT_KEYS, bareSlug, declarableEntitlementKey, entitlementNamespaceRefusal, grantableEntitlements } from '@substrat-run/contracts';
|
|
@@ -556,6 +556,16 @@ const createPreviewBody = z.object({
|
|
|
556
556
|
// never starts one: it answers the copy's progress, finishes it once it is done, or says it is gone.
|
|
557
557
|
// A call after a 202 naming another push's copy (one being finished) is not a poll: it may start its own.
|
|
558
558
|
poll: z.boolean().optional(),
|
|
559
|
+
// #3232: a fork copies a SAMPLE of its source: the newest `sample` rows of each table, among those
|
|
560
|
+
// whose parents it keeps, and the spine that follows them. A fresh fork only: a push to an existing
|
|
561
|
+
// preview carries the preview's own data, whatever it was forked as.
|
|
562
|
+
sample: scopeDumpSample.shape.rows.optional(),
|
|
563
|
+
// #3232: the cost cap. A fresh fork estimates the rows it would copy before it copies anything, and
|
|
564
|
+
// is refused (413, the estimate in the refusal) above `maxRows`.
|
|
565
|
+
maxRows: z.number().int().positive().optional(),
|
|
566
|
+
// #3232: with `maxRows`, a fork over the cap copies a sample of this many rows per table instead of
|
|
567
|
+
// being refused, and is refused only when that sample is over the cap too.
|
|
568
|
+
sampleOverCap: scopeDumpSample.shape.rows.optional(),
|
|
559
569
|
});
|
|
560
570
|
const listRolesQuery = z.object({
|
|
561
571
|
tenantId: tenantIdSchema.optional(),
|
|
@@ -10734,6 +10744,52 @@ export function createControlPlaneApi(options) {
|
|
|
10734
10744
|
const handle = tenant?.slug ?? tenantId;
|
|
10735
10745
|
return `${slug.split('/').at(-1)}-${handle}.${jurisdiction}.${baseDomain}`;
|
|
10736
10746
|
};
|
|
10747
|
+
/** #3232: a sample asked of a scope this control plane holds itself, whose host copies only whole. */
|
|
10748
|
+
const sampleNeedsVertical = (scopeId) => new ControlPlaneError(409, `scope ${scopeId} is held by the control plane's own host, which copies a scope only whole (#3232). Nothing was copied.`);
|
|
10749
|
+
/**
|
|
10750
|
+
* #3232: what a fresh fork copies, decided before it copies anything. With `maxRows`, the copy is
|
|
10751
|
+
* estimated at its source first (rows, per table): at or under the cap it copies as asked, over it
|
|
10752
|
+
* it copies `sampleOverCap` instead when that sample fits, and is otherwise refused (413) with the
|
|
10753
|
+
* estimate, the cap and the largest tables in the refusal. A source that cannot estimate (a
|
|
10754
|
+
* deployment that predates it) is copied as asked, ungated, and the note says so: the size gate
|
|
10755
|
+
* (`COPY_MAX_BYTES`) treats an unknown size the same way.
|
|
10756
|
+
*/
|
|
10757
|
+
const forkCopyPlan = async (c, source, opts) => {
|
|
10758
|
+
const sampleNote = (rows, estimate) => `Data: a sample of production, the newest ${rows} rows of each table and what they reference` +
|
|
10759
|
+
`${estimate === undefined ? '' : ` (about ${estimate} rows)`}, not a whole copy.`;
|
|
10760
|
+
if (opts.maxRows === undefined)
|
|
10761
|
+
return opts.sample === undefined ? { note: null } : { sample: opts.sample, note: sampleNote(opts.sample) };
|
|
10762
|
+
const cap = opts.maxRows;
|
|
10763
|
+
const client = await verticalForScope(c, source);
|
|
10764
|
+
const estimate = (sample) => client ? retryTransient(() => client.estimateScopeCopy(source.id, sample === undefined ? {} : { sample })) : Promise.resolve('predates');
|
|
10765
|
+
const asked = opts.sample;
|
|
10766
|
+
const first = await estimate(asked);
|
|
10767
|
+
if (first === 'predates') {
|
|
10768
|
+
return {
|
|
10769
|
+
...(asked === undefined ? {} : { sample: asked }),
|
|
10770
|
+
note: `Data: the copy could not be estimated (its source predates estimates, #3232), so the --max-rows cap of ${cap} was not applied.`,
|
|
10771
|
+
};
|
|
10772
|
+
}
|
|
10773
|
+
if (first.rows <= cap) {
|
|
10774
|
+
return asked === undefined ? { note: `Data: a whole copy of production, about ${first.rows} rows (cap ${cap}).` } : { sample: asked, note: sampleNote(asked, first.rows) };
|
|
10775
|
+
}
|
|
10776
|
+
const largest = [...first.tables].sort((a, b) => b.rows - a.rows).slice(0, 3).map((t) => `${t.name} ${t.rows}`).join(', ');
|
|
10777
|
+
if (asked === undefined && opts.sampleOverCap !== undefined) {
|
|
10778
|
+
const fallback = await estimate(opts.sampleOverCap);
|
|
10779
|
+
if (fallback !== 'predates' && fallback.rows <= cap) {
|
|
10780
|
+
return {
|
|
10781
|
+
sample: opts.sampleOverCap,
|
|
10782
|
+
note: `${sampleNote(opts.sampleOverCap, fallback.rows)} A whole copy would move about ${first.rows} rows, over the cap of ${cap}.`,
|
|
10783
|
+
};
|
|
10784
|
+
}
|
|
10785
|
+
throw new ControlPlaneError(413, `a copy of scope ${source.id} would move about ${first.rows} rows, and a sample of ${opts.sampleOverCap} rows per table ` +
|
|
10786
|
+
`${fallback === 'predates' ? 'could not be estimated' : `about ${fallback.rows}`}: over the cap of ${cap} rows (--max-rows). ` +
|
|
10787
|
+
`Largest tables: ${largest}. Nothing was copied (#3232). Lower --sample-over-cap, or raise --max-rows.`);
|
|
10788
|
+
}
|
|
10789
|
+
throw new ControlPlaneError(413, `a ${asked === undefined ? 'copy' : `sample of ${asked} rows per table`} of scope ${source.id} would move about ${first.rows} rows, ` +
|
|
10790
|
+
`over the cap of ${cap} rows (--max-rows). Largest tables: ${largest}. Nothing was copied (#3232). ` +
|
|
10791
|
+
(asked === undefined ? 'Pass --sample <n> to copy the newest n rows of each table instead, or raise --max-rows.' : 'Pass a smaller --sample, or raise --max-rows.'));
|
|
10792
|
+
};
|
|
10737
10793
|
const orchestratedPreview = async (c, tenantId, slug,
|
|
10738
10794
|
// A FORK copies this scope's data; `null` provisions an empty clean-room scope (#509 (b)).
|
|
10739
10795
|
source, opts) => {
|
|
@@ -11007,8 +11063,11 @@ export function createControlPlaneApi(options) {
|
|
|
11007
11063
|
'Anyone on the team can, once signed in to Substrat.',
|
|
11008
11064
|
};
|
|
11009
11065
|
};
|
|
11066
|
+
/** #3232: what this create decided to copy, said where the person pushing reads it. */
|
|
11067
|
+
let copyNote = null;
|
|
11010
11068
|
const notesFor = (parent) => parent
|
|
11011
11069
|
? [
|
|
11070
|
+
...(copyNote ? [copyNote] : []),
|
|
11012
11071
|
"Settings: only non-secret Env tab settings explicitly declared for preview carryover are delivered; " +
|
|
11013
11072
|
"other settings use the deployment's defaults.",
|
|
11014
11073
|
]
|
|
@@ -11405,6 +11464,11 @@ export function createControlPlaneApi(options) {
|
|
|
11405
11464
|
],
|
|
11406
11465
|
};
|
|
11407
11466
|
}
|
|
11467
|
+
// #3232: a fresh fork decides what it copies (whole, or a sample) before anything is reaped or
|
|
11468
|
+
// provisioned, so a fork refused for its cost leaves the preview it would replace in place.
|
|
11469
|
+
const copyPlan = source && !poll ? await forkCopyPlan(c, source, opts) : { note: null };
|
|
11470
|
+
copyNote = copyPlan.note;
|
|
11471
|
+
const sampled = copyPlan.sample === undefined ? {} : { sample: copyPlan.sample };
|
|
11408
11472
|
// Free the tag: the slug is unique per tenant and the `--<tag>` hostname is still bound
|
|
11409
11473
|
// to the old row, so the fresh fork below cannot be provisioned until this one is gone.
|
|
11410
11474
|
// A marked row is also the GC sweep's to reap (its `expiresAt` has passed), so the sweep
|
|
@@ -11453,11 +11517,16 @@ export function createControlPlaneApi(options) {
|
|
|
11453
11517
|
// restore blip reloads the same stage and an export fault is not recorded as a restore's.
|
|
11454
11518
|
forkData = sourceClient
|
|
11455
11519
|
? async () => {
|
|
11456
|
-
const moved = await transferScope(sourceClient, target, { from: source.id, to: previewId }, { retry: retryTransient, stamp: false, maxBytes: copyMaxBytes });
|
|
11520
|
+
const moved = await transferScope(sourceClient, target, { from: source.id, to: previewId }, { retry: retryTransient, stamp: false, maxBytes: copyMaxBytes, ...sampled });
|
|
11457
11521
|
refuseWipedSource(moved.meta, source.id);
|
|
11458
11522
|
return moved.dump;
|
|
11459
11523
|
}
|
|
11460
|
-
: async () =>
|
|
11524
|
+
: async () => {
|
|
11525
|
+
// #3232: this control plane's own host copies only whole; a sample asked for is never quietly dropped.
|
|
11526
|
+
if (copyPlan.sample !== undefined)
|
|
11527
|
+
throw sampleNeedsVertical(source.id);
|
|
11528
|
+
return canonical.tables;
|
|
11529
|
+
};
|
|
11461
11530
|
// Directory row FIRST as `provisioning` (K-31 two-phase): a crash before the data
|
|
11462
11531
|
// copy leaves an inert row that — carrying `forkedFrom` + `expiresAt` — the GC sweep
|
|
11463
11532
|
// reaps, never copied data with no record.
|
|
@@ -11533,7 +11602,7 @@ export function createControlPlaneApi(options) {
|
|
|
11533
11602
|
if (forkPaged && jobs && move && targetRef && target) {
|
|
11534
11603
|
// #2450 step 2: the first page moves here. A fork that needs more moves in a job, and a
|
|
11535
11604
|
// later call to this route finishes it (`finishForkJob`); the row stays `provisioning`.
|
|
11536
|
-
const begun = await beginTransfer({ source: forkPaged.source, dest: target }, { from: forkPaged.sourceScopeId, to: previewId }, { retry: retryTransient, stamp: false, alwaysStage: true, maxBytes: copyMaxBytes });
|
|
11605
|
+
const begun = await beginTransfer({ source: forkPaged.source, dest: target }, { from: forkPaged.sourceScopeId, to: previewId }, { retry: retryTransient, stamp: false, alwaysStage: true, maxBytes: copyMaxBytes, ...sampled });
|
|
11537
11606
|
if ('state' in begun) {
|
|
11538
11607
|
const staged = begun.state;
|
|
11539
11608
|
const ends = { source: forkPaged.source, dest: target };
|
|
@@ -11705,6 +11774,13 @@ export function createControlPlaneApi(options) {
|
|
|
11705
11774
|
if (body.seed && !body.empty) {
|
|
11706
11775
|
return refuse(c, 'validation_failed', 'seed needs empty: a sample world is seated only in a clean-room preview');
|
|
11707
11776
|
}
|
|
11777
|
+
// #3232: a sample and a cap shape a FORK's copy; a clean room copies nothing.
|
|
11778
|
+
if (body.empty && (body.sample !== undefined || body.maxRows !== undefined || body.sampleOverCap !== undefined)) {
|
|
11779
|
+
return refuse(c, 'validation_failed', 'sample, maxRows and sampleOverCap shape a fork\'s copy; a clean-room preview copies nothing');
|
|
11780
|
+
}
|
|
11781
|
+
if (body.sampleOverCap !== undefined && (body.maxRows === undefined || body.sample !== undefined)) {
|
|
11782
|
+
return refuse(c, 'validation_failed', 'sampleOverCap needs maxRows, and replaces sample: pass sample to always copy a sample');
|
|
11783
|
+
}
|
|
11708
11784
|
if (body.seed && !options.personaIssuer) {
|
|
11709
11785
|
return refuse(c, 'unavailable', 'this control plane runs no persona issuer, so it cannot sign a seeded preview in');
|
|
11710
11786
|
}
|