-
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
[WIP] fix(core): self contained CDK_OUTDIR #1895
Conversation
This change enables each construct in the tree to participate in synthesis by overriding the "synthesize" method and emitting files to the session directory. It is a small step towards generalizing how synthesis artifacts are being produced, built and deployed by the CDK. This change moves the code that synthesizes a CloudFormation template from a CDK stack to the `Stack` class and emits a `.template.json` file for each stack. The CLI hasn't been changed to work with these new files yet, so the output of this file is ALSO included in the main manifest (defined `cxapi.OUTFILE_NAME`), which is the only file currently being read by the CLI.
This test is referred as example in the [Cloudformation README](https://github.com/awslabs/aws-cdk/blob/master/packages/%40aws-cdk/aws-cloudformation/README.md). But the example doesn't do what it intended. Without specifying the runOrder the `pipelineExecuteChangeSetAction` will be triggered immediately without change set being populated, which will lead to deployment failure. After adding the `runOrder` the 3 actions will run in order and only be deployed after manual approval.
When running in CI, try to pull the latest image first and use it as cache for the build. CI is detected by the presence of the `CI` environment variable. Closes #1748
Adds a handler to enable raw message delivery on SNS topic subscriptions.
Forgot to modify the signatures on the interface when I updated the base class. This is now fixed.
Changed "documentation" to "reference documentation" in description.
If we report synthesis errors, they should only prevent the affected stack from deploying; right now, since they are checked during the synthesis step, they would abort the entire toolkit run regardless of whether they would be selected or not. Makes it possible to do region-dependent verification. Fixes #1784. ALSO IN THIS COMMIT If the 'cdk synth' output goes to the screen, don't automatically select upstream stacks for synthesis (as that would lead to an immediate error). Fixes #1783.
Fix usage of application and network target groups in languages without structural typing, such as Java and C#. Fixes #1799.
`SecretParameter` was being used incorrectly and it did not pass typechecking. The type error was: ``` Type 'SecretParameter' is missing the following properties from type 'Secret': resolve, toJSON, toList ```
? this.artifactName | ||
: path.join(this.artifactName, path.basename(props.path)); | ||
|
||
this.relativePath = `./${this.relativePath}`; // prefix with './' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why prefix with ./
? By traditional filesystem convention, any path that doesn't start with /
is already relative.
If you're thinking about NodeJS, they reason they do it is because they also want to support a global registry of packages, and they want to disambiguate:
require('bla'); // Is this a global 'bla' or a local 'bla.js'?
I don't think we need that feature, and even if we did we could get it by prepending a special namespace like builtin:bla
.
This change copies all assets referenced in CDK code to the CDK_OUTDIR as artifacts (see #1893) so that the output directory is now self-contained. This is part of the design for generalizing artifacts #1893.
It also modifies the path metadata (both
aws:asset:path
andcdk:asset:path
) to use relative paths instead of absolute paths, which is a breaking change in respect to the toolkit.Fixes #1716
BREAKING CHANGE: Users will need to upgrade their toolkit to v0.25.0 or above if their CDK applications use assets. Otherwise the toolkit will likely not find asset files during deployment.
Remaining work:
CDK_OUTDIR
a persistent directory (emitted under the project directory or something). Otherwise, tools that wish to access assets won't be able to find them because the temporary directory will disappear.