Skip to content

fix(ecr): scanOnPush not supported in certain regions#19940

Merged
mergify[bot] merged 7 commits intomasterfrom
peterwoodworth/scanOnPushFix
Apr 20, 2022
Merged

fix(ecr): scanOnPush not supported in certain regions#19940
mergify[bot] merged 7 commits intomasterfrom
peterwoodworth/scanOnPushFix

Conversation

@peterwoodworth
Copy link
Copy Markdown
Contributor

fixes #19918


All Submissions:

Adding new Unconventional Dependencies:

  • This PR adds new unconventional dependencies following the process described here

New Features

  • Have you added the new feature to an integration test?
    • Did you use yarn integ to deploy the infrastructure and generate the snapshot (i.e. yarn integ without --dry-run)?

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

@gitpod-io
Copy link
Copy Markdown

gitpod-io bot commented Apr 15, 2022

@aws-cdk-automation aws-cdk-automation requested a review from a team April 15, 2022 21:15
@github-actions github-actions bot added bug This issue is a bug. effort/small Small work item – less than a day of effort p1 labels Apr 15, 2022
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Apr 15, 2022
repositoryPolicyText: Lazy.any({ produce: () => this.policyDocument }),
lifecyclePolicy: Lazy.any({ produce: () => this.renderLifecyclePolicy() }),
imageScanningConfiguration: props.imageScanOnPush ? { scanOnPush: true } : { scanOnPush: false },
imageScanningConfiguration: props.imageScanOnPush ? { scanOnPush: props.imageScanOnPush } : undefined,
Copy link
Copy Markdown
Contributor

@tiefps tiefps Apr 16, 2022

Choose a reason for hiding this comment

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

My earlier suggestion was wrong (and syntactically incorrect doh!).

It should be:

imageScanningConfiguration: props.imageScanOnPush === undefined ? undefined : { scanOnPush: props.imageScanOnPush }

This way only when imageScanOnPush is undefined will imageScanningConfiguration be omitted, but explicitly setting it to false or true will still result in generating an imageScanningConfiguration.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You're right, I'll fix that up and add a test to verify functionality

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Apr 20, 2022

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 2ff3143 into master Apr 20, 2022
@mergify mergify bot deleted the peterwoodworth/scanOnPushFix branch April 20, 2022 23:42
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Apr 20, 2022

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
Copy Markdown
Collaborator

AWS CodeBuild CI Report

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

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

StevePotter pushed a commit to StevePotter/aws-cdk that referenced this pull request Apr 27, 2022
fixes aws#19918 

----

### All Submissions:

* [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)?
	* [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*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

bug This issue is a bug. contribution/core This is a PR that came from AWS. effort/small Small work item – less than a day of effort p1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(aws-ecr): repository automatically adds imageScanningConfiguration even when imageScanOnPush is undefined

5 participants