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(cloudformation-diff): cdk diff not picking up differences if old/new value is in format n.n.n #16050

Merged
merged 6 commits into from
Sep 9, 2021

Conversation

vincent-turato
Copy link
Contributor

@vincent-turato vincent-turato commented Aug 13, 2021

"cdk diff" in the current version doesn't pick up differences if the old/new value has a number-like format but actually isn't a number (e.g. 0.31.1)

Example: two version strings like "0.31.1-prod" and "0.31.2-prod" are both parsed into "0.31" (and hence incorrectly considered equal).

Closes #15935.


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 Aug 13, 2021

@aleksil
Copy link

aleksil commented Aug 24, 2021

We just hit this bug, but with IP-addresses when working with WAF IP Sets. Changes to the two last octets are not picked up (e.g. changing IP from 1.1.1.1 to 1.1.2.2). I don't think your patch fixes this edge case either, the regex could probably be changed to only allow one dot in a float?

@mergify mergify bot dismissed BenChaimberg’s stale review September 2, 2021 22:00

Pull request has been modified.

@BenChaimberg BenChaimberg changed the title fix(cloudformation-diff): cdk diff not picking up differences if old/new value is in format x.y.z fix(cloudformation-diff): cdk diff not picking up differences if old/new value is in format n.n.n Sep 9, 2021
@mergify
Copy link
Contributor

mergify bot commented Sep 9, 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: 0faf362
  • 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 38426c9 into aws:master Sep 9, 2021
@mergify
Copy link
Contributor

mergify bot commented Sep 9, 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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/cloudformation-diff 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.

cdk diff not picking up differences if old/new value is in format x.y.z
6 participants