@go-to-k/cdkd 0.221.9 → 0.221.11
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.
|
@@ -6609,6 +6609,13 @@ var IntrinsicFunctionResolver = class {
|
|
|
6609
6609
|
* SECRET_ID can be a simple name or an ARN (arn:aws:secretsmanager:REGION:ACCOUNT:secret:NAME)
|
|
6610
6610
|
* which contains colons, so we cannot simply split on ':'.
|
|
6611
6611
|
* Instead, we find ':SecretString:' or ':SecretBinary:' as the delimiter.
|
|
6612
|
+
*
|
|
6613
|
+
* The whole-secret form omits everything after the type segment and carries no trailing
|
|
6614
|
+
* colon: "secretsmanager:SECRET_ID:SecretString" (returns the full secret string). We detect
|
|
6615
|
+
* it with an end-anchored check so that, for the whole-secret form, a SECRET_ID that merely
|
|
6616
|
+
* contains ":SecretString" mid-name is not split incorrectly. (The end-anchored fallback only
|
|
6617
|
+
* runs when no mid-string ":SecretString:" delimiter is present, so the json-key / version
|
|
6618
|
+
* forms are unaffected.)
|
|
6612
6619
|
*/
|
|
6613
6620
|
async resolveSecretsManagerReference(inner) {
|
|
6614
6621
|
const afterService = inner.substring(15);
|
|
@@ -6616,10 +6623,20 @@ var IntrinsicFunctionResolver = class {
|
|
|
6616
6623
|
let jsonKey = "";
|
|
6617
6624
|
let versionStage = "";
|
|
6618
6625
|
let versionId = "";
|
|
6619
|
-
|
|
6620
|
-
|
|
6626
|
+
let secretStringIdx = afterService.indexOf(":SecretString:");
|
|
6627
|
+
let secretBinaryIdx = afterService.indexOf(":SecretBinary:");
|
|
6628
|
+
let delimiterLenAtBinary = 14;
|
|
6629
|
+
let delimiterLenAtString = 14;
|
|
6630
|
+
if (secretStringIdx < 0 && afterService.endsWith(":SecretString")) {
|
|
6631
|
+
secretStringIdx = afterService.length - 13;
|
|
6632
|
+
delimiterLenAtString = 13;
|
|
6633
|
+
}
|
|
6634
|
+
if (secretBinaryIdx < 0 && afterService.endsWith(":SecretBinary")) {
|
|
6635
|
+
secretBinaryIdx = afterService.length - 13;
|
|
6636
|
+
delimiterLenAtBinary = 13;
|
|
6637
|
+
}
|
|
6621
6638
|
const delimiterIdx = secretStringIdx >= 0 && secretBinaryIdx >= 0 ? Math.min(secretStringIdx, secretBinaryIdx) : secretStringIdx >= 0 ? secretStringIdx : secretBinaryIdx;
|
|
6622
|
-
const delimiterLen = delimiterIdx >= 0 && delimiterIdx === secretBinaryIdx ?
|
|
6639
|
+
const delimiterLen = delimiterIdx >= 0 && delimiterIdx === secretBinaryIdx ? delimiterLenAtBinary : delimiterLenAtString;
|
|
6623
6640
|
if (delimiterIdx >= 0) {
|
|
6624
6641
|
secretId = afterService.substring(0, delimiterIdx);
|
|
6625
6642
|
const remainingParts = afterService.substring(delimiterIdx + delimiterLen).split(":");
|
|
@@ -11607,7 +11624,8 @@ const RETRYABLE_ERROR_MESSAGE_PATTERNS = [
|
|
|
11607
11624
|
"Could not deliver test message",
|
|
11608
11625
|
"wait 60 seconds",
|
|
11609
11626
|
"concurrent update operation",
|
|
11610
|
-
"because it is in use"
|
|
11627
|
+
"because it is in use",
|
|
11628
|
+
"Rate exceeded"
|
|
11611
11629
|
];
|
|
11612
11630
|
/**
|
|
11613
11631
|
* HTTP status codes that always indicate a transient failure worth retrying.
|
|
@@ -11615,18 +11633,62 @@ const RETRYABLE_ERROR_MESSAGE_PATTERNS = [
|
|
|
11615
11633
|
*/
|
|
11616
11634
|
const RETRYABLE_HTTP_STATUS_CODES = new Set([429, 503]);
|
|
11617
11635
|
/**
|
|
11636
|
+
* AWS SDK v3 canonical throttling error names. Mirrors
|
|
11637
|
+
* `@aws-sdk/service-error-classification`'s `THROTTLING_ERROR_CODES` — any
|
|
11638
|
+
* error (or wrapped cause) whose `name` is one of these is a transient rate-
|
|
11639
|
+
* limit rejection worth retrying with backoff. Detecting by NAME is more
|
|
11640
|
+
* robust than by HTTP status because most AWS throttles surface as HTTP 400
|
|
11641
|
+
* (not 429) with the throttling signal carried only in the error code / name
|
|
11642
|
+
* (e.g. SSM `ThrottlingException` for the `Rate exceeded` message).
|
|
11643
|
+
*/
|
|
11644
|
+
const THROTTLING_ERROR_NAMES = new Set([
|
|
11645
|
+
"BandwidthLimitExceeded",
|
|
11646
|
+
"EC2ThrottledException",
|
|
11647
|
+
"LimitExceededException",
|
|
11648
|
+
"PriorRequestNotComplete",
|
|
11649
|
+
"ProvisionedThroughputExceededException",
|
|
11650
|
+
"RequestLimitExceeded",
|
|
11651
|
+
"RequestThrottled",
|
|
11652
|
+
"RequestThrottledException",
|
|
11653
|
+
"SlowDown",
|
|
11654
|
+
"ThrottledException",
|
|
11655
|
+
"Throttling",
|
|
11656
|
+
"ThrottlingException",
|
|
11657
|
+
"TooManyRequestsException",
|
|
11658
|
+
"TransactionInProgressException"
|
|
11659
|
+
]);
|
|
11660
|
+
/**
|
|
11661
|
+
* Walk the error + its `.cause` chain (bounded) looking for an AWS SDK v3
|
|
11662
|
+
* throttling error `name`. cdkd wraps the original AWS error in a
|
|
11663
|
+
* `ProvisioningError`, so the throttling signal is typically one cause-link
|
|
11664
|
+
* deep; the bounded walk also tolerates SDK errors that nest a `$response`/
|
|
11665
|
+
* cause without exploding on a cyclic chain.
|
|
11666
|
+
*/
|
|
11667
|
+
function isThrottlingError(error) {
|
|
11668
|
+
let current = error;
|
|
11669
|
+
for (let depth = 0; depth < 5 && current != null; depth++) {
|
|
11670
|
+
const name = current.name;
|
|
11671
|
+
if (typeof name === "string" && THROTTLING_ERROR_NAMES.has(name)) return true;
|
|
11672
|
+
current = current.cause;
|
|
11673
|
+
}
|
|
11674
|
+
return false;
|
|
11675
|
+
}
|
|
11676
|
+
/**
|
|
11618
11677
|
* Determine whether an AWS error should be retried.
|
|
11619
11678
|
*
|
|
11620
11679
|
* Checks (in order):
|
|
11621
11680
|
* 1. HTTP status code on the error itself (`$metadata.httpStatusCode`)
|
|
11622
11681
|
* 2. HTTP status code on a wrapped cause (`cause.$metadata.httpStatusCode`)
|
|
11623
|
-
* 3.
|
|
11682
|
+
* 3. Throttling error `name` on the error or any wrapped cause (most AWS
|
|
11683
|
+
* throttles are HTTP 400, not 429 — see {@link THROTTLING_ERROR_NAMES})
|
|
11684
|
+
* 4. Substring match against {@link RETRYABLE_ERROR_MESSAGE_PATTERNS}
|
|
11624
11685
|
*/
|
|
11625
11686
|
function isRetryableTransientError(error, message) {
|
|
11626
11687
|
const statusCode = error.$metadata?.httpStatusCode;
|
|
11627
11688
|
if (statusCode !== void 0 && RETRYABLE_HTTP_STATUS_CODES.has(statusCode)) return true;
|
|
11628
11689
|
const causeStatus = error.cause?.$metadata?.httpStatusCode;
|
|
11629
11690
|
if (causeStatus !== void 0 && RETRYABLE_HTTP_STATUS_CODES.has(causeStatus)) return true;
|
|
11691
|
+
if (isThrottlingError(error)) return true;
|
|
11630
11692
|
return RETRYABLE_ERROR_MESSAGE_PATTERNS.some((p) => message.includes(p));
|
|
11631
11693
|
}
|
|
11632
11694
|
|
|
@@ -13078,4 +13140,4 @@ var DeployEngine = class {
|
|
|
13078
13140
|
|
|
13079
13141
|
//#endregion
|
|
13080
13142
|
export { AssemblyReader as $, shouldRetainResource as A, getDefaultStateBucketName as B, applyRoleArnIfSet as C, LockManager as D, TemplateParser as E, formatDockerLoginError as F, resolveStateBucketWithDefault as G, resolveApp as H, getDockerCmd as I, CFN_TEMPLATE_BODY_LIMIT as J, resolveStateBucketWithDefaultAndSource as K, runDockerForeground as L, stringifyValue as M, WorkGraph as N, S3StateBackend as O, buildDockerImage as P, uploadCfnTemplate as Q, runDockerStreaming as R, IntrinsicFunctionResolver as S, DagBuilder as T, resolveCaptureObservedState as U, getLegacyStateBucketName as V, resolveSkipPrefix as W, MIGRATE_TMP_PREFIX as X, CFN_TEMPLATE_URL_LIMIT as Y, findLargeInlineResources as Z, IAMRoleProvider as _, withRetry as a, findActionableSilentDrops as b, computeImplicitDeleteEdges as c, bold as d, clearBucketRegionCache as et, cyan as f, yellow as g, red as h, withResourceDeadline as i, AssetPublisher as j, rebuildClientForBucketRegion as k, extractDeploymentEventError as l, green as m, DEFAULT_RESOURCE_WARN_AFTER_MS as n, isRetryableTransientError as o, gray as p, warnDeprecatedNoPrefixCliFlag as q, DeployEngine as r, IMPLICIT_DELETE_DEPENDENCIES as s, DEFAULT_RESOURCE_TIMEOUT_MS as t, resolveBucketRegion as tt, formatResourceLine as u, collectInlinePolicyNamesManagedBySiblings as v, DiffCalculator as w, CloudControlProvider as x, ProviderRegistry as y, Synthesizer as z };
|
|
13081
|
-
//# sourceMappingURL=deploy-engine-
|
|
13143
|
+
//# sourceMappingURL=deploy-engine-C4sRo95X.js.map
|