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

feat: Redesign snowflake_grants datasource #2667

Merged
merged 28 commits into from
Apr 3, 2024

Conversation

sfc-gh-asawicki
Copy link
Collaborator

@sfc-gh-asawicki sfc-gh-asawicki commented Mar 29, 2024

Refactor snowflake_grants datasource as part of ongoing grants redesign:

  • datasource migrated to the SDK
  • old implementation removed from snowflake package
  • datasource schema altered (changes and new features)
  • SDK enriched with more SHOW GRANTS ... options
  • validations in SDK were not changed because of already existing
    // TODO: add validations for ShowGrantsOn, ShowGrantsTo, ShowGrantsOf and ShowGrantsIn
    (this change is too big already)
  • SDK integration tests added
  • acceptance tests added
  • examples added
  • migration notes added
  • TODOs left for application and application role acceptance tests after we have suitable resources to set these tests up easily (in the meantime the resulting SQL statements invocations are tested in SDK integration tests)
  • TODOs left for share acceptance tests (existing acceptance tests are skipped, so grant ones should be unskipped with them)
  • implementation for SHOW GRANTS TO SHARE <share_name> IN APPLICATION PACKAGE <app_package_name> is commented out because it currently results in Snowflake error

@sfc-gh-asawicki sfc-gh-asawicki changed the title feat: Refactor snowflake grants feat: Refactor snowflake_grants datasource Mar 29, 2024
@sfc-gh-asawicki sfc-gh-asawicki changed the title feat: Refactor snowflake_grants datasource feat: Redesign snowflake_grants datasource Mar 29, 2024
Copy link

Integration tests failure for edb2d93a7e801fb577a29758a1eacbfa05f84ef0

@sfc-gh-asawicki sfc-gh-asawicki marked this pull request as ready for review March 29, 2024 18:37
Copy link

Integration tests failure for edb2d93a7e801fb577a29758a1eacbfa05f84ef0

Copy link

Integration tests success for c4df1d3dd6c77745728e0c46b519acdb3f20179e

MIGRATION_GUIDE.md Outdated Show resolved Hide resolved
docs/data-sources/grants.md Outdated Show resolved Hide resolved
docs/data-sources/grants.md Outdated Show resolved Hide resolved
docs/data-sources/grants.md Outdated Show resolved Hide resolved
docs/data-sources/grants.md Show resolved Hide resolved
pkg/snowflake/grant.go Show resolved Hide resolved
pkg/datasources/grants.go Outdated Show resolved Hide resolved
pkg/datasources/grants.go Outdated Show resolved Hide resolved
pkg/datasources/grants.go Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Apr 3, 2024

Integration tests failure for f38143604ba14c2fb29e2e429ce477c0e8184c4b

@sfc-gh-asawicki sfc-gh-asawicki merged commit 918873d into main Apr 3, 2024
8 of 9 checks passed
@sfc-gh-asawicki sfc-gh-asawicki deleted the refactor-snowflake-grants branch April 3, 2024 12:30
sfc-gh-jcieslak pushed a commit that referenced this pull request Apr 9, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.88.0](v0.87.3-pre...v0.88.0)
(2024-04-09)


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

* Fix issues 2651 2656
([#2659](#2659))
([7fa09cc](7fa09cc))
* Grant ownership follow up
([#2628](#2628))
([d467e5b](d467e5b))
* grant ownership follow-up
([#2658](#2658))
([bfa2317](bfa2317))
* grant ownership on tasks
([#2684](#2684))
([2ba7889](2ba7889))
* Introduce shared function to suspend task roots
([#2650](#2650))
([d684b5d](d684b5d))
* Redesign snowflake_grants datasource
([#2667](#2667))
([918873d](918873d))
* user password policy attachment
([#2627](#2627))
([382e49d](382e49d))


### 🔧 **Misc**

* release 0.88.0
([02d60e0](02d60e0))
* Update grant examples in all resources
([#2660](#2660))
([b542b69](b542b69))


### 🐛 **Bug fixes:**

* Adjust dynamic tables after BCR-1543
([#2664](#2664))
([cf32ceb](cf32ceb))
* Fix handling secure views read and import
([#2655](#2655))
([3c3ede6](3c3ede6))
* Fix issues 2606 2642 2652 2653
([#2654](#2654))
([4a73721](4a73721))
* Fix release workflow
([#2639](#2639))
([dfd07e9](dfd07e9))
* Generate docs for dynamic table
([#2666](#2666))
([16c75b0](16c75b0))
* grant read operation
([#2665](#2665))
([0b947a5](0b947a5))
* migration guide for databases created from share
([#2637](#2637))
([f9651bc](f9651bc))
* with_grant_option diff drift
([#2608](#2608))
([f0018c6](f0018c6))

---
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.

2 participants