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

fix(core): missing context in Stages is not filled by CLI #11461

Merged
merged 2 commits into from
Nov 16, 2020

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Nov 13, 2020

Missing context in Stages was reported at the inner-assembly
level. Since the CLI only inspects the top-level assembly for
missing context, it would never detect this and not query for it.

Propagate the missing context up to the top-level assembly.

Fixes #9226.


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

Missing context in Stages was reported at the inner-assembly
level. Since the CLI only inspects the top-level assembly for
missing context, it would never detect this and not query for it.

Propagate the missing context up to the top-level assembly.

Fixes #9226.
@rix0rrr rix0rrr requested a review from a team November 13, 2020 10:54
@rix0rrr rix0rrr self-assigned this Nov 13, 2020
@gitpod-io
Copy link

gitpod-io bot commented Nov 13, 2020

@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Nov 13, 2020
@NetaNir
Copy link
Contributor

NetaNir commented Nov 13, 2020

Looks good, I would suggest adding an integ tests, the direct use of session.createNestedAssembly in tests has been known to hide issues. Approved, added do-not-merge

@NetaNir NetaNir added the pr/do-not-merge This PR should not be merged at this time. label Nov 13, 2020
@rix0rrr
Copy link
Contributor Author

rix0rrr commented Nov 16, 2020

If we want an integtest I need to complicate this test, because this is not observable from the CLI behavior currently.

@rix0rrr
Copy link
Contributor Author

rix0rrr commented Nov 16, 2020

I will take that in a different PR if that's okay with you

@rix0rrr rix0rrr removed the pr/do-not-merge This PR should not be merged at this time. label Nov 16, 2020
@mergify
Copy link
Contributor

mergify bot commented Nov 16, 2020

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: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 3b88b6f
  • Result: FAILED
  • Build Logs (available for 30 days)

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

@mergify
Copy link
Contributor

mergify bot commented Nov 16, 2020

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).

@mergify mergify bot merged commit a4a555a into master Nov 16, 2020
@mergify mergify bot deleted the huijbers/propagate-missing-context branch November 16, 2020 09:47
rix0rrr added a commit that referenced this pull request Nov 16, 2020
Context lookups are supposed to be performed on developer desktops, and
committed to `cdk.context.json`. If you don't, your CI build might try
to perform a lookup and fail with an unclear error message about
permissions, or worse: appear to work properly but leave you with a
nondeterministic build.

Introduce a CLI flag called `--no-lookups` that throws an appropriately
descriptive error message if you forgot to perform context lookups
before committing.

This now also makes it possible to write an integration test for
PR #11461.
mergify bot pushed a commit that referenced this pull request Nov 24, 2020
Context lookups are supposed to be performed on developer desktops, and
committed to `cdk.context.json`. If you don't, your CI build might try
to perform a lookup and fail with an unclear error message about
permissions, or worse: appear to work properly but leave you with a
nondeterministic build.

Introduce a CLI flag called `--no-lookups` that throws an appropriately
descriptive error message if you forgot to perform context lookups
before committing.

This now also makes it possible to write an integration test for
PR #11461.

----

*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.

[pipelines] Metadata errors should fail synthesis (on stacks deployed in the pipeline)
3 participants