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: diffs always occurring when multiple columns exist #2686

Merged
merged 2 commits into from
Apr 10, 2024

Conversation

YAhiru
Copy link
Contributor

@YAhiru YAhiru commented Apr 8, 2024

ReadMaskingPolicy function increased signature by the number of columns when there were multiple columns in the Masking Policy.
Therefore, a masking policy with multiple columns was always in a state where differences occurred.

Test Plan

  • acceptance tests

References

resource.TestCheckResourceAttr("snowflake_masking_policy.test", "schema", acc.TestSchemaName),
resource.TestCheckResourceAttr("snowflake_masking_policy.test", "masking_expression", "case when current_role() in ('ANALYST') then val else sha2(val, 512) end"),
resource.TestCheckResourceAttr("snowflake_masking_policy.test", "return_data_type", "VARCHAR"),
resource.TestCheckResourceAttr("snowflake_masking_policy.test", "signature.#", "1"),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Previously, signature.# was 2

@sfc-gh-asawicki
Copy link
Collaborator

Hey @YAhiru. Thanks for the pull request! We will review it tomorrow (cc: @sfc-gh-jcieslak).

@sfc-gh-jcieslak
Copy link
Collaborator

/ok-to-test sha=4d8a779af7c3f8ca59c3b4dc205f0724fe26bf6a

Copy link

github-actions bot commented Apr 9, 2024

Integration tests failure for 4d8a779af7c3f8ca59c3b4dc205f0724fe26bf6a

1 similar comment
Copy link

github-actions bot commented Apr 9, 2024

Integration tests failure for 4d8a779af7c3f8ca59c3b4dc205f0724fe26bf6a

@sfc-gh-asawicki sfc-gh-asawicki merged commit 3275ad4 into Snowflake-Labs:main Apr 10, 2024
7 of 8 checks passed
@sfc-gh-asawicki
Copy link
Collaborator

Merged. Thanks for the contribution @YAhiru.

@YAhiru YAhiru deleted the fix/masking-policy branch April 10, 2024 20:16
sfc-gh-jcieslak pushed a commit that referenced this pull request Apr 18, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.89.0](v0.88.0...v0.89.0)
(2024-04-18)


### 🎉 **What's new:**

* Update target objects for privilege-granting resources
([#2688](#2688))
([74e2b6b](74e2b6b))


### 🔧 **Misc**

* Handle generic check destroy in acceptance tests
([#2716](#2716))
([63a5324](63a5324))
* Initialize the SDK client in fewer places
([#2710](#2710))
([382bfc1](382bfc1))


### 🐛 **Bug fixes:**

* Adds case statement for ObjectTypeUser in ShowObjectParameter.
([#2675](#2675))
([23a3341](23a3341))
* diffs always occurring when multiple columns exist
([#2686](#2686))
([3275ad4](3275ad4))
* Fix issues
[#2679](#2679)
[#2721](#2721)
([#2723](#2723))
([b0c9dd4](b0c9dd4))
* Fix several small issues
([#2697](#2697))
([e3f6a15](e3f6a15))
* granting ownership on database roles
([#2703](#2703))
([88944e7](88944e7))
* network policy update
([#2647](#2647))
([8126b28](8126b28))
* Rename grants_redesign_desgin_decisions.md to grants_redesign_design_…
([#2691](#2691))
([5000b2b](5000b2b))
* renames in update operations
([#2702](#2702))
([793c879](793c879))
* showbyid method tests
([#2648](#2648))
([ff5e617](ff5e617))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: snowflake-release-please[bot] <105954990+snowflake-release-please[bot]@users.noreply.github.com>
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.

Conditional masking policy with multiple columns always forces replacement
3 participants