cdk-preflight 1.3.0 → 1.3.1
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/.jsii +2 -2
- package/AGENTS.md +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/.jsii
CHANGED
|
@@ -9803,6 +9803,6 @@
|
|
|
9803
9803
|
"symbolId": "src/index:PreflightOptions"
|
|
9804
9804
|
}
|
|
9805
9805
|
},
|
|
9806
|
-
"version": "1.3.
|
|
9807
|
-
"fingerprint": "
|
|
9806
|
+
"version": "1.3.1",
|
|
9807
|
+
"fingerprint": "QJBjFDC0MKpWQUEQHfDlRFvxTrbKxiuALzMN3KcxWNo="
|
|
9808
9808
|
}
|
package/AGENTS.md
CHANGED
|
@@ -176,7 +176,7 @@ If you are a subagent running one of these phases, do not spawn further agents.
|
|
|
176
176
|
4. **Real-deploy gate**: `bash bench/verify-rule.sh <rule-id>` deploys the fail template (expects CREATE to fail; records the service error message) and, where cheap, the pass template (expects success, then deletes). Paste the observed error into `meta.yaml#repro.evidence` with the date, then copy the part of it that names the constraint into `meta.yaml#repro.expect` — one line, `expect: "<fragment>"`, no `"` or `\` inside (the monthly runner reads it with `sed`), verbatim from the evidence (`bundle-rules` checks). Every monthly run matches the fail stack's reason against it, so a stack that falls over for anything else is INCONCLUSIVE rather than verified. Required for `real-deploy` rules added on or after 2026-09-27; when the service only ever says something generic (`GeneralServiceException`), quote that. Only `doc-only` rules may skip this, with justification.
|
|
177
177
|
|
|
178
178
|
**A rule about runs after the deploy needs a probe to fail the deploy.** Most resources give CloudFormation nothing to wait on, so the fail template adds a custom resource (logical id `Probe`, type `Custom::CdkpfProbe`) backed by an inline Python function (`ProbeFn`, with its own `ProbeRole`) that, on Create only, runs the resource once — invokes the function, publishes and reads back from the queue, sets the alarm state and reads its history — and answers `FAILED` with what it observed, or `SUCCESS`. The pass template carries the same probe, so the pair differs only in the property the rule judges. `pf-lambda-zipfile-handler-module` and `pf-sns-aws-managed-key-delivery` are the reference implementations. The contract:
|
|
179
|
-
- The probe writes the response itself with `urllib` (PUT to `ResponseURL`). Do not `
|
|
179
|
+
- The probe writes the response itself with `urllib` (PUT to `ResponseURL`). Do not depend on `cfnresponse`: CloudFormation adds it to the inline package only when the code has the exact line `import cfnresponse` ([doc](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-lambda-function-code-cfnresponsemodule.html)). The first probe wrote `import json, time, boto3, cfnresponse`, died with `Runtime.ImportModuleError: No module named 'cfnresponse'` before it could answer (python3.13, 2026-10-16), and left the stack waiting for `ServiceTimeout` on both create and delete.
|
|
180
180
|
- Update and Delete always answer `SUCCESS`, so rollback and `cleanup()` never wait on the probe.
|
|
181
181
|
- `ServiceTimeout: "300"` on the custom resource and a function `Timeout` well under it; `DependsOn` every policy, subscription and target the probe exercises, so it never runs before its scaffolding exists.
|
|
182
182
|
- The `Reason` starts with the observation that names the constraint (the service's own error when there is one — `Runtime.ImportModuleError`, an alarm's `Failed to execute action`), and `repro.expect` quotes it. `verify-rule.sh` treats a failed resource whose type is not in `resourceTypes` as scaffolding unless its reason contains `expect`, so without `expect` a probe's verdict is never accepted. A probe that crashes says `cdkpf probe could not run`, which matches no `expect` and comes out INCONCLUSIVE.
|
package/lib/index.js
CHANGED
|
@@ -17,7 +17,7 @@ const rules_generated_1 = require("./rules.generated");
|
|
|
17
17
|
* Preflight.apply(app);
|
|
18
18
|
*/
|
|
19
19
|
class Preflight {
|
|
20
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "cdk-preflight.Preflight", version: "1.3.
|
|
20
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "cdk-preflight.Preflight", version: "1.3.1" };
|
|
21
21
|
/**
|
|
22
22
|
* Register the cdk-preflight rules on an App or Stage.
|
|
23
23
|
*/
|