Skip to content
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

docs: note that Apps outdir property should not be used #16670

Merged
merged 6 commits into from
Oct 27, 2021
Merged

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Sep 27, 2021

If this property is passed it has to agree with the CLI's --output flag.

If this property is not passed, it will default to the CLI's --output
flag.

In either case, it's better to just use --output and not pass this
property at all; the property only has value inside tests.

I tried to add validation (by using Annotations.of(app).addWarning() but they are
useless anyway: in the CX protocol, metadata can only be attached to StackArtifacts,
so metadata attached to the App will not be rendered.

Adding a full framework feature to move metadata to a different place feels like too much
risk and work for this small note, so turned it into a documentation fix.

Fixes #3717.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

If this property is passed it has to agree with the CLI's `--output` flag.

If this property is not passed, it will default to the CLI's `--output`
flag.

In either case, it's better to just use `--output` and not pass this
property at all; the property only has value inside tests.

Fixes #3717.
@rix0rrr rix0rrr requested review from eladb and a team September 27, 2021 12:44
@rix0rrr rix0rrr self-assigned this Sep 27, 2021
@gitpod-io
Copy link

gitpod-io bot commented Sep 27, 2021

@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Sep 27, 2021
deployment role
Default: ''
Type: CommaDelimitedList
PermissionsBoundaryArns:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this change related?

@@ -104,6 +111,10 @@ export class App extends Stage {
outdir: props.outdir ?? process.env[cxapi.OUTDIR_ENV],
});

if (process.env[cxapi.OUTDIR_ENV] && props.outdir) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to add a unit test for this if possible

@rix0rrr rix0rrr changed the title chore: formalize that Apps outdir property should not be used docs: note that Apps outdir property should not be used Oct 4, 2021
@rix0rrr rix0rrr requested review from eladb and a team October 4, 2021 09:55
@mergify
Copy link
Contributor

mergify bot commented Oct 27, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 507b64f
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 312c2b6 into master Oct 27, 2021
@mergify mergify bot deleted the huijbers/outdir branch October 27, 2021 15:19
@mergify
Copy link
Contributor

mergify bot commented Oct 27, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Feb 21, 2022
If this property is passed it has to agree with the CLI's `--output` flag.

If this property is not passed, it will default to the CLI's `--output`
flag.

In either case, it's better to just use `--output` and not pass this
property at all; the property only has value inside tests.

I tried to add validation (by using `Annotations.of(app).addWarning()` but they are
useless anyway: in the CX protocol, metadata can only be attached to `StackArtifacts`,
so metadata attached to the `App` will not be rendered.

Adding a full framework feature to move metadata to a different place feels like too much
risk and work for this small note, so turned it into a documentation fix.

Fixes aws#3717.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cli: synth fails if cdk.out does not exist
4 participants