@substrat-run/control-plane-api 0.199.0 → 0.200.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 +21 -0
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +19 -11
- package/dist/api.js.map +1 -1
- package/dist/connection-binding-relay.d.ts +5 -0
- package/dist/connection-binding-relay.d.ts.map +1 -1
- package/dist/connection-binding-relay.js +34 -10
- package/dist/connection-binding-relay.js.map +1 -1
- package/dist/connection-relay.d.ts +19 -0
- package/dist/connection-relay.d.ts.map +1 -1
- package/dist/connection-relay.js +55 -9
- package/dist/connection-relay.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/observability.d.ts +3 -2
- package/dist/observability.d.ts.map +1 -1
- package/dist/observability.js +3 -2
- package/dist/observability.js.map +1 -1
- package/dist/vertical-client.d.ts +23 -1
- package/dist/vertical-client.d.ts.map +1 -1
- package/dist/vertical-client.js +37 -0
- package/dist/vertical-client.js.map +1 -1
- package/dist/vertical-connectors.d.ts.map +1 -1
- package/dist/vertical-connectors.js +17 -22
- package/dist/vertical-connectors.js.map +1 -1
- package/package.json +10 -9
package/dist/api.d.ts
CHANGED
|
@@ -79,6 +79,20 @@ export interface ConnectionInspector {
|
|
|
79
79
|
* An `expiresAt` of `null` clears the connection's expiry (`ConnectionCandidatePrepare`).
|
|
80
80
|
*/
|
|
81
81
|
prepareCandidate?: ConnectionCandidatePrepare;
|
|
82
|
+
/**
|
|
83
|
+
* #3211: this provider's connections are keyed on the account `probeCandidate` names, not on a
|
|
84
|
+
* field of the pasted credential: a key for the same account rotates its connection, a key for
|
|
85
|
+
* another account becomes a second one (`ConnectionAccountFromProbe`). Set only where the probe
|
|
86
|
+
* always names the account and the connector opens a connection by it.
|
|
87
|
+
*/
|
|
88
|
+
accountFromProbe?: true;
|
|
89
|
+
/**
|
|
90
|
+
* #3201: this provider's connector opens a scope's OWN connection wherever it opens one (the
|
|
91
|
+
* registration's `scopeOwned`), so `probe` and `credential` open the row they are handed, owner
|
|
92
|
+
* included. Absent, a scope's own connection reads as absent on the tenant's inspection routes,
|
|
93
|
+
* because the connector would open the tenant's connection instead.
|
|
94
|
+
*/
|
|
95
|
+
scopeOwned?: true;
|
|
82
96
|
/**
|
|
83
97
|
* The PUBLIC certificate the connection authenticates with, for the tenant to register on
|
|
84
98
|
* the provider's side (#2100). `null` when this connection uses none (a client secret).
|
|
@@ -198,6 +212,13 @@ export interface ControlPlaneApiOptions {
|
|
|
198
212
|
/** #1722: how long a copy move owns its ledger entries, and so how long its restore may land
|
|
199
213
|
* (`CopyRestoreFence`). `SCOPE_COPY_LEASE_MS` unless a test needs a lease it can outlive. */
|
|
200
214
|
copyLeaseMs?: number;
|
|
215
|
+
/**
|
|
216
|
+
* #2450: the largest scope a copy into a scope's store starts on (a carry, an adopt or rebind onto
|
|
217
|
+
* serving, a fork, a kept copy restored forward), read as the source's database size.
|
|
218
|
+
* `COPY_MAX_BYTES` unless a test needs a smaller one. A larger scope is refused (413) with its
|
|
219
|
+
* size before any page moves, rather than failing at the destination's commit.
|
|
220
|
+
*/
|
|
221
|
+
copyMaxBytes?: number;
|
|
201
222
|
/**
|
|
202
223
|
* #2446: the most scopes one promote reads the role state of (`ROLE_STATE_SCOPE_CAP` unless a
|
|
203
224
|
* test needs a smaller one). A promote that would move more is refused, retryable, rather than
|
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,EAA+C,KAAK,kBAAkB,EAAoB,KAAK,cAAc,EAAwB,MAAM,yBAAyB,CAAC;AAC5K,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAI9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,2BAA2B,EAAE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gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,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;AAwZvE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;iBASzB,CAAC;AAqCH,yFAAyF;AACzF,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAuI7C,eAAO,MAAM,4BAA4B,KAAK,CAAC;AAmC/C,KAAK,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAyLjE;;;;;;;;;;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,CA64XhG"}
|
package/dist/api.js
CHANGED
|
@@ -14,7 +14,7 @@ import { BIND_EXPORT_BREAK_REFUSAL, CARRIED_AWAY_KEY, bindExportBreakRefusal, ca
|
|
|
14
14
|
import { TENANT_HEADER, confinedTenant } from './auth.js';
|
|
15
15
|
import { mintTenantToken } from './tenant-token.js';
|
|
16
16
|
import { issuerOnlyConfigKeyOf } from './issuer-config.js';
|
|
17
|
-
import { abandonCopy, beginTransfer, connectionGrantsForScope, transferScope, isScopeNotHeld, notHeldIsBenign } from './vertical-client.js';
|
|
17
|
+
import { COPY_MAX_BYTES, abandonCopy, beginTransfer, connectionGrantsForScope, transferScope, isScopeNotHeld, notHeldIsBenign } from './vertical-client.js';
|
|
18
18
|
import { COPY_JOB_MAX_MS, copyJobAt, copyJobHeld, copyJobId, copyJobLive, copyTagId, versionIdOfOrder, versionOrderOf, } from './copy-job.js';
|
|
19
19
|
import { exportStoreDumps, runningVersionOf, runningVersionStoresOf, scopeStoreReachOf, scopeStoresOf, unrouteScope } from './platform-scope-stores.js';
|
|
20
20
|
import { liveApprovalOf } from './store-script.js';
|
|
@@ -1003,6 +1003,7 @@ async function answeredMessage(res) {
|
|
|
1003
1003
|
export function createControlPlaneApi(options) {
|
|
1004
1004
|
const { host, authenticate, authenticateBuilder, authenticateTenantService } = options;
|
|
1005
1005
|
const copyLeaseMs = options.copyLeaseMs ?? SCOPE_COPY_LEASE_MS;
|
|
1006
|
+
const copyMaxBytes = options.copyMaxBytes ?? COPY_MAX_BYTES;
|
|
1006
1007
|
/** The stores of the version the scope's deployment runs (`scopeStoresOf`, #2207). */
|
|
1007
1008
|
const manifestStores = (c, scope, running) => scopeStoresOf(c.var.admin, c.get('actor'), scope, options.storeDrivers, running);
|
|
1008
1009
|
/**
|
|
@@ -2534,6 +2535,7 @@ export function createControlPlaneApi(options) {
|
|
|
2534
2535
|
await relayConnectionUpsert(c.var.host, c.get('actor'), { ...body, tenantId, owner: 'tenant' }, {
|
|
2535
2536
|
probeCandidate,
|
|
2536
2537
|
prepareCandidate,
|
|
2538
|
+
accountFromProbe,
|
|
2537
2539
|
...(options.verticalConnectorDeclaration ? { declarationOf: options.verticalConnectorDeclaration } : {}),
|
|
2538
2540
|
}));
|
|
2539
2541
|
}
|
|
@@ -2663,6 +2665,8 @@ export function createControlPlaneApi(options) {
|
|
|
2663
2665
|
const probeCandidate = async (provider, secret, context) => inspectorFor(provider, context)?.probeCandidate?.(secret);
|
|
2664
2666
|
/** #2100: the provider's own half of a credential, made before the probe sees it. */
|
|
2665
2667
|
const prepareCandidate = (provider) => options.connectionInspectors?.[provider]?.prepareCandidate;
|
|
2668
|
+
/** #3211: a first-party provider keyed on the account its probe names. */
|
|
2669
|
+
const accountFromProbe = (provider) => options.connectionInspectors?.[provider]?.accountFromProbe === true;
|
|
2666
2670
|
const inspectableConnection = async (c) => {
|
|
2667
2671
|
const tenantId = tenantIdSchema.parse(c.req.param('tenantId'));
|
|
2668
2672
|
const id = c.req.param('id');
|
|
@@ -2779,8 +2783,9 @@ export function createControlPlaneApi(options) {
|
|
|
2779
2783
|
*/
|
|
2780
2784
|
app.post('/tenants/:tenantId/connections/:id/verify', async (c) => {
|
|
2781
2785
|
const row = await inspectableConnection(c);
|
|
2782
|
-
// #2732: a connector opens the tenant's connection for a provider, so a scope's own reads as absent
|
|
2783
|
-
|
|
2786
|
+
// #2732: a connector opens the tenant's connection for a provider, so a scope's own reads as absent
|
|
2787
|
+
// here, unless its connector opens a scope's own (#3201).
|
|
2788
|
+
if (!row || (row.ownerScopeId !== null && inspectorOf(row)?.scopeOwned !== true))
|
|
2784
2789
|
return refuse(c, 'not_found', 'unknown connection');
|
|
2785
2790
|
const probe = inspectorOf(row)?.probe;
|
|
2786
2791
|
if (!probe) {
|
|
@@ -2887,8 +2892,8 @@ export function createControlPlaneApi(options) {
|
|
|
2887
2892
|
*/
|
|
2888
2893
|
app.get('/tenants/:tenantId/connections/:id/credential', async (c) => {
|
|
2889
2894
|
const row = await inspectableConnection(c);
|
|
2890
|
-
// #2732: as /verify, a scope's own connection reads as absent
|
|
2891
|
-
if (!row || row.ownerScopeId !== null)
|
|
2895
|
+
// #2732: as /verify, a scope's own connection reads as absent unless its connector opens it (#3201).
|
|
2896
|
+
if (!row || (row.ownerScopeId !== null && inspectorOf(row)?.scopeOwned !== true))
|
|
2892
2897
|
return refuse(c, 'not_found', 'unknown connection');
|
|
2893
2898
|
const credential = inspectorOf(row)?.credential;
|
|
2894
2899
|
if (!credential) {
|
|
@@ -3461,7 +3466,7 @@ export function createControlPlaneApi(options) {
|
|
|
3461
3466
|
}
|
|
3462
3467
|
const erasureEpoch = await c.var.admin.scopeErasureEpoch(actor, tenantId, scopeId);
|
|
3463
3468
|
// #2450: a page at a time into the destination's stage, so a scope of any size moves.
|
|
3464
|
-
const { dump, loadStamp: sourceStamp, revision: sourceRevision } = await transferScope(source, dest, { from: scopeId }, { retry: retryTransient });
|
|
3469
|
+
const { dump, loadStamp: sourceStamp, revision: sourceRevision } = await transferScope(source, dest, { from: scopeId }, { retry: retryTransient, maxBytes: copyMaxBytes });
|
|
3465
3470
|
const restored = await restoreCarryingSwitches(c.var.admin, actor, dest, tenantId, scopeId, dump, {
|
|
3466
3471
|
scopeId, exact: true, loadStamp: restoredStamp,
|
|
3467
3472
|
...(moveId ? { fence: copyRestoreFence(moveId, recordedAt, copyLeaseMs, erasureEpoch) } : {}),
|
|
@@ -3766,7 +3771,7 @@ export function createControlPlaneApi(options) {
|
|
|
3766
3771
|
// #2450: a page at a time into the destination's stage, so a scope of any size moves. The
|
|
3767
3772
|
// stage moves neither the destination's load stamp nor its write revision, so the marker
|
|
3768
3773
|
// `carryFinish` reads next still describes the store the restore commits into.
|
|
3769
|
-
return carryWith(c, scope, versionId, move, () => transferScope(move.source, move.dest, { from: scope.id }, { retry: retryTransient }));
|
|
3774
|
+
return carryWith(c, scope, versionId, move, () => transferScope(move.source, move.dest, { from: scope.id }, { retry: retryTransient, maxBytes: copyMaxBytes }));
|
|
3770
3775
|
};
|
|
3771
3776
|
/** The two ends a carry moves between, resolved and checked (`carryOntoVersion`), or null when nothing moves. */
|
|
3772
3777
|
const carryEnds = async (c, scope, versionId, opts = {}) => {
|
|
@@ -4242,6 +4247,9 @@ export function createControlPlaneApi(options) {
|
|
|
4242
4247
|
await releaseIfLive(c, scope, versionId, carried, carried.dest, carried.to);
|
|
4243
4248
|
let sourceMarker = { loadStamp: carried.sourceStamp, revision: carried.sourceRevision };
|
|
4244
4249
|
if (await isCarriedAway(carried.dest, scope)) {
|
|
4250
|
+
// No size gate (#2450): the bind has landed on this store, so refusing the re-carry would
|
|
4251
|
+
// leave the scope serving a wiped copy. Its destination predates the fenced wipe (#1722),
|
|
4252
|
+
// and so the stage too: it takes the pages merged, the version-skew fallback.
|
|
4245
4253
|
const { dump, loadStamp: stamp, revision, meta } = await transferScope(carried.source, carried.dest, { from: scope.id }, { retry: retryTransient });
|
|
4246
4254
|
if (dumpMetaValue(meta, CARRIED_AWAY_KEY) !== null) {
|
|
4247
4255
|
throw new ControlPlaneError(500, `both copies of scope ${scope.id} hold the carried_away tombstone; nothing was wiped`);
|
|
@@ -7164,7 +7172,7 @@ export function createControlPlaneApi(options) {
|
|
|
7164
7172
|
// #2450: a page at a time into the live store's stage, so a kept copy of any size goes forward.
|
|
7165
7173
|
// Unstamped: the kept copy is only read. A write it takes meanwhile is caught up on through the
|
|
7166
7174
|
// copy's capture, and one after the copy moves its revision, which the discard below is fenced on.
|
|
7167
|
-
const { dump } = await transferScope(holder, live, { from: scopeId }, { retry: retryTransient, stamp: false });
|
|
7175
|
+
const { dump } = await transferScope(holder, live, { from: scopeId }, { retry: retryTransient, stamp: false, maxBytes: copyMaxBytes });
|
|
7168
7176
|
try {
|
|
7169
7177
|
// #2185: before the load as well as after it, so a throw once the kept copy has landed (the
|
|
7170
7178
|
// re-assert) cannot leave the receipt set over older data.
|
|
@@ -10808,7 +10816,7 @@ export function createControlPlaneApi(options) {
|
|
|
10808
10816
|
// keeps serving its data from the old script until a later call finishes it.
|
|
10809
10817
|
let begun;
|
|
10810
10818
|
try {
|
|
10811
|
-
begun = await beginTransfer({ source: move.source, dest: move.dest }, { from: preview.id }, { retry: retryTransient, alwaysStage: true });
|
|
10819
|
+
begun = await beginTransfer({ source: move.source, dest: move.dest }, { from: preview.id }, { retry: retryTransient, alwaysStage: true, maxBytes: copyMaxBytes });
|
|
10812
10820
|
}
|
|
10813
10821
|
catch (e) {
|
|
10814
10822
|
await settleCarryRetained(c, preview, opts.versionId, move);
|
|
@@ -10988,7 +10996,7 @@ export function createControlPlaneApi(options) {
|
|
|
10988
10996
|
// restore blip reloads the same stage and an export fault is not recorded as a restore's.
|
|
10989
10997
|
forkData = sourceClient
|
|
10990
10998
|
? async () => {
|
|
10991
|
-
const moved = await transferScope(sourceClient, target, { from: source.id, to: previewId }, { retry: retryTransient, stamp: false });
|
|
10999
|
+
const moved = await transferScope(sourceClient, target, { from: source.id, to: previewId }, { retry: retryTransient, stamp: false, maxBytes: copyMaxBytes });
|
|
10992
11000
|
refuseWipedSource(moved.meta, source.id);
|
|
10993
11001
|
return moved.dump;
|
|
10994
11002
|
}
|
|
@@ -11068,7 +11076,7 @@ export function createControlPlaneApi(options) {
|
|
|
11068
11076
|
if (forkPaged && jobs && move && targetRef && target) {
|
|
11069
11077
|
// #2450 step 2: the first page moves here. A fork that needs more moves in a job, and a
|
|
11070
11078
|
// later call to this route finishes it (`finishForkJob`); the row stays `provisioning`.
|
|
11071
|
-
const begun = await beginTransfer({ source: forkPaged.source, dest: target }, { from: forkPaged.sourceScopeId, to: previewId }, { retry: retryTransient, stamp: false, alwaysStage: true });
|
|
11079
|
+
const begun = await beginTransfer({ source: forkPaged.source, dest: target }, { from: forkPaged.sourceScopeId, to: previewId }, { retry: retryTransient, stamp: false, alwaysStage: true, maxBytes: copyMaxBytes });
|
|
11072
11080
|
if ('state' in begun) {
|
|
11073
11081
|
const staged = begun.state;
|
|
11074
11082
|
const ends = { source: forkPaged.source, dest: target };
|