-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cdk synth returns exit code 0 despite policy validation failures #26844
Comments
Hey, we're going to keep the design this way. Thanks for bringing this up still 🙂 The reason for that is that policy validation plugin is not an enforcement tool. As a developer, you need to opt in for the plugin, you also have an option to skip some rules. There is nothing that stops you from deploying the generated template, despite of policies violations. So, we decided that there is no point to return different values, since this can be confusing (return non-zero exit code can be trggered by other issues) |
|
@peterwoodworth Then the plugin is completely worthless. Please re-open this issue until it is properly resolved. |
Describe the bug
If a custom policy validation reports a failure,
cdk synth
still exits successfully (exit code 0).Expected Behavior
A policy validation failure should result in a non-zero exit code.
Current Behavior
It reports the failure on stdout/stderr but still exits successfully.
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.85.0 (build 4e0d726)
Framework Version
No response
Node.js Version
v18.16.1
OS
Alpine 3.18
Language
Python
Language Version
Python 3.11.4
Other information
No response
The text was updated successfully, but these errors were encountered: