@go-to-k/cdkd 0.32.0 → 0.33.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/README.md CHANGED
@@ -25,7 +25,7 @@
25
25
  - **S3-based state management**: No DynamoDB required, uses S3 conditional writes for locking
26
26
  - **DAG-based parallelization**: Analyze `Ref`/`Fn::GetAtt` dependencies and execute in parallel
27
27
  - **`--no-wait` for async resources**: Skip the multi-minute wait on CloudFront / RDS / ElastiCache / NAT Gateway and return as soon as the create call returns (CloudFormation always blocks)
28
- - **`--aggressive-vpc-parallel`**: Drop CDK-injected defensive `DependsOn` edges from VPC Lambdas onto private-subnet routes so `CloudFront::Distribution` and `Lambda::Url` start their ~3-min propagation in parallel with NAT Gateway stabilization (~50% faster on VPC + Lambda + CloudFront stacks)
28
+ - **VPC route DependsOn relaxation (on by default)**: Drop CDK-injected defensive `DependsOn` edges from VPC Lambdas onto private-subnet routes so `CloudFront::Distribution` and `Lambda::Url` start their ~3-min propagation in parallel with NAT Gateway stabilization (~50% faster on VPC + Lambda + CloudFront stacks). Pass `--no-aggressive-vpc-parallel` to opt out.
29
29
 
30
30
  > **Note**: Resource types not covered by either SDK Providers or Cloud Control API cannot be deployed with cdkd. If you encounter an unsupported resource type, deployment will fail with a clear error message.
31
31
 
@@ -406,7 +406,7 @@ ElastiCache) don't apply to destroy either — their providers are
406
406
  already non-blocking on delete because they're leaves in the destroy
407
407
  DAG.
408
408
 
409
- ## `--aggressive-vpc-parallel`: relax CDK-defensive VPC route DependsOn
409
+ ## VPC route DependsOn relaxation (on by default)
410
410
 
411
411
  CDK synth eagerly injects `DependsOn` from VPC Lambdas (and adjacent
412
412
  IAM Role / Policy / Lambda::Url / EventSourceMapping resources) onto
@@ -418,35 +418,35 @@ route), but it is NOT required at *deploy time* — `CreateFunction` /
418
418
  `CreateFunctionUrlConfig` / `AddPermission` /
419
419
  `CreateEventSourceMapping` all accept a function in `Pending` state.
420
420
 
421
- For VPC + Lambda + CloudFront stacks this turns into a serial
422
- critical path:
421
+ For VPC + Lambda + CloudFront stacks the strict-CDK-ordering chain is serial:
423
422
 
424
423
  ```text
425
424
  NAT GW (~2-3 min) → DefaultRoute → Lambda → Lambda::Url → Distribution propagation (~3 min)
426
425
  ```
427
426
 
428
- Pass `--aggressive-vpc-parallel` to drop the route DependsOn so
429
- Distribution + Lambda::Url dispatch right after IAM Role / Subnet are
430
- ready and propagate in parallel with NAT stabilization:
427
+ cdkd drops the route DependsOn by default so Distribution + Lambda::Url
428
+ dispatch right after IAM Role / Subnet are ready and propagate in
429
+ parallel with NAT stabilization:
430
+
431
+ | Mode | Critical path | Total |
432
+ | --- | --- | --- |
433
+ | `--no-aggressive-vpc-parallel` (opt-out) | NAT → Lambda → CF (serial) | ~6 min |
434
+ | **default** | max(NAT, CF) | **~3 min** |
435
+
436
+ Measured **−54.6%** on `tests/integration/bench-cdk-sample` (398.59s
437
+ with `--no-aggressive-vpc-parallel` → 181.03s default).
438
+
439
+ To opt out (e.g. for a stack with a Custom Resource that synchronously
440
+ invokes a VPC Lambda outside cdkd's Lambda-ServiceToken Active wait):
431
441
 
432
442
  ```bash
433
- cdkd deploy --aggressive-vpc-parallel
443
+ cdkd deploy --no-aggressive-vpc-parallel
434
444
  ```
435
445
 
436
- | Mode | Critical path | Total |
437
- | --- | --- | --- |
438
- | Default | NAT Lambda CF (serial) | ~6 min |
439
- | `--aggressive-vpc-parallel` | max(NAT, CF) | ~3 min |
440
-
441
- Measured **−45.6%** on `tests/integration/bench-cdk-sample` (387s
442
- baseline → 211s relaxed).
443
-
444
- Off by default for v1: opt-in is the conservative play because
445
- CloudFront `Create` / `Delete` are each ~5 min, so a Lambda-side
446
- async failure incurs a high rollback cost. Deploy-only —
447
- `cdkd destroy` doesn't accept it (the route DependsOn doesn't
448
- constrain delete-time correctness; Lambda hyperplane ENI release
449
- is the actual destroy bottleneck).
446
+ Deploy-only the relaxation has no effect on destroy ordering (the
447
+ route DependsOn doesn't constrain delete-time correctness; Lambda
448
+ hyperplane ENI release is the actual destroy bottleneck and is handled
449
+ separately by `lambda-vpc-deps.ts`).
450
450
 
451
451
  See [docs/cli-reference.md](docs/cli-reference.md) for the full
452
452
  type-pair allowlist, implementation pointers, and trade-off notes.
package/dist/cli.js CHANGED
@@ -611,9 +611,9 @@ var noWaitOption = new Option(
611
611
  "Skip waiting for async resources to stabilize (CloudFront, RDS, ElastiCache, NAT Gateway)"
612
612
  );
613
613
  var aggressiveVpcParallelOption = new Option(
614
- "--aggressive-vpc-parallel",
615
- "Relax CDK-injected VPC route DependsOn to let CloudFront/Lambda::Url create in parallel with NAT GW stabilization"
616
- ).default(false);
614
+ "--no-aggressive-vpc-parallel",
615
+ "Disable the default relaxation of CDK-injected VPC route DependsOn (on by default; opt out to keep the strict CDK ordering)"
616
+ );
617
617
  var deployOptions = [
618
618
  new Option("--concurrency <number>", "Maximum concurrent resource operations").default(10).argParser((value) => parseInt(value, 10)),
619
619
  new Option("--stack-concurrency <number>", "Maximum concurrent stack deployments").default(4).argParser((value) => parseInt(value, 10)),
@@ -4800,7 +4800,7 @@ var DagBuilder = class {
4800
4800
  if (skip?.has(depId)) {
4801
4801
  relaxedEdgeCount++;
4802
4802
  this.logger.debug(
4803
- `Skipped CDK-defensive DependsOn edge: ${depId} -> ${logicalId} (--aggressive-vpc-parallel)`
4803
+ `Skipped CDK-defensive DependsOn edge: ${depId} -> ${logicalId} (default; opt out with --no-aggressive-vpc-parallel)`
4804
4804
  );
4805
4805
  continue;
4806
4806
  }
@@ -4817,7 +4817,7 @@ var DagBuilder = class {
4817
4817
  }
4818
4818
  if (relaxedEdgeCount > 0) {
4819
4819
  this.logger.info(
4820
- `[DagBuilder] Relaxed ${relaxedEdgeCount} CDK-defensive DependsOn edge(s) (--aggressive-vpc-parallel)`
4820
+ `[DagBuilder] Relaxed ${relaxedEdgeCount} CDK-defensive DependsOn edge(s) (default; opt out with --no-aggressive-vpc-parallel)`
4821
4821
  );
4822
4822
  }
4823
4823
  this.logger.debug(`Dependency graph built: ${resourceIds.length} nodes, ${edgeCount} edges`);
@@ -36436,7 +36436,7 @@ function reorderArgs(argv) {
36436
36436
  }
36437
36437
  async function main() {
36438
36438
  const program = new Command13();
36439
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.32.0");
36439
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.33.0");
36440
36440
  program.addCommand(createBootstrapCommand());
36441
36441
  program.addCommand(createSynthCommand());
36442
36442
  program.addCommand(createListCommand());