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 detection for databricks_share resource #2197

Merged
merged 1 commit into from
Apr 6, 2023
Merged

Conversation

nkvuong
Copy link
Contributor

@nkvuong nkvuong commented Apr 6, 2023

Changes

Improve diff detection by suppressing diff for shared_as field. Close #2167

Tests

  • make test run locally
  • covered with integration tests in internal/acceptance
  • relevant acceptance tests are passing

@nkvuong
Copy link
Contributor Author

nkvuong commented Apr 6, 2023

acceptance tests passed

@nkvuong nkvuong marked this pull request as ready for review April 6, 2023 09:02
@nkvuong
Copy link
Contributor Author

nkvuong commented Apr 6, 2023

@marekbrysa do you mind validating this manually with your issue as well?

Copy link
Contributor

@alexott alexott left a comment

Choose a reason for hiding this comment

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

in general looks good, but may need to change name...

@@ -128,6 +128,13 @@ func (si ShareInfo) resourceShareMap() map[string]SharedDataObject {
return m
}

func Equal(a, b SharedDataObject) bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would either rename it to be more explicit on what we're comparing, or make it a member function of the corresponding struct.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also perhaps rename the parameters? b has the meaning of the "after"/goal state?

Copy link
Contributor

Choose a reason for hiding this comment

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

not blocking, but this should be the method on SharedDataObject in the follow-up PR

@nfx nfx merged commit cdb83b0 into master Apr 6, 2023
@nfx nfx deleted the fix/share-diff branch April 6, 2023 16:29
@nfx nfx mentioned this pull request Apr 6, 2023
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.

[ISSUE] Issue with databricks_share update detection
4 participants