@microagi/alchemy-gcp 0.11.5 → 0.11.6
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 +9 -0
- package/lib/ArtifactRegistry/Operations.d.ts +2 -1
- package/lib/ArtifactRegistry/Operations.d.ts.map +1 -1
- package/lib/ArtifactRegistry/Operations.js +9 -2
- package/lib/ArtifactRegistry/Operations.js.map +1 -1
- package/lib/ArtifactRegistry/Repository.d.ts.map +1 -1
- package/lib/ArtifactRegistry/Repository.js +6 -1
- package/lib/ArtifactRegistry/Repository.js.map +1 -1
- package/lib/ArtifactRegistry/RepositoryIamMember.d.ts.map +1 -1
- package/lib/ArtifactRegistry/RepositoryIamMember.js +6 -1
- package/lib/ArtifactRegistry/RepositoryIamMember.js.map +1 -1
- package/lib/CloudResourceManager/Project.d.ts.map +1 -1
- package/lib/CloudResourceManager/Project.js +10 -2
- package/lib/CloudResourceManager/Project.js.map +1 -1
- package/lib/Compute/Address.d.ts +1 -1
- package/lib/Compute/Address.d.ts.map +1 -1
- package/lib/Compute/Address.js +5 -2
- package/lib/Compute/Address.js.map +1 -1
- package/lib/Compute/Firewall.d.ts +1 -1
- package/lib/Compute/Firewall.d.ts.map +1 -1
- package/lib/Compute/Firewall.js +5 -2
- package/lib/Compute/Firewall.js.map +1 -1
- package/lib/Compute/ForwardingRule.d.ts +1 -1
- package/lib/Compute/ForwardingRule.d.ts.map +1 -1
- package/lib/Compute/ForwardingRule.js +5 -2
- package/lib/Compute/ForwardingRule.js.map +1 -1
- package/lib/Compute/GlobalAddress.d.ts +1 -1
- package/lib/Compute/GlobalAddress.d.ts.map +1 -1
- package/lib/Compute/GlobalAddress.js +5 -2
- package/lib/Compute/GlobalAddress.js.map +1 -1
- package/lib/Compute/Network.d.ts +1 -1
- package/lib/Compute/Network.d.ts.map +1 -1
- package/lib/Compute/Network.js +5 -2
- package/lib/Compute/Network.js.map +1 -1
- package/lib/Compute/Operations.d.ts +7 -2
- package/lib/Compute/Operations.d.ts.map +1 -1
- package/lib/Compute/Operations.js +10 -5
- package/lib/Compute/Operations.js.map +1 -1
- package/lib/Compute/ProjectDefaultNetworkTier.d.ts +1 -1
- package/lib/Compute/ProjectDefaultNetworkTier.d.ts.map +1 -1
- package/lib/Compute/ProjectDefaultNetworkTier.js +2 -0
- package/lib/Compute/ProjectDefaultNetworkTier.js.map +1 -1
- package/lib/Compute/SharedVpcHost.d.ts +1 -1
- package/lib/Compute/SharedVpcHost.d.ts.map +1 -1
- package/lib/Compute/SharedVpcHost.js +7 -2
- package/lib/Compute/SharedVpcHost.js.map +1 -1
- package/lib/Compute/SharedVpcServiceProject.d.ts +1 -1
- package/lib/Compute/SharedVpcServiceProject.d.ts.map +1 -1
- package/lib/Compute/SharedVpcServiceProject.js +5 -2
- package/lib/Compute/SharedVpcServiceProject.js.map +1 -1
- package/lib/Compute/Subnetwork.d.ts +1 -1
- package/lib/Compute/Subnetwork.d.ts.map +1 -1
- package/lib/Compute/Subnetwork.js +9 -3
- package/lib/Compute/Subnetwork.js.map +1 -1
- package/lib/Container/Cluster.d.ts.map +1 -1
- package/lib/Container/Cluster.js +6 -2
- package/lib/Container/Cluster.js.map +1 -1
- package/lib/Container/NodePool.d.ts.map +1 -1
- package/lib/Container/NodePool.js +2 -0
- package/lib/Container/NodePool.js.map +1 -1
- package/lib/Container/Operations.d.ts +2 -2
- package/lib/Container/Operations.d.ts.map +1 -1
- package/lib/Container/Operations.js +9 -3
- package/lib/Container/Operations.js.map +1 -1
- package/lib/Iam/ServiceAccount.d.ts.map +1 -1
- package/lib/Iam/ServiceAccount.js +6 -1
- package/lib/Iam/ServiceAccount.js.map +1 -1
- package/lib/Iam/ServiceAccountKey.d.ts.map +1 -1
- package/lib/Iam/ServiceAccountKey.js +2 -0
- package/lib/Iam/ServiceAccountKey.js.map +1 -1
- package/lib/Kubernetes/Helm.d.ts.map +1 -1
- package/lib/Kubernetes/Helm.js +2 -0
- package/lib/Kubernetes/Helm.js.map +1 -1
- package/lib/Kubernetes/KubernetesManifest.d.ts.map +1 -1
- package/lib/Kubernetes/KubernetesManifest.js +2 -0
- package/lib/Kubernetes/KubernetesManifest.js.map +1 -1
- package/lib/Kubernetes/Secret.d.ts.map +1 -1
- package/lib/Kubernetes/Secret.js +2 -0
- package/lib/Kubernetes/Secret.js.map +1 -1
- package/lib/ManagedLustre/Instance.d.ts.map +1 -1
- package/lib/ManagedLustre/Instance.js +11 -4
- package/lib/ManagedLustre/Instance.js.map +1 -1
- package/lib/Providers.d.ts +1 -1
- package/lib/Providers.d.ts.map +1 -1
- package/lib/Run/IamSync.d.ts.map +1 -1
- package/lib/Run/IamSync.js +4 -1
- package/lib/Run/IamSync.js.map +1 -1
- package/lib/Run/Job.d.ts.map +1 -1
- package/lib/Run/Job.js +6 -1
- package/lib/Run/Job.js.map +1 -1
- package/lib/Run/Operations.d.ts +2 -2
- package/lib/Run/Operations.d.ts.map +1 -1
- package/lib/Run/Operations.js +9 -3
- package/lib/Run/Operations.js.map +1 -1
- package/lib/Run/Service.d.ts.map +1 -1
- package/lib/Run/Service.js +6 -1
- package/lib/Run/Service.js.map +1 -1
- package/lib/ServiceNetworking/PsaConnection.d.ts.map +1 -1
- package/lib/ServiceNetworking/PsaConnection.js +11 -4
- package/lib/ServiceNetworking/PsaConnection.js.map +1 -1
- package/lib/ServiceUsage/ApiEnable.d.ts.map +1 -1
- package/lib/ServiceUsage/ApiEnable.js +9 -1
- package/lib/ServiceUsage/ApiEnable.js.map +1 -1
- package/lib/Sqladmin/Database.d.ts.map +1 -1
- package/lib/Sqladmin/Database.js +2 -0
- package/lib/Sqladmin/Database.js.map +1 -1
- package/lib/Sqladmin/Instance.d.ts.map +1 -1
- package/lib/Sqladmin/Instance.js +6 -1
- package/lib/Sqladmin/Instance.js.map +1 -1
- package/lib/Sqladmin/Operations.d.ts.map +1 -1
- package/lib/Sqladmin/Operations.js +7 -1
- package/lib/Sqladmin/Operations.js.map +1 -1
- package/lib/Sqladmin/User.d.ts.map +1 -1
- package/lib/Sqladmin/User.js +2 -0
- package/lib/Sqladmin/User.js.map +1 -1
- package/lib/Storage/Bucket.d.ts.map +1 -1
- package/lib/Storage/Bucket.js +6 -1
- package/lib/Storage/Bucket.js.map +1 -1
- package/lib/Storage/StorageBucketIamMember.d.ts.map +1 -1
- package/lib/Storage/StorageBucketIamMember.js +6 -1
- package/lib/Storage/StorageBucketIamMember.js.map +1 -1
- package/package.json +10 -10
- package/src/ArtifactRegistry/Operations.ts +10 -5
- package/src/ArtifactRegistry/Repository.ts +7 -3
- package/src/ArtifactRegistry/RepositoryIamMember.ts +6 -3
- package/src/CloudResourceManager/Project.ts +11 -6
- package/src/Compute/Address.ts +5 -1
- package/src/Compute/Firewall.ts +5 -1
- package/src/Compute/ForwardingRule.ts +5 -1
- package/src/Compute/GlobalAddress.ts +5 -1
- package/src/Compute/Network.ts +5 -1
- package/src/Compute/Operations.ts +8 -4
- package/src/Compute/ProjectDefaultNetworkTier.ts +2 -0
- package/src/Compute/SharedVpcHost.ts +7 -1
- package/src/Compute/SharedVpcServiceProject.ts +5 -1
- package/src/Compute/Subnetwork.ts +9 -4
- package/src/Container/Cluster.ts +7 -3
- package/src/Container/NodePool.ts +2 -0
- package/src/Container/Operations.ts +10 -6
- package/src/Iam/ServiceAccount.ts +6 -3
- package/src/Iam/ServiceAccountKey.ts +2 -0
- package/src/Kubernetes/Helm.ts +2 -0
- package/src/Kubernetes/KubernetesManifest.ts +2 -0
- package/src/Kubernetes/Secret.ts +2 -0
- package/src/ManagedLustre/Instance.ts +10 -4
- package/src/Run/IamSync.ts +4 -3
- package/src/Run/Job.ts +7 -3
- package/src/Run/Operations.ts +10 -6
- package/src/Run/Service.ts +7 -3
- package/src/ServiceNetworking/PsaConnection.ts +10 -4
- package/src/ServiceUsage/ApiEnable.ts +10 -4
- package/src/Sqladmin/Database.ts +2 -0
- package/src/Sqladmin/Instance.ts +7 -3
- package/src/Sqladmin/Operations.ts +8 -4
- package/src/Sqladmin/User.ts +2 -0
- package/src/Storage/Bucket.ts +6 -3
- package/src/Storage/StorageBucketIamMember.ts +6 -3
|
@@ -75,6 +75,8 @@ export const SharedVpcHostProvider = () =>
|
|
|
75
75
|
);
|
|
76
76
|
|
|
77
77
|
return {
|
|
78
|
+
nuke: { singleton: true },
|
|
79
|
+
list: () => Effect.succeed([]),
|
|
78
80
|
stables: ["project"],
|
|
79
81
|
diff: Effect.fn(function* ({ news, olds = {} }) {
|
|
80
82
|
if (!isResolved(news)) return undefined;
|
|
@@ -104,12 +106,16 @@ export const SharedVpcHostProvider = () =>
|
|
|
104
106
|
return { project: news.project, xpnProjectStatus: "HOST" };
|
|
105
107
|
}),
|
|
106
108
|
delete: Effect.fn(function* ({ output, session }) {
|
|
107
|
-
|
|
109
|
+
const disabling = disableXpnHostProjects({
|
|
110
|
+
project: output.project,
|
|
111
|
+
}).pipe(
|
|
108
112
|
Effect.flatMap((op) =>
|
|
109
113
|
op.name
|
|
110
114
|
? awaitOp(output.project, op.name, session)
|
|
111
115
|
: Effect.succeed(op),
|
|
112
116
|
),
|
|
117
|
+
);
|
|
118
|
+
yield* disabling.pipe(
|
|
113
119
|
Effect.catchTag("NotFound", () => Effect.void),
|
|
114
120
|
// `BadRequest` is returned when:
|
|
115
121
|
// 1. The project isn't a host (idempotent disable — fine).
|
|
@@ -125,6 +125,8 @@ export const SharedVpcServiceProjectProvider = () =>
|
|
|
125
125
|
});
|
|
126
126
|
|
|
127
127
|
return {
|
|
128
|
+
nuke: { skip: true },
|
|
129
|
+
list: () => Effect.succeed([]),
|
|
128
130
|
stables: ["hostProject", "serviceProject"],
|
|
129
131
|
diff: Effect.fn(function* ({ news, olds = {} }) {
|
|
130
132
|
if (!isResolved(news)) return undefined;
|
|
@@ -153,7 +155,7 @@ export const SharedVpcServiceProjectProvider = () =>
|
|
|
153
155
|
};
|
|
154
156
|
}),
|
|
155
157
|
delete: Effect.fn(function* ({ output, session }) {
|
|
156
|
-
|
|
158
|
+
const disabling = disableXpnResource({
|
|
157
159
|
project: output.hostProject,
|
|
158
160
|
body: {
|
|
159
161
|
xpnResource: { type: "PROJECT", id: output.serviceProject },
|
|
@@ -164,6 +166,8 @@ export const SharedVpcServiceProjectProvider = () =>
|
|
|
164
166
|
? awaitOp(output.hostProject, op.name, session)
|
|
165
167
|
: Effect.succeed(op),
|
|
166
168
|
),
|
|
169
|
+
);
|
|
170
|
+
yield* disabling.pipe(
|
|
167
171
|
Effect.catchTag("NotFound", () => Effect.void),
|
|
168
172
|
// `BadRequest` covers "not attached to this host" (idempotent
|
|
169
173
|
// detach); other 400s (resources still using shared subnets)
|
|
@@ -254,9 +254,10 @@ export const SubnetworkProvider = () =>
|
|
|
254
254
|
// multiple bindings in parallel, races are common. Cap at
|
|
255
255
|
// ~1.5 min total to surface real failures.
|
|
256
256
|
Effect.retry({
|
|
257
|
-
schedule: Schedule.
|
|
258
|
-
Schedule.
|
|
259
|
-
|
|
257
|
+
schedule: Schedule.max([
|
|
258
|
+
Schedule.exponential(Duration.seconds(2)),
|
|
259
|
+
Schedule.recurs(8),
|
|
260
|
+
]),
|
|
260
261
|
}),
|
|
261
262
|
);
|
|
262
263
|
|
|
@@ -344,6 +345,8 @@ export const SubnetworkProvider = () =>
|
|
|
344
345
|
});
|
|
345
346
|
|
|
346
347
|
return {
|
|
348
|
+
nuke: { skip: true },
|
|
349
|
+
list: () => Effect.succeed([]),
|
|
347
350
|
stables: ["name", "project", "region", "selfLink", "id"],
|
|
348
351
|
diff: Effect.fn(function* ({ news, olds = {} }) {
|
|
349
352
|
if (!isResolved(news)) return undefined;
|
|
@@ -445,7 +448,7 @@ export const SubnetworkProvider = () =>
|
|
|
445
448
|
});
|
|
446
449
|
}),
|
|
447
450
|
delete: Effect.fn(function* ({ output, session }) {
|
|
448
|
-
|
|
451
|
+
const deletion = deleteSubnetworks({
|
|
449
452
|
project: output.project,
|
|
450
453
|
region: output.region,
|
|
451
454
|
subnetwork: output.name,
|
|
@@ -455,6 +458,8 @@ export const SubnetworkProvider = () =>
|
|
|
455
458
|
? awaitOp(output.project, output.region, op.name, session)
|
|
456
459
|
: Effect.succeed(op),
|
|
457
460
|
),
|
|
461
|
+
);
|
|
462
|
+
yield* deletion.pipe(
|
|
458
463
|
Effect.catchTag("NotFound", () => Effect.void),
|
|
459
464
|
);
|
|
460
465
|
}),
|
package/src/Container/Cluster.ts
CHANGED
|
@@ -505,6 +505,8 @@ export const ClusterProvider = () =>
|
|
|
505
505
|
});
|
|
506
506
|
|
|
507
507
|
return {
|
|
508
|
+
nuke: { skip: true },
|
|
509
|
+
list: () => Effect.succeed([]),
|
|
508
510
|
stables: [
|
|
509
511
|
"name",
|
|
510
512
|
"selfLink",
|
|
@@ -595,9 +597,11 @@ export const ClusterProvider = () =>
|
|
|
595
597
|
while: (e: { _tag?: string; message?: string }) =>
|
|
596
598
|
e?._tag === "Forbidden" &&
|
|
597
599
|
/enabled this API recently|has not been used/i.test(e.message ?? ""),
|
|
598
|
-
schedule: Schedule.
|
|
599
|
-
Schedule.
|
|
600
|
-
Schedule.
|
|
600
|
+
schedule: Schedule.max([
|
|
601
|
+
Schedule.spaced(Duration.seconds(15)),
|
|
602
|
+
Schedule.recurs(20), // 20 × 15s ≈ 5 min
|
|
603
|
+
]).pipe(
|
|
604
|
+
Schedule.tap(() =>
|
|
601
605
|
session.note(
|
|
602
606
|
"Waiting for Container API enablement to propagate…",
|
|
603
607
|
),
|
|
@@ -546,6 +546,8 @@ export const NodePoolProvider = () =>
|
|
|
546
546
|
});
|
|
547
547
|
|
|
548
548
|
return {
|
|
549
|
+
nuke: { skip: true },
|
|
550
|
+
list: () => Effect.succeed([]),
|
|
549
551
|
stables: ["name", "selfLink", "project", "location", "clusterName"],
|
|
550
552
|
diff: Effect.fn(function* ({ news, olds = {} }) {
|
|
551
553
|
if (!isResolved(news)) return undefined;
|
|
@@ -46,8 +46,8 @@ type GetOperations = Effect.Success<typeof cont.getProjectsLocationsOperations>;
|
|
|
46
46
|
* The doneness predicate compares `.status === "DONE"` accordingly.
|
|
47
47
|
*
|
|
48
48
|
* Schedule: exponential 2s → 1.5× growth, capped per-poll at 15s via
|
|
49
|
-
* `Schedule.
|
|
50
|
-
* `Schedule.
|
|
49
|
+
* `Schedule.min`, then a hard count cap of 80 retries via
|
|
50
|
+
* `Schedule.max` → ~20 min wall ceiling, well
|
|
51
51
|
* above the worst observed GKE op time (cluster create runs 5–10 min).
|
|
52
52
|
*
|
|
53
53
|
* The helper is a factory — the caller resolves
|
|
@@ -68,10 +68,14 @@ export const makeAwaitOperation = (getOperations: GetOperations) =>
|
|
|
68
68
|
),
|
|
69
69
|
Effect.retry({
|
|
70
70
|
while: (e: { _tag?: string }) => e?._tag === "OperationPending",
|
|
71
|
-
schedule: Schedule.
|
|
72
|
-
Schedule.
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
schedule: Schedule.max([
|
|
72
|
+
Schedule.min([
|
|
73
|
+
Schedule.exponential(Duration.seconds(2), 1.5),
|
|
74
|
+
Schedule.spaced(Duration.seconds(15)),
|
|
75
|
+
]),
|
|
76
|
+
Schedule.recurs(80),
|
|
77
|
+
]).pipe(
|
|
78
|
+
Schedule.tap(() =>
|
|
75
79
|
session.note(`Waiting for GKE operation ${operationName}…`),
|
|
76
80
|
),
|
|
77
81
|
),
|
|
@@ -330,9 +330,10 @@ export const ServiceAccountProvider = () =>
|
|
|
330
330
|
});
|
|
331
331
|
}).pipe(
|
|
332
332
|
Effect.retry({
|
|
333
|
-
schedule: Schedule.
|
|
334
|
-
Schedule.
|
|
335
|
-
|
|
333
|
+
schedule: Schedule.max([
|
|
334
|
+
Schedule.exponential(Duration.seconds(2)),
|
|
335
|
+
Schedule.recurs(8),
|
|
336
|
+
]),
|
|
336
337
|
}),
|
|
337
338
|
);
|
|
338
339
|
|
|
@@ -340,6 +341,8 @@ export const ServiceAccountProvider = () =>
|
|
|
340
341
|
// Stable identity: accountId + project; both immutable; either
|
|
341
342
|
// change → replace. The server-assigned uniqueId is also stable
|
|
342
343
|
// for the lifetime of the GSA (re-create gets a different one).
|
|
344
|
+
nuke: { skip: true },
|
|
345
|
+
list: () => Effect.succeed([]),
|
|
343
346
|
stables: ["accountId", "projectId", "uniqueId", "name", "email"],
|
|
344
347
|
diff: Effect.fn(function* ({ id, news, olds = {}, output }) {
|
|
345
348
|
if (!isResolved(news)) return undefined;
|
|
@@ -153,6 +153,8 @@ export const ServiceAccountKeyProvider = () =>
|
|
|
153
153
|
// privateKeyData is stable: it's set on create and never
|
|
154
154
|
// changes. The engine preserves it across reconciles and
|
|
155
155
|
// does not use it for drift detection.
|
|
156
|
+
nuke: { skip: true },
|
|
157
|
+
list: () => Effect.succeed([]),
|
|
156
158
|
stables: ["name", "privateKeyData", "keyAlgorithm", "keyType"],
|
|
157
159
|
diff: Effect.fn(function* ({ news, olds = {} }) {
|
|
158
160
|
if (!isResolved(news)) return undefined;
|
package/src/Kubernetes/Helm.ts
CHANGED
|
@@ -329,6 +329,8 @@ export const HelmReleaseProvider = () =>
|
|
|
329
329
|
// Identity (name/namespace/chart) and endpoint are unchanged by an
|
|
330
330
|
// in-place upgrade. revision increments on every upgrade — it is NOT
|
|
331
331
|
// stable (an update must persist the new revision).
|
|
332
|
+
nuke: { skip: true },
|
|
333
|
+
list: () => Effect.succeed([]),
|
|
332
334
|
stables: ["name", "namespace", "chart", "endpoint"],
|
|
333
335
|
diff: Effect.fn(function* ({ news, olds = {} }) {
|
|
334
336
|
if (!isResolved(news)) return undefined;
|
|
@@ -179,6 +179,8 @@ export const KubernetesManifestProvider = () =>
|
|
|
179
179
|
// Identity (apiVersion/kind/name/namespace) and the server-assigned uid
|
|
180
180
|
// are unchanged by an in-place apply. endpoint is a replace trigger so
|
|
181
181
|
// it never changes on update; caCertificate is excluded (can rotate).
|
|
182
|
+
nuke: { skip: true },
|
|
183
|
+
list: () => Effect.succeed([]),
|
|
182
184
|
stables: [
|
|
183
185
|
"apiVersion",
|
|
184
186
|
"kind",
|
package/src/Kubernetes/Secret.ts
CHANGED
|
@@ -195,6 +195,8 @@ export const KubernetesSecretProvider = () =>
|
|
|
195
195
|
// uid, and endpoint — which is a replace trigger, so it never changes
|
|
196
196
|
// on update. caCertificate is intentionally excluded: it can rotate on
|
|
197
197
|
// the same cluster.
|
|
198
|
+
nuke: { skip: true },
|
|
199
|
+
list: () => Effect.succeed([]),
|
|
198
200
|
stables: ["name", "namespace", "endpoint", "uid"],
|
|
199
201
|
diff: Effect.fn(function* ({ id, news, olds = {} }) {
|
|
200
202
|
if (!isResolved(news)) return undefined;
|
|
@@ -247,12 +247,16 @@ export const ManagedLustreInstanceProvider = () =>
|
|
|
247
247
|
),
|
|
248
248
|
Effect.retry({
|
|
249
249
|
while: (e: { _tag?: string }) => e?._tag === "OperationPending",
|
|
250
|
-
schedule: Schedule.
|
|
251
|
-
Schedule.
|
|
250
|
+
schedule: Schedule.max([
|
|
251
|
+
Schedule.min([
|
|
252
|
+
Schedule.exponential(Duration.seconds(5), 1.5),
|
|
253
|
+
Schedule.spaced(Duration.seconds(30)),
|
|
254
|
+
]),
|
|
252
255
|
// Lustre creates run 10–25 min for multi-TiB instances.
|
|
253
256
|
// 200 × 30s ≈ 100 min wall ceiling.
|
|
254
|
-
Schedule.
|
|
255
|
-
|
|
257
|
+
Schedule.recurs(200),
|
|
258
|
+
]).pipe(
|
|
259
|
+
Schedule.tap(() =>
|
|
256
260
|
session.note(`Waiting for Managed Lustre operation ${operationName}…`),
|
|
257
261
|
),
|
|
258
262
|
),
|
|
@@ -310,6 +314,8 @@ export const ManagedLustreInstanceProvider = () =>
|
|
|
310
314
|
});
|
|
311
315
|
|
|
312
316
|
return {
|
|
317
|
+
nuke: { skip: true },
|
|
318
|
+
list: () => Effect.succeed([]),
|
|
313
319
|
stables: ["instanceId", "project", "location", "name"],
|
|
314
320
|
diff: Effect.fn(function* ({ news, olds = {} }) {
|
|
315
321
|
if (!isResolved(news)) return undefined;
|
package/src/Run/IamSync.ts
CHANGED
|
@@ -127,8 +127,9 @@ export const makeSyncIam =
|
|
|
127
127
|
});
|
|
128
128
|
}).pipe(
|
|
129
129
|
Effect.retry({
|
|
130
|
-
schedule: Schedule.
|
|
131
|
-
Schedule.
|
|
132
|
-
|
|
130
|
+
schedule: Schedule.max([
|
|
131
|
+
Schedule.exponential(Duration.seconds(2)),
|
|
132
|
+
Schedule.recurs(8),
|
|
133
|
+
]),
|
|
133
134
|
}),
|
|
134
135
|
);
|
package/src/Run/Job.ts
CHANGED
|
@@ -336,6 +336,8 @@ export const JobProvider = () =>
|
|
|
336
336
|
});
|
|
337
337
|
|
|
338
338
|
return {
|
|
339
|
+
nuke: { skip: true },
|
|
340
|
+
list: () => Effect.succeed([]),
|
|
339
341
|
stables: ["name", "uid", "resourceName", "project", "location"],
|
|
340
342
|
diff: Effect.fn(function* ({ news, olds = {} }) {
|
|
341
343
|
if (!isResolved(news)) return undefined;
|
|
@@ -384,9 +386,11 @@ export const JobProvider = () =>
|
|
|
384
386
|
/enabled this API recently|has not been used/i.test(
|
|
385
387
|
e.message ?? "",
|
|
386
388
|
),
|
|
387
|
-
schedule: Schedule.
|
|
388
|
-
Schedule.
|
|
389
|
-
Schedule.
|
|
389
|
+
schedule: Schedule.max([
|
|
390
|
+
Schedule.spaced(Duration.seconds(15)),
|
|
391
|
+
Schedule.recurs(20),
|
|
392
|
+
]).pipe(
|
|
393
|
+
Schedule.tap(() =>
|
|
390
394
|
session.note(
|
|
391
395
|
"Waiting for Cloud Run API enablement to propagate…",
|
|
392
396
|
),
|
package/src/Run/Operations.ts
CHANGED
|
@@ -33,8 +33,8 @@ type GetOperations = Effect.Success<typeof run.getProjectsLocationsOperations>;
|
|
|
33
33
|
* dance needed (unlike Container, which returns bare ids).
|
|
34
34
|
*
|
|
35
35
|
* Schedule: exponential 1s → 1.5× growth, capped per-poll at 10s via
|
|
36
|
-
* `Schedule.
|
|
37
|
-
*
|
|
36
|
+
* `Schedule.min`, then a hard count cap of 60 retries via `Schedule.max`
|
|
37
|
+
* → ~10 min wall ceiling. Cloud
|
|
38
38
|
* Run create/patch typically completes in seconds to a couple minutes,
|
|
39
39
|
* with the long pole being container image pulls.
|
|
40
40
|
*
|
|
@@ -57,10 +57,14 @@ export const makeAwaitOperation = (getOperations: GetOperations) =>
|
|
|
57
57
|
),
|
|
58
58
|
Effect.retry({
|
|
59
59
|
while: (e: { _tag?: string }) => e?._tag === "OperationPending",
|
|
60
|
-
schedule: Schedule.
|
|
61
|
-
Schedule.
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
schedule: Schedule.max([
|
|
61
|
+
Schedule.min([
|
|
62
|
+
Schedule.exponential(Duration.seconds(1), 1.5),
|
|
63
|
+
Schedule.spaced(Duration.seconds(10)),
|
|
64
|
+
]),
|
|
65
|
+
Schedule.recurs(60),
|
|
66
|
+
]).pipe(
|
|
67
|
+
Schedule.tap(() =>
|
|
64
68
|
session.note(`Waiting for Cloud Run operation ${operationName}…`),
|
|
65
69
|
),
|
|
66
70
|
),
|
package/src/Run/Service.ts
CHANGED
|
@@ -399,6 +399,8 @@ export const ServiceProvider = () =>
|
|
|
399
399
|
});
|
|
400
400
|
|
|
401
401
|
return {
|
|
402
|
+
nuke: { skip: true },
|
|
403
|
+
list: () => Effect.succeed([]),
|
|
402
404
|
stables: ["name", "uid", "resourceName", "project", "location"],
|
|
403
405
|
diff: Effect.fn(function* ({ news, olds = {} }) {
|
|
404
406
|
if (!isResolved(news)) return undefined;
|
|
@@ -458,9 +460,11 @@ export const ServiceProvider = () =>
|
|
|
458
460
|
/enabled this API recently|has not been used/i.test(
|
|
459
461
|
e.message ?? "",
|
|
460
462
|
),
|
|
461
|
-
schedule: Schedule.
|
|
462
|
-
Schedule.
|
|
463
|
-
Schedule.
|
|
463
|
+
schedule: Schedule.max([
|
|
464
|
+
Schedule.spaced(Duration.seconds(15)),
|
|
465
|
+
Schedule.recurs(20),
|
|
466
|
+
]).pipe(
|
|
467
|
+
Schedule.tap(() =>
|
|
464
468
|
session.note(
|
|
465
469
|
"Waiting for Cloud Run API enablement to propagate…",
|
|
466
470
|
),
|
|
@@ -124,12 +124,16 @@ export const PsaConnectionProvider = () =>
|
|
|
124
124
|
),
|
|
125
125
|
Effect.retry({
|
|
126
126
|
while: (e: { _tag?: string }) => e?._tag === "OperationPending",
|
|
127
|
-
schedule: Schedule.
|
|
128
|
-
Schedule.
|
|
127
|
+
schedule: Schedule.max([
|
|
128
|
+
Schedule.min([
|
|
129
|
+
Schedule.exponential(Duration.seconds(2), 1.5),
|
|
130
|
+
Schedule.spaced(Duration.seconds(15)),
|
|
131
|
+
]),
|
|
129
132
|
// PSA peering creates can take 5–10 min while the
|
|
130
133
|
// service producer provisions its side. 80 × 15s ≈ 20 min.
|
|
131
|
-
Schedule.
|
|
132
|
-
|
|
134
|
+
Schedule.recurs(80),
|
|
135
|
+
]).pipe(
|
|
136
|
+
Schedule.tap(() =>
|
|
133
137
|
session.note(`Waiting for ServiceNetworking operation ${operationName}…`),
|
|
134
138
|
),
|
|
135
139
|
),
|
|
@@ -162,6 +166,8 @@ export const PsaConnectionProvider = () =>
|
|
|
162
166
|
);
|
|
163
167
|
|
|
164
168
|
return {
|
|
169
|
+
nuke: { skip: true },
|
|
170
|
+
list: () => Effect.succeed([]),
|
|
165
171
|
stables: ["network", "serviceName", "peering"],
|
|
166
172
|
diff: Effect.fn(function* ({ news, olds = {} }) {
|
|
167
173
|
if (!isResolved(news)) return undefined;
|
|
@@ -121,10 +121,14 @@ export const ApiEnableProvider = () =>
|
|
|
121
121
|
),
|
|
122
122
|
Effect.retry({
|
|
123
123
|
while: (e: { _tag?: string }) => e?._tag === "OperationPending",
|
|
124
|
-
schedule: Schedule.
|
|
125
|
-
Schedule.
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
schedule: Schedule.max([
|
|
125
|
+
Schedule.min([
|
|
126
|
+
Schedule.exponential(Duration.seconds(1), 1.5),
|
|
127
|
+
Schedule.spaced(Duration.seconds(15)),
|
|
128
|
+
]),
|
|
129
|
+
Schedule.recurs(60),
|
|
130
|
+
]).pipe(
|
|
131
|
+
Schedule.tap(() =>
|
|
128
132
|
session.note(`Waiting for ServiceUsage operation ${operationName}…`),
|
|
129
133
|
),
|
|
130
134
|
),
|
|
@@ -143,6 +147,8 @@ export const ApiEnableProvider = () =>
|
|
|
143
147
|
return {
|
|
144
148
|
// No physical-name generation: identity is `(project, service)`.
|
|
145
149
|
// Both are static strings on `news`/`olds`/`output`.
|
|
150
|
+
nuke: { skip: true },
|
|
151
|
+
list: () => Effect.succeed([]),
|
|
146
152
|
stables: ["project", "service", "name"],
|
|
147
153
|
diff: Effect.fn(function* ({ news, olds = {} }) {
|
|
148
154
|
if (!isResolved(news)) return undefined;
|
package/src/Sqladmin/Database.ts
CHANGED
|
@@ -126,6 +126,8 @@ export const SqlDatabaseProvider = () =>
|
|
|
126
126
|
);
|
|
127
127
|
|
|
128
128
|
return {
|
|
129
|
+
nuke: { skip: true },
|
|
130
|
+
list: () => Effect.succeed([]),
|
|
129
131
|
stables: ["name", "instance", "project", "selfLink"],
|
|
130
132
|
diff: Effect.fn(function* ({ news, olds = {} }) {
|
|
131
133
|
if (!isResolved(news)) return undefined;
|
package/src/Sqladmin/Instance.ts
CHANGED
|
@@ -485,6 +485,8 @@ export const SqlInstanceProvider = () =>
|
|
|
485
485
|
});
|
|
486
486
|
|
|
487
487
|
return {
|
|
488
|
+
nuke: { skip: true },
|
|
489
|
+
list: () => Effect.succeed([]),
|
|
488
490
|
stables: ["name", "selfLink", "project", "region", "connectionName"],
|
|
489
491
|
diff: Effect.fn(function* ({ news, olds = {} }) {
|
|
490
492
|
if (!isResolved(news)) return undefined;
|
|
@@ -539,9 +541,11 @@ export const SqlInstanceProvider = () =>
|
|
|
539
541
|
/enabled this API recently|has not been used/i.test(
|
|
540
542
|
e.message ?? "",
|
|
541
543
|
),
|
|
542
|
-
schedule: Schedule.
|
|
543
|
-
Schedule.
|
|
544
|
-
Schedule.
|
|
544
|
+
schedule: Schedule.max([
|
|
545
|
+
Schedule.spaced(Duration.seconds(15)),
|
|
546
|
+
Schedule.recurs(20),
|
|
547
|
+
]).pipe(
|
|
548
|
+
Schedule.tap(() =>
|
|
545
549
|
session.note(
|
|
546
550
|
"Waiting for Cloud SQL Admin API enablement to propagate…",
|
|
547
551
|
),
|
|
@@ -52,10 +52,14 @@ export const makeAwaitOperation = (getOperations: GetOperations) =>
|
|
|
52
52
|
),
|
|
53
53
|
Effect.retry({
|
|
54
54
|
while: (e: { _tag?: string }) => e?._tag === "OperationPending",
|
|
55
|
-
schedule: Schedule.
|
|
56
|
-
Schedule.
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
schedule: Schedule.max([
|
|
56
|
+
Schedule.min([
|
|
57
|
+
Schedule.exponential(Duration.seconds(1), 1.5),
|
|
58
|
+
Schedule.spaced(Duration.seconds(10)),
|
|
59
|
+
]),
|
|
60
|
+
Schedule.recurs(60),
|
|
61
|
+
]).pipe(
|
|
62
|
+
Schedule.tap(() =>
|
|
59
63
|
session.note(`Waiting for Cloud SQL operation ${operationName}…`),
|
|
60
64
|
),
|
|
61
65
|
),
|
package/src/Sqladmin/User.ts
CHANGED
|
@@ -183,6 +183,8 @@ export const SqlUserProvider = () =>
|
|
|
183
183
|
);
|
|
184
184
|
|
|
185
185
|
return {
|
|
186
|
+
nuke: { skip: true },
|
|
187
|
+
list: () => Effect.succeed([]),
|
|
186
188
|
stables: ["name", "instance", "project", "host", "type"],
|
|
187
189
|
diff: Effect.fn(function* ({ news, olds = {} }) {
|
|
188
190
|
if (!isResolved(news)) return undefined;
|
package/src/Storage/Bucket.ts
CHANGED
|
@@ -303,13 +303,16 @@ export const StorageBucketProvider = () =>
|
|
|
303
303
|
});
|
|
304
304
|
}).pipe(
|
|
305
305
|
Effect.retry({
|
|
306
|
-
schedule: Schedule.
|
|
307
|
-
Schedule.
|
|
308
|
-
|
|
306
|
+
schedule: Schedule.max([
|
|
307
|
+
Schedule.exponential(Duration.seconds(2)),
|
|
308
|
+
Schedule.recurs(8),
|
|
309
|
+
]),
|
|
309
310
|
}),
|
|
310
311
|
);
|
|
311
312
|
|
|
312
313
|
return {
|
|
314
|
+
nuke: { skip: true },
|
|
315
|
+
list: () => Effect.succeed([]),
|
|
313
316
|
stables: ["name", "id", "selfLink", "location", "timeCreated"],
|
|
314
317
|
diff: Effect.fn(function* ({ news, olds = {}, output }) {
|
|
315
318
|
if (!isResolved(news)) return undefined;
|
|
@@ -150,9 +150,10 @@ export const StorageBucketIamMemberProvider = () =>
|
|
|
150
150
|
eff.pipe(
|
|
151
151
|
Effect.retry({
|
|
152
152
|
while: (e) => (e as { _tag?: string })?._tag !== "ConfigError",
|
|
153
|
-
schedule: Schedule.
|
|
154
|
-
Schedule.
|
|
155
|
-
|
|
153
|
+
schedule: Schedule.max([
|
|
154
|
+
Schedule.exponential(Duration.seconds(2)),
|
|
155
|
+
Schedule.recurs(8),
|
|
156
|
+
]),
|
|
156
157
|
}),
|
|
157
158
|
);
|
|
158
159
|
|
|
@@ -185,6 +186,8 @@ export const StorageBucketIamMemberProvider = () =>
|
|
|
185
186
|
|
|
186
187
|
return {
|
|
187
188
|
// Identity IS the tuple; all fields are static values.
|
|
189
|
+
nuke: { skip: true },
|
|
190
|
+
list: () => Effect.succeed([]),
|
|
188
191
|
stables: ["bucket", "role", "member", "condition"],
|
|
189
192
|
diff: Effect.fn(function* ({ news, olds = {}, output }) {
|
|
190
193
|
if (!isResolved(news)) return undefined;
|