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): messages are displayed multiple times per construct #24019

Merged
merged 2 commits into from
Feb 9, 2023

Conversation

Styerp
Copy link
Contributor

@Styerp Styerp commented Feb 5, 2023

Annotations added many times clog terminal space and make debugging difficult. Deduplicate annotations based on the message.

Closes #9565.


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

gitpod-io bot commented Feb 5, 2023

@github-actions github-actions bot added bug This issue is a bug. effort/small Small work item – less than a day of effort p2 beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK labels Feb 5, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team February 5, 2023 04:54
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

@Styerp
Copy link
Contributor Author

Styerp commented Feb 6, 2023

The pull request linter fails with the following errors:

❌ Fixes must contain a change to an integration test file and the resulting snapshot.

PRs must pass status checks before we can provide a meaningful review.

If there's an integration test that should capture this behavior, I don't see it. Happy to update it.

@TheRealAmazonKendra
Copy link
Contributor

Hmmm. I don't thiiiiiiiink there's a good integ test to add here but, can you write a quick repro of a manual test you ran for this and then provide the output? The unit test is good but I'm overly cautious about all the things all the time.

@Styerp
Copy link
Contributor Author

Styerp commented Feb 9, 2023

Makes sense. I'll use the original bug report's repro steps.

EKS Integ synth pre-change:

(system)(annotate) ☆ npx cdk synth -a 'ts-node test/integ.eks-cluster.ts'                                                                                  (/Users/styerp/aws-cdk/packages/@aws-cdk/aws-eks (14))(07:39)
[Warning at /aws-cdk-eks-cluster-test/Cluster/Nodes/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
[Warning at /aws-cdk-eks-cluster-test/Cluster/Nodes/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
[Warning at /aws-cdk-eks-cluster-test/Cluster/Nodes/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
[Warning at /aws-cdk-eks-cluster-test/Cluster/Nodes/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
[Warning at /aws-cdk-eks-cluster-test/Cluster/Nodes/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
[Warning at /aws-cdk-eks-cluster-test/Cluster/Nodes/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
[Warning at /aws-cdk-eks-cluster-test/Cluster/NodesArm/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
[Warning at /aws-cdk-eks-cluster-test/Cluster/NodesArm/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
[Warning at /aws-cdk-eks-cluster-test/Cluster/NodesArm/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
[Warning at /aws-cdk-eks-cluster-test/Cluster/NodesArm/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
[Warning at /aws-cdk-eks-cluster-test/Cluster/NodesArm/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
[Warning at /aws-cdk-eks-cluster-test/Cluster/NodesArm/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
[Warning at /aws-cdk-eks-cluster-test/Cluster/BottlerocketNodes/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
[Warning at /aws-cdk-eks-cluster-test/Cluster/BottlerocketNodes/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
[Warning at /aws-cdk-eks-cluster-test/Cluster/BottlerocketNodes/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
[Warning at /aws-cdk-eks-cluster-test/Cluster/BottlerocketNodes/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
[Warning at /aws-cdk-eks-cluster-test/Cluster/BottlerocketNodes/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
[Warning at /aws-cdk-eks-cluster-test/Cluster/BottlerocketNodes/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
[Warning at /aws-cdk-eks-cluster-test/Cluster/spot/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
[Warning at /aws-cdk-eks-cluster-test/Cluster/spot/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
[Warning at /aws-cdk-eks-cluster-test/Cluster/spot/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
[Warning at /aws-cdk-eks-cluster-test/Cluster/spot/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
[Warning at /aws-cdk-eks-cluster-test/Cluster/spot/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
[Warning at /aws-cdk-eks-cluster-test/Cluster/spot/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
Successfully synthesized to /Users/styerp/aws-cdk/packages/@aws-cdk/aws-eks/cdk.out
Supply a stack id (aws-cdk-eks-cluster-test, aws-cdk-eks-cluster/DefaultTest/DeployAssert) to display its template.

(system)(annotate*) ☆ git log -n 1                                                                                                                         (/Users/styerp/aws-cdk/packages/@aws-cdk/aws-eks (14))(07:40)
commit 0b20bc5f2899c205a2a4a81d2d3b57c6dd4e6a64 (HEAD -> annotate, origin/main, origin/HEAD, main)
Merge: 2b6a0bede4 83d1685c97
Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Date:   Sat Feb 4 23:36:21 2023 +0000

    chore(merge-back): 2.63.2 (#24012)
    
    See [CHANGELOG](https://github.com/aws/aws-cdk/blob/merge-back/2.63.2/CHANGELOG.md)
(system)(annotate*) ☆                                                                                                                                      (/Users/styerp/aws-cdk/packages/@aws-cdk/aws-eks (14))(07:42)

EKS Integ test synth w/ change (branch modification was only chmod +x test/integ.eks-cluster.ts):

(system)(annotate*) ☆ npx cdk synth -a 'ts-node test/integ.eks-cluster.ts'                                                                                 (/Users/styerp/aws-cdk/packages/@aws-cdk/aws-eks (14))(07:02)
[Warning at /aws-cdk-eks-cluster-test/Cluster/Nodes/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
[Warning at /aws-cdk-eks-cluster-test/Cluster/NodesArm/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
[Warning at /aws-cdk-eks-cluster-test/Cluster/BottlerocketNodes/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
[Warning at /aws-cdk-eks-cluster-test/Cluster/spot/InstanceSecurityGroup] Ignoring Egress rule since 'allowAllOutbound' is set to true; To add customized rules, set allowAllOutbound=false on the SecurityGroup
Successfully synthesized to /Users/styerp/aws-cdk/packages/@aws-cdk/aws-eks/cdk.out
Supply a stack id (aws-cdk-eks-cluster-test, aws-cdk-eks-cluster/DefaultTest/DeployAssert) to display its template.

(system)(annotate*) ☆ git log -n 1                                                                                                                         (/Users/styerp/aws-cdk/packages/@aws-cdk/aws-eks (14))(07:04)
commit 508ca84dd884d4f9101ed207b027269f08731cac (HEAD -> annotate, origin/annotate)
Author: Patrick Styer <styerp@amazon.com>
Date:   Sat Feb 4 20:38:43 2023 -0800

    fix(core): messages are displayed multiple times per construct
(system)(annotate*) ☆                                                                                                                                      (/Users/styerp/aws-cdk/packages/@aws-cdk/aws-eks (14))(07:04)

@TheRealAmazonKendra TheRealAmazonKendra added the pr-linter/exempt-integ-test The PR linter will not require integ test changes label Feb 9, 2023
@aws-cdk-automation aws-cdk-automation dismissed their stale review February 9, 2023 17:10

✅ Updated pull request passes all PRLinter validations. Dissmissing previous PRLinter review.

@mergify
Copy link
Contributor

mergify bot commented Feb 9, 2023

Thank you for contributing! Your pull request will be updated from main 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: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: eab4774
  • 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 57770bb into aws:main Feb 9, 2023
@mergify
Copy link
Contributor

mergify bot commented Feb 9, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK bug This issue is a bug. effort/small Small work item – less than a day of effort p2 pr-linter/exempt-integ-test The PR linter will not require integ test changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[core] Do not emit duplicate messages (warnings/errors/...)
3 participants