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: Grant ownership follow up #2628

Merged
merged 17 commits into from
Apr 3, 2024
Merged

Conversation

sfc-gh-jcieslak
Copy link
Collaborator

@sfc-gh-jcieslak sfc-gh-jcieslak commented Mar 18, 2024

A follow-up for #2604.

Done in this pr:

  • Add setId("") in Read (when ownership is not found on the target object) and forcefully grant ownership in Create (this was already present, but added test cases for it).
  • Edge cases
    • Granting ON PIPE and ON ALL PIPES is handled (pipes are paused before and resumed after ownership transfer)

Full list of things that still need to be done:

  • Deprecation messages
  • More documentation (explain how grant_ownership resource handles edge cases) and examples that would show simple usage, edge cases, cases where the resource may cause trouble
  • Referring to feat: Add snowflake grant ownership resource #2604 (comment), test different cases where the Delete operation may struggle with
  • Test outside of Terraform interactions to see how it behaves in different situations
    • A test where used role is not privileged enough to transfer ownership
    • Also cases within Terraform to see how grant_ownership will act with other grant resources within certain configurations
  • Edge cases
    • Granting ON TASK
    • Use VIEW when granting on MATERIALIZED VIEW
    • Granting ON EXTERNAL TABLES

References

GRANT OWNERSHIP

Mentioned in

A list of issues requesting this resource: #2549 #2199 #2084 #1942 #1875

Copy link

Integration tests success for ae600b3f3ebac6cd629bb09bb14907b299fcd496

Copy link

Integration tests success for f5d430fad836d55c933041c57f14eb7f839deaab

Copy link

Integration tests success for 04e2ea7faf043c9c684a0355e592696d83290d37

Copy link

Integration tests failure for 78a4ab463abf94b1473f300e700823c1ea192e62

Copy link

Integration tests failure for 16abd98b80d215b84e49a7e37461504d046f2270

Copy link

Integration tests failure for 4d455106897021c24f114714e69921ef2bafc619

@sfc-gh-jcieslak sfc-gh-jcieslak marked this pull request as ready for review March 21, 2024 09:16
Copy link

Integration tests failure for a6ac4bb4012cbd975ce1c374be7f69988fb5c49c

Copy link

Integration tests failure for 52afe0f60648a6e45ed04686b9a7c7d327cae48a

Copy link

Integration tests failure for c2c2ca25a4f391a4f0547f324b62368e82f8cda2

@sfc-gh-jcieslak sfc-gh-jcieslak force-pushed the grant-ownership-follow-up branch from c2c2ca2 to e8b3861 Compare March 21, 2024 10:16
Copy link

Integration tests failure for e8b3861b657eb16bf240fd275249389fbe452485

Copy link

Integration tests failure for 632d3dba916da49bb50e5260901191b8381aaba1

@sfc-gh-jcieslak sfc-gh-jcieslak force-pushed the grant-ownership-follow-up branch from 268b066 to 8b8c6b8 Compare March 27, 2024 15:34
Copy link

Integration tests failure for 8b8c6b8ae18f8a006ca509e3c8a69258f3d925b6

Copy link

Integration tests failure for 268b06661124366352945c42d762ee935d6a7380

@sfc-gh-asawicki sfc-gh-asawicki self-requested a review March 28, 2024 10:35
Copy link

Integration tests failure for 8b8c6b8ae18f8a006ca509e3c8a69258f3d925b6

docs/resources/grant_ownership.md Show resolved Hide resolved
pkg/sdk/testint/system_functions_integration_test.go Outdated Show resolved Hide resolved
pkg/sdk/testint/grants_integration_test.go Show resolved Hide resolved
pkg/sdk/testint/grants_integration_test.go Show resolved Hide resolved
pkg/resources/grant_ownership_acceptance_test.go Outdated Show resolved Hide resolved
pkg/resources/grant_ownership_acceptance_test.go Outdated Show resolved Hide resolved
pkg/resources/grant_ownership_acceptance_test.go Outdated Show resolved Hide resolved
pkg/resources/grant_ownership_acceptance_test.go Outdated Show resolved Hide resolved
Copy link

Integration tests failure for 42bb0639c1e8b61c3092f21c9d86ff63deec2708

Copy link

Integration tests failure for a0023aec1a97528c9d190a7db831ac87cdb2f6e9

Copy link

Integration tests failure for 34581057508ab4e5a8389be6effb63ca516cd65b

@sfc-gh-asawicki sfc-gh-asawicki self-requested a review April 3, 2024 09:42
Copy link

github-actions bot commented Apr 3, 2024

Integration tests failure for d6242b7af921a5e67cde60ba01cc22c0d3067abf

Copy link

github-actions bot commented Apr 3, 2024

Integration tests success for d6242b7af921a5e67cde60ba01cc22c0d3067abf

@sfc-gh-asawicki sfc-gh-asawicki self-requested a review April 3, 2024 13:25
@sfc-gh-jcieslak sfc-gh-jcieslak merged commit d467e5b into main Apr 3, 2024
9 checks passed
@sfc-gh-jcieslak sfc-gh-jcieslak deleted the grant-ownership-follow-up branch April 3, 2024 13:40
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