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(diff): deepEqual may miss difference other than DependsOn #10394

Merged
merged 3 commits into from
Sep 17, 2020

Conversation

kuwa0224
Copy link
Contributor

@kuwa0224 kuwa0224 commented Sep 16, 2020

Fixes #10322


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

@kuwa0224
Copy link
Contributor Author

I will resolve conflicts.

Reproduce aws#10322

The important point of this case is the properties order of `BucketResource`.

```
      BucketResource: {
        Type: 'AWS::S3::Bucket',
        DependsOn: ['SomeResource'],
        BucketName: bucketName,
      }
```

can reproduce, but

```
      BucketResource: {
        Type: 'AWS::S3::Bucket',
        BucketName: bucketName,
        DependsOn: ['SomeResource'],
      }
```

cannot reproduce.
Because, `deepEqual` in `util.ts` is dependent on `Object.keys` order.

This issue occurs when the property of not-changed `DependsOn` is evaluated before the property that has changed.
Fix the issue (10322) for `deepEqual`.

The cause of this issue was that checking the diffs in the `DependsOn` property returned a result of` dependsOnEqual`.

If the result of `dependsOnEqual` is false, there is no problem.
If the result of `dependsOnEqual` is true, need to check the diffs of other properties.
@kuwa0224 kuwa0224 force-pushed the feature/fix_bug_10322 branch from cb3c666 to edf6798 Compare September 17, 2020 12:45
Copy link
Contributor

@skinny85 skinny85 left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for the fix @kuwa0224 !

@mergify
Copy link
Contributor

mergify bot commented Sep 17, 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: df1a183
  • Result: SUCCEEDED
  • 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 Sep 17, 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 9bcaf75 into aws:master Sep 17, 2020
@kuwa0224 kuwa0224 deleted the feature/fix_bug_10322 branch September 18, 2020 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[cloudformation-diff] cdk diff does not show diff with v1.60.0 or later if there is "DependsOn" key
4 participants