Skip to content

fix(ec2): functions addIngressRule and addEgressRule detect unresolved tokens as duplicates - #17221

Merged
mergify[bot] merged 6 commits into
masterfrom
peterwoodworth/sgRuleFix
Nov 2, 2021
Merged

mergify[bot] merged 6 commits into
masterfrom
peterwoodworth/sgRuleFix

Conversation

@peterwoodworth

@peterwoodworth peterwoodworth commented Oct 28, 2021 •

Copy link
Copy Markdown
Contributor

fixes #17201

The issue is when the same security group uses these functions, so I added a private counter to SecurityGroupBase. However, to modify this private counter, determineRuleScope and renderPeer need to be member functions. These originally weren't member functions for a reason, and that's because SecurityGroup also uses these functions.


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

@gitpod-io

gitpod-io Bot commented Oct 28, 2021

Copy link
Copy Markdown

@github-actions github-actions Bot added the @aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud label Oct 28, 2021
@mergify

mergify Bot commented Oct 28, 2021

Copy link
Copy Markdown
Contributor

Title does not follow the guidelines of Conventional Commits. Please adjust title before merge.

@mergify mergify Bot added the contribution/core This is a PR that came from AWS. label Oct 28, 2021
@peterwoodworth peterwoodworth changed the title fix(ec2) addIngressRule and addEgressRule detect unresolved tokens as… fix(ec2): addIngressRule and addEgressRule detect unresolved tokens as… Oct 28, 2021
@peterwoodworth peterwoodworth changed the title fix(ec2): addIngressRule and addEgressRule detect unresolved tokens as… fix(ec2): functions addIngressRule and addEgressRule detect unresolved tokens as duplicates Oct 28, 2021
}
}

/**

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This giant comment block here is really useful. Would be a shame to lose it and/or its context. Can you reunite it back with its friend, the determineRuleScope method? 🥺

}

private renderPeer(peer: IPeer) {
if (Token.isUnresolved(peer.uniqueId)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A quick comment here explaining the why of this would be useful for future maintainers.

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.

added right below line 193

@mergify

mergify Bot commented Nov 2, 2021

Copy link
Copy Markdown
Contributor

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: 35ef187
  • 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 d4952c3 into master Nov 2, 2021
@mergify
mergify Bot deleted the peterwoodworth/sgRuleFix branch November 2, 2021 17:35
@mergify

mergify Bot commented Nov 2, 2021

Copy link
Copy Markdown
Contributor

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
…d tokens as duplicates (aws#17221)

fixes aws#17201 

The issue is when the same security group uses these functions, so I added a private counter to `SecurityGroupBase`. However, to modify this private counter, `determineRuleScope` and `renderPeer` need to be member functions. These originally weren't member functions for a reason, and that's because `SecurityGroup` also uses these functions.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
ali-n4i pushed a commit to ali-n4i/aws-cdk that referenced this pull request Jul 29, 2026
…d tokens as duplicates (aws#17221)

fixes aws#17201 

The issue is when the same security group uses these functions, so I added a private counter to `SecurityGroupBase`. However, to modify this private counter, `determineRuleScope` and `renderPeer` need to be member functions. These originally weren't member functions for a reason, and that's because `SecurityGroup` also uses these functions.

----

*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

@aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud contribution/core This is a PR that came from AWS.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(ec2): addIngressRule and addEgressRule detect unresolved tokens as duplicates

4 participants