@go-to-k/cdkd 0.284.2 → 0.284.4
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 +29 -1
- package/dist/{asg-provider-CMuiarRD.js → asg-provider-C0L3_pHn.js} +2 -2
- package/dist/{asg-provider-CMuiarRD.js.map → asg-provider-C0L3_pHn.js.map} +1 -1
- package/dist/cli.js +68 -10
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-NER3C-7K.js → deploy-engine-3Z7P1hKs.js} +365 -39
- package/dist/deploy-engine-3Z7P1hKs.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-NER3C-7K.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as IntrinsicFunctionResolver, $n as StackTerminationProtectionError, $t as buildDenyExternalAccessPolicy, A as formatResourceLine, An as processStackMessages, At as withRetry, B as isExportAliasCollision, Bt as buildAssetRedirectMap, C as refusesFinalSnapshot, Cn as findLargeInlineResources, Ct as s3BucketDualStackDomainName, D as MULTI_REGION_RECREATE_BLOCKED_TYPES, Dn as canonicalizeRegion, Dt as DiffCalculator, E as extractDeploymentEventError, En as PARTITION_TABLE, Et as applyRoleArnIfSet, F as red, Fn as resetAwsClients, Ft as rebuildClientForBucketRegion, G as clearOnUpdateRemoval, Gt as stripControlChars, H as stateKeySecretExposure, Hn as LocalInvokeBuildError$1, Ht as loadPublishableAssetManifest, I as yellow, In as setAwsClients, It as shouldRetainResource, J as findSilentDropProperties, Jn as PartialFailureError, Jt as ensureAssetStorage, K as ProviderRegistry, Kn as MissingCdkCliError, Kt as AssetModeResolver, L as collectDeclaredOutputNames, Lt as AssetPublisher, M as cyan, Mn as resolveBucketRegion, Mt as TemplateParser, N as gray, Nn as AwsClients, Nt as LockManager, O as isStatefulRecreateTargetSync, On as derivePartitionAndUrlSuffix, Ot as INTRINSIC_KEYS, P as green, Pn as getAwsClients, Pt as S3StateBackend, Q as isTerminationProtectionPropagationError, Qn as StackHasActiveImportsError, Qt as validateContainerRepoName, R as collectPublishedOutputNames, Rn as CdkdError, Rt as stringifyValue, S as isFinalSnapshotError, Sn as MIGRATE_TMP_PREFIX, St as s3BucketDomainName, T as makeCanonicalizePropertiesFn, Tn as expectedOwnerParam, Tt as s3BucketWebsiteUrl, U as IAMRoleProvider, Un as LocalMigrateError, Ut as rewriteTemplateAssetReferences, V as secretBearingStateKeyWarning, Vn as DeployCancelledError, Vt as createAssetRedirectResolver, W as collectInlinePolicyNamesManagedBySiblings, Wn as LocalStartServiceError, Wt as escapeRegExp, X as slowCcOperationTimeoutMs, Xn as ResourceTimeoutError, Xt as parseBootstrapMarker, Y as CloudControlProvider, Yn as ProvisioningError, Yt as getBootstrapMarkerKey, Z as disableInstanceApiTermination, Zn as ResourceUpdateNotSupportedError, Zt as validateAssetBucketName, _ as ATOMIC_FINAL_SNAPSHOT_TYPES, _n as resolveUseCdkBootstrapAssets, _t as TEMPLATE_SOURCED_RULES, a as DeploymentEventsStore, an as AssetManifestLoader, ar as withErrorHandling, at as resolveExplicitPhysicalId, b as ccRoutedFinalSnapshotError, bn as CFN_TEMPLATE_BODY_LIMIT, bt as scrubResourceRecord, c as replayFailedOperations, cn as synthesisStatusMessage, cr as isThrottlingError, ct as configBooleanRefusal, d as updatePartialReason, dn as resolveApp, dt as replayWarn, en as buildDockerImage, et as cfnRefValueFromPhysicalId, f as UNSPECIFIED_SKIP_REASON, fn as resolveAutoAssetStorage, ft as requireConfigArray, g as computeImplicitDeleteEdges, gn as resolveStateBucketWithDefaultAndSource, gt as STATE_SOURCED_READBACK_RULES, h as IMPLICIT_DELETE_DEPENDENCIES, hn as resolveStateBucketWithDefault, ht as STATE_SOURCED_CROSS_GENERATION_RULES, i as DeploymentEventsReader, in as runDockerStreaming, ir as normalizeAwsError, it as normalizeAwsTagsToCfn, j as bold, jt as DagBuilder, k as renderStatefulReason, kn as AssemblyReader, kt as describeTypeWithThrottleRetry, l as replayRollback, ln as getDefaultStateBucketName, lr as markNonRetryable, lt as configStringRefusal, m as withResourceDeadline, mn as resolveSkipPrefix, mt as requireConfigString, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as getDockerCmd, nt as refStateLookupFromResource, o as planFailedOps, on as getDockerImageBySourceHash, or as isMarkedNonRetryable, ot as assertRegionMatch, p as deleteSkipReason, pn as resolveCaptureObservedState, pt as requireConfigObject, q as findActionableSilentDrops, qn as NestedStackChildDirectDestroyError, qt as BOOTSTRAP_MARKER_PREFIX, r as DeployEngine, rn as runDockerForeground, rt as WAFv2WebACLProvider, s as planRollback, sn as Synthesizer, sr as isRetryableTransientError, st as coerceCfnBoolean, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as formatDockerLoginError, tt as getAccountInfo, u as updatePartialMessage, un as getLegacyStateBucketName, ut as readConfigString, v as PRE_DELETE_SNAPSHOT_TYPES, vn as stateBucketExistenceConfirmed, vt as maskSecretsInText, w as unsupportedFinalSnapshotError, wn as uploadCfnTemplate, wt as s3BucketRegionalDomainName, x as createPreDeleteFinalSnapshot, xn as CFN_TEMPLATE_URL_LIMIT, xt as s3BucketArn, y as buildFinalSnapshotIdentifier, yn as warnDeprecatedNoPrefixCliFlag, yt as redactSecretsForState, z as exportAliasCollisionScrubWarning, zt as WorkGraph } from "./deploy-engine-
|
|
2
|
+
import { $ as IntrinsicFunctionResolver, $n as StackTerminationProtectionError, $t as buildDenyExternalAccessPolicy, A as formatResourceLine, An as processStackMessages, At as withRetry, B as isExportAliasCollision, Bt as buildAssetRedirectMap, C as refusesFinalSnapshot, Cn as findLargeInlineResources, Ct as s3BucketDualStackDomainName, D as MULTI_REGION_RECREATE_BLOCKED_TYPES, Dn as canonicalizeRegion, Dt as DiffCalculator, E as extractDeploymentEventError, En as PARTITION_TABLE, Et as applyRoleArnIfSet, F as red, Fn as resetAwsClients, Ft as rebuildClientForBucketRegion, G as clearOnUpdateRemoval, Gt as stripControlChars, H as stateKeySecretExposure, Hn as LocalInvokeBuildError$1, Ht as loadPublishableAssetManifest, I as yellow, In as setAwsClients, It as shouldRetainResource, J as findSilentDropProperties, Jn as PartialFailureError, Jt as ensureAssetStorage, K as ProviderRegistry, Kn as MissingCdkCliError, Kt as AssetModeResolver, L as collectDeclaredOutputNames, Lt as AssetPublisher, M as cyan, Mn as resolveBucketRegion, Mt as TemplateParser, N as gray, Nn as AwsClients, Nt as LockManager, O as isStatefulRecreateTargetSync, On as derivePartitionAndUrlSuffix, Ot as INTRINSIC_KEYS, P as green, Pn as getAwsClients, Pt as S3StateBackend, Q as isTerminationProtectionPropagationError, Qn as StackHasActiveImportsError, Qt as validateContainerRepoName, R as collectPublishedOutputNames, Rn as CdkdError, Rt as stringifyValue, S as isFinalSnapshotError, Sn as MIGRATE_TMP_PREFIX, St as s3BucketDomainName, T as makeCanonicalizePropertiesFn, Tn as expectedOwnerParam, Tt as s3BucketWebsiteUrl, U as IAMRoleProvider, Un as LocalMigrateError, Ut as rewriteTemplateAssetReferences, V as secretBearingStateKeyWarning, Vn as DeployCancelledError, Vt as createAssetRedirectResolver, W as collectInlinePolicyNamesManagedBySiblings, Wn as LocalStartServiceError, Wt as escapeRegExp, X as slowCcOperationTimeoutMs, Xn as ResourceTimeoutError, Xt as parseBootstrapMarker, Y as CloudControlProvider, Yn as ProvisioningError, Yt as getBootstrapMarkerKey, Z as disableInstanceApiTermination, Zn as ResourceUpdateNotSupportedError, Zt as validateAssetBucketName, _ as ATOMIC_FINAL_SNAPSHOT_TYPES, _n as resolveUseCdkBootstrapAssets, _t as TEMPLATE_SOURCED_RULES, a as DeploymentEventsStore, an as AssetManifestLoader, ar as withErrorHandling, at as resolveExplicitPhysicalId, b as ccRoutedFinalSnapshotError, bn as CFN_TEMPLATE_BODY_LIMIT, bt as scrubResourceRecord, c as replayFailedOperations, cn as synthesisStatusMessage, cr as isThrottlingError, ct as configBooleanRefusal, d as updatePartialReason, dn as resolveApp, dt as replayWarn, en as buildDockerImage, et as cfnRefValueFromPhysicalId, f as UNSPECIFIED_SKIP_REASON, fn as resolveAutoAssetStorage, ft as requireConfigArray, g as computeImplicitDeleteEdges, gn as resolveStateBucketWithDefaultAndSource, gt as STATE_SOURCED_READBACK_RULES, h as IMPLICIT_DELETE_DEPENDENCIES, hn as resolveStateBucketWithDefault, ht as STATE_SOURCED_CROSS_GENERATION_RULES, i as DeploymentEventsReader, in as runDockerStreaming, ir as normalizeAwsError, it as normalizeAwsTagsToCfn, j as bold, jt as DagBuilder, k as renderStatefulReason, kn as AssemblyReader, kt as describeTypeWithThrottleRetry, l as replayRollback, ln as getDefaultStateBucketName, lr as markNonRetryable, lt as configStringRefusal, m as withResourceDeadline, mn as resolveSkipPrefix, mt as requireConfigString, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as getDockerCmd, nt as refStateLookupFromResource, o as planFailedOps, on as getDockerImageBySourceHash, or as isMarkedNonRetryable, ot as assertRegionMatch, p as deleteSkipReason, pn as resolveCaptureObservedState, pt as requireConfigObject, q as findActionableSilentDrops, qn as NestedStackChildDirectDestroyError, qt as BOOTSTRAP_MARKER_PREFIX, r as DeployEngine, rn as runDockerForeground, rt as WAFv2WebACLProvider, s as planRollback, sn as Synthesizer, sr as isRetryableTransientError, st as coerceCfnBoolean, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as formatDockerLoginError, tt as getAccountInfo, u as updatePartialMessage, un as getLegacyStateBucketName, ut as readConfigString, v as PRE_DELETE_SNAPSHOT_TYPES, vn as stateBucketExistenceConfirmed, vt as maskSecretsInText, w as unsupportedFinalSnapshotError, wn as uploadCfnTemplate, wt as s3BucketRegionalDomainName, x as createPreDeleteFinalSnapshot, xn as CFN_TEMPLATE_URL_LIMIT, xt as s3BucketArn, y as buildFinalSnapshotIdentifier, yn as warnDeprecatedNoPrefixCliFlag, yt as redactSecretsForState, z as exportAliasCollisionScrubWarning, zt as WorkGraph } from "./deploy-engine-3Z7P1hKs.js";
|
|
3
3
|
import { a as getLiveRenderer, c as PATTERN_B_RESOURCE_TYPES, d as generateResourceNameWithFallback, h as withStackName, i as runStackBuffered, m as withSkipPrefix, n as getLogger, o as PATTERN_B_NAME_OPTIONS, s as PATTERN_B_NAME_PROPERTIES, u as generateResourceName } from "./logger-zRrlbaQt.js";
|
|
4
|
-
import { t as ASGProvider } from "./asg-provider-
|
|
4
|
+
import { t as ASGProvider } from "./asg-provider-C0L3_pHn.js";
|
|
5
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6
6
|
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
7
7
|
import { CopyObjectCommand, CreateBucketCommand, DeleteBucketAnalyticsConfigurationCommand, DeleteBucketCommand, DeleteBucketCorsCommand, DeleteBucketEncryptionCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketOwnershipControlsCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketNotificationConfigurationCommand, GetBucketOwnershipControlsCommand, GetBucketPolicyCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetBucketVersioningCommand, GetBucketWebsiteCommand, GetObjectCommand, GetObjectLockConfigurationCommand, GetPublicAccessBlockCommand, HeadBucketCommand, ListBucketAnalyticsConfigurationsCommand, ListBucketIntelligentTieringConfigurationsCommand, ListBucketInventoryConfigurationsCommand, ListBucketMetricsConfigurationsCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, PutBucketAccelerateConfigurationCommand, PutBucketAnalyticsConfigurationCommand, PutBucketCorsCommand, PutBucketEncryptionCommand, PutBucketIntelligentTieringConfigurationCommand, PutBucketInventoryConfigurationCommand, PutBucketLifecycleConfigurationCommand, PutBucketLoggingCommand, PutBucketMetricsConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketOwnershipControlsCommand, PutBucketPolicyCommand, PutBucketReplicationCommand, PutBucketTaggingCommand, PutBucketVersioningCommand, PutBucketWebsiteCommand, PutObjectCommand, PutObjectLockConfigurationCommand, PutPublicAccessBlockCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
|
|
@@ -591,6 +591,37 @@ const useCdkBootstrapAssetsOption = new Option("--use-cdk-bootstrap-assets", "Pu
|
|
|
591
591
|
*/
|
|
592
592
|
const strictGetattOption = new Option("--strict-getatt", "Fail the deploy on ANY Fn::GetAtt that falls back to the physical ID because cdkd cannot construct the attribute (default: warn and use the physical ID, hard-failing only when the fallback is knowably wrong — an *Arn attribute with a non-ARN value or a *Url attribute with a non-http(s) value). Also fails the deploy when a stack Output cannot be resolved (default: warn and store no value).").default(false);
|
|
593
593
|
/**
|
|
594
|
+
* Issue [#1960](https://github.com/go-to-k/cdkd/issues/1960) —
|
|
595
|
+
* `--allow-unaddressed` (deploy only). A deploy that finishes having left a
|
|
596
|
+
* resource cdkd was responsible for ALIVE in AWS and no longer in state exits
|
|
597
|
+
* 2 (partial failure), matching what `cdkd destroy` has done for the identical
|
|
598
|
+
* outcome since issue #1752. Two cases produce it:
|
|
599
|
+
*
|
|
600
|
+
* - a skipped DELETE (issue #1762) — a resource removed from the template
|
|
601
|
+
* whose provider could not issue the delete, typically because the state
|
|
602
|
+
* record is malformed (see `src/provisioning/composite-id.ts`);
|
|
603
|
+
* - a partial UPDATE (issue #1819) — a replacement whose new resource was
|
|
604
|
+
* created and whose OLD one survives untracked, most commonly an ACM
|
|
605
|
+
* certificate a consumer still references.
|
|
606
|
+
*
|
|
607
|
+
* This flag forces exit 0 for both. It exists because the partial-UPDATE case
|
|
608
|
+
* has a legitimate not-yet-fixable window: an ACM replacement blocked on
|
|
609
|
+
* `DescribeCertificate.InUseBy` clears itself once the consumer (e.g. a
|
|
610
|
+
* CloudFront distribution in another stack) finishes updating, so a pipeline
|
|
611
|
+
* can be red for a cause it cannot act on. Wrapping the command in a shell
|
|
612
|
+
* exit-code test is NOT an equivalent workaround — `cdkd deploy` also exits 2
|
|
613
|
+
* for `MacroExpansionError` and `ResourceUpdateNotSupportedError`, so a
|
|
614
|
+
* `|| [ $? -eq 2 ]` wrapper silences unrelated real failures; this flag is
|
|
615
|
+
* scoped to the one cause.
|
|
616
|
+
*
|
|
617
|
+
* The flag suppresses only the EXIT CODE. The summary rows
|
|
618
|
+
* (`Skipped (not deleted)` / `of which left an orphaned predecessor`), the
|
|
619
|
+
* per-resource warnings, and the `RunCounts.skipped` figure in `cdkd events`
|
|
620
|
+
* are all emitted unchanged, so a run that used it still says in its log that
|
|
621
|
+
* a resource survived.
|
|
622
|
+
*/
|
|
623
|
+
const allowUnaddressedOption = new Option("--allow-unaddressed", "Exit 0 even when the deploy left a resource unaddressed — a DELETE the provider could not issue, or a replacement whose old resource survives untracked (default: exit 2, matching cdkd destroy). The summary rows and warnings are printed either way; only the exit code changes.").default(false);
|
|
624
|
+
/**
|
|
594
625
|
* Issue #1697 — `--no-cfn-fallback` (deploy + diff). By default, a
|
|
595
626
|
* cross-stack reference (`Fn::ImportValue` / `Fn::GetStackOutput`) that is
|
|
596
627
|
* not found in cdkd state falls back to CloudFormation (`ListExports` /
|
|
@@ -639,6 +670,7 @@ const deployOptions = [
|
|
|
639
670
|
useCdkBootstrapAssetsOption,
|
|
640
671
|
strictGetattOption,
|
|
641
672
|
noCfnFallbackOption,
|
|
673
|
+
allowUnaddressedOption,
|
|
642
674
|
...resourceTimeoutOptions
|
|
643
675
|
];
|
|
644
676
|
/**
|
|
@@ -2069,15 +2101,31 @@ function startRunRecorder(args) {
|
|
|
2069
2101
|
return recorder;
|
|
2070
2102
|
}
|
|
2071
2103
|
/**
|
|
2072
|
-
* Emit a
|
|
2073
|
-
* (dry-run / older state). `durationMs` is
|
|
2074
|
-
* carry one at the run level).
|
|
2104
|
+
* Emit a `RUN_FINISHED` carrying COUNTS under a caller-chosen result. No-op
|
|
2105
|
+
* when `recorder` is `undefined` (dry-run / older state). `durationMs` is
|
|
2106
|
+
* optional (destroy does not carry one at the run level).
|
|
2107
|
+
*
|
|
2108
|
+
* Replaced a `recordRunSucceeded` that hard-coded `'SUCCEEDED'`, because
|
|
2109
|
+
* deploy has an outcome that is neither a clean success nor a thrown failure:
|
|
2110
|
+
* a run that finished, failed no resource, and yet left one
|
|
2111
|
+
* cdkd was responsible for alive in AWS (issue
|
|
2112
|
+
* [#1960](https://github.com/go-to-k/cdkd/issues/1960)). That run exits 2, so
|
|
2113
|
+
* recording it as `SUCCEEDED` would put the durable post-mortem at odds with
|
|
2114
|
+
* the exit code the same run returned.
|
|
2115
|
+
*
|
|
2116
|
+
* {@link recordRunFailed} cannot serve it: that one carries error metadata and
|
|
2117
|
+
* NO counts, and the `skipped` count is the only thing in the summary that says
|
|
2118
|
+
* a resource survived — dropping it would leave `cdkd events` showing a failed
|
|
2119
|
+
* run naming nothing that failed, which is the exact shape the destroy side
|
|
2120
|
+
* added `skipped` to avoid. `cdkd destroy` already records `FAILED` for this
|
|
2121
|
+
* outcome (see the `skippedCount > 0` arm in src/cli/commands/destroy.ts), so
|
|
2122
|
+
* this is parity rather than a new convention.
|
|
2075
2123
|
*/
|
|
2076
|
-
function
|
|
2124
|
+
function recordRunOutcome(recorder, stackName, result, counts, durationMs) {
|
|
2077
2125
|
recorder?.record({
|
|
2078
2126
|
eventType: "RUN_FINISHED",
|
|
2079
2127
|
stackName,
|
|
2080
|
-
result
|
|
2128
|
+
result,
|
|
2081
2129
|
...durationMs !== void 0 && { durationMs },
|
|
2082
2130
|
counts
|
|
2083
2131
|
});
|
|
@@ -58210,6 +58258,8 @@ async function deployCommand(stacks, options) {
|
|
|
58210
58258
|
const summary = workGraph.summary();
|
|
58211
58259
|
logger.debug(`Work graph: ${summary["asset-publish"]} asset(s), ${summary["stack"]} stack(s)`);
|
|
58212
58260
|
const bufferStackOutput = targetStacks.length > 1;
|
|
58261
|
+
let totalUnaddressed = 0;
|
|
58262
|
+
let cancelledStacks = 0;
|
|
58213
58263
|
const runStack = async (stackInfo) => {
|
|
58214
58264
|
return withSkipPrefix(skipPrefix, () => runStackInner(stackInfo));
|
|
58215
58265
|
};
|
|
@@ -58342,6 +58392,8 @@ async function deployCommand(stacks, options) {
|
|
|
58342
58392
|
logger.info(` Deleted: ${deployResult.deleted > 0 ? red(deployResult.deleted) : gray(deployResult.deleted)}`);
|
|
58343
58393
|
if (deployResult.deleteSkipped > 0) logger.info(` Skipped (not deleted): ${yellow(deployResult.deleteSkipped)}`);
|
|
58344
58394
|
if (deployResult.updatePartial > 0) logger.info(` of which left an orphaned predecessor: ${yellow(deployResult.updatePartial)}`);
|
|
58395
|
+
const stackUnaddressed = deployResult.deleteSkipped + deployResult.updatePartial;
|
|
58396
|
+
if (!options.dryRun) totalUnaddressed += stackUnaddressed;
|
|
58345
58397
|
logger.info(` Unchanged: ${gray(deployResult.unchanged)}`);
|
|
58346
58398
|
logger.info(` Duration: ${cyan((deployResult.durationMs / 1e3).toFixed(2) + "s")}`);
|
|
58347
58399
|
if (deployResult.attributeFallbackCount > 0) logger.warn(`${deployResult.attributeFallbackCount} attribute resolution(s) fell back to the physical ID (potentially wrong values); re-run with --strict-getatt to fail on these`);
|
|
@@ -58350,15 +58402,20 @@ async function deployCommand(stacks, options) {
|
|
|
58350
58402
|
for (const [key, value] of Object.entries(deployResult.outputs)) logger.info(` ${deployResult.stackName}.${key} = ${String(value)}`);
|
|
58351
58403
|
}
|
|
58352
58404
|
if (options.dryRun) logger.info(`\n${green("✓")} ${bold("Dry run completed")} - no actual changes made`);
|
|
58405
|
+
else if (stackUnaddressed > 0) logger.warn(`\n⚠ ${bold(`Stack ${deployResult.stackName} deployed, but ${stackUnaddressed} resource(s) were left unaddressed`)} — they may still exist in AWS. ` + (options.allowUnaddressed ? `Exiting 0 because --allow-unaddressed was passed.` : "This counts toward a non-zero exit (2 unless something else fails; pass --allow-unaddressed to exit 0)."));
|
|
58353
58406
|
else logger.info(`\n${green("✓")} ${bold("Deployment completed successfully")}`);
|
|
58354
|
-
|
|
58407
|
+
if (!options.dryRun && stackUnaddressed > 0) runResult = "FAILED";
|
|
58408
|
+
recordRunOutcome(eventRecorder, stackInfo.stackName, runResult, {
|
|
58355
58409
|
created: deployResult.created,
|
|
58356
58410
|
updated: deployResult.updated + deployResult.updatePartial,
|
|
58357
58411
|
deleted: deployResult.deleted,
|
|
58358
58412
|
...deployResult.deleteSkipped + deployResult.updatePartial > 0 && { skipped: deployResult.deleteSkipped + deployResult.updatePartial }
|
|
58359
58413
|
}, deployResult.durationMs);
|
|
58360
58414
|
} catch (deployError) {
|
|
58361
|
-
if (deployError instanceof DeployCancelledError)
|
|
58415
|
+
if (deployError instanceof DeployCancelledError) {
|
|
58416
|
+
cancelledStacks++;
|
|
58417
|
+
return;
|
|
58418
|
+
}
|
|
58362
58419
|
runResult = "FAILED";
|
|
58363
58420
|
recordRunFailed(eventRecorder, stackInfo.stackName, deployError);
|
|
58364
58421
|
throw deployError;
|
|
@@ -58387,6 +58444,7 @@ async function deployCommand(stacks, options) {
|
|
|
58387
58444
|
if (!outcome.ok) throw outcome.error;
|
|
58388
58445
|
}
|
|
58389
58446
|
});
|
|
58447
|
+
if (totalUnaddressed > 0 && !options.allowUnaddressed) throw new PartialFailureError(`Deploy left ${totalUnaddressed} resource(s) unaddressed, so they may still exist in AWS. The two cases differ in what happens next: a DELETE the provider could not issue KEEPS its state record, so the next 'cdkd deploy' re-attempts it, while a replacement's surviving predecessor is NOT tracked and will never be retried — delete it by hand. The per-stack summaries above give the breakdown, and each resource's own warning names its cause and remedy. ` + (cancelledStacks > 0 ? `Note ${cancelledStacks} stack(s) were also cancelled and never deployed, so the template is not fully applied beyond the resources named above. ` : "") + `Pass --allow-unaddressed to exit 0 instead.`);
|
|
58390
58448
|
} finally {
|
|
58391
58449
|
unforwardSigterm();
|
|
58392
58450
|
process.removeListener("SIGINT", topLevelSigintHandler);
|
|
@@ -81997,7 +82055,7 @@ function createMigrateCommand() {
|
|
|
81997
82055
|
*/
|
|
81998
82056
|
function buildProgram() {
|
|
81999
82057
|
const program = new Command();
|
|
82000
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.284.
|
|
82058
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.284.4");
|
|
82001
82059
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
82002
82060
|
const { profile } = actionCommand.optsWithGlobals();
|
|
82003
82061
|
if (profile !== void 0) process.env["AWS_PROFILE"] = profile;
|