Repository navigation
Conversation
…IP accepts GRANT OWNERSHIP rejects integration subtype names (SECURITY INTEGRATION, STORAGE INTEGRATION, ...), MATERIALIZED VIEW and HYBRID TABLE. Snowflake names them INTEGRATION, VIEW and TABLE. A plan that transferred ownership of any of these failed at apply with a SQL compilation error, for example: GRANT OWNERSHIP ON SECURITY INTEGRATION X TO ROLE ACCOUNTADMIN COPY CURRENT GRANTS. https://docs.snowflake.com/en/sql-reference/sql/grant-ownership
GRANT OWNERSHIP has no EXTERNAL FUNCTION object type, so a transfer away from the default SYSADMIN owner failed with a syntax error. External functions are granted as FUNCTION.
Five places tested for integration types with their own copy of "INTEGRATION" in str(...): three in create_grant, one in the ownership transfer, and one in the Grant owner default. If one copy changed, the others could drift without a failing test. They now call resource_type_is_integration in snowcap/enums.py, next to resource_type_is_grant. Behavior does not change.
|
Reviewed this PR (full external-function signature/grant handling). Found three real issues via code-review, verified each by running the actual code in a worktree:
Minor: Ponytail/complexity pass: lean, nothing to cut, this diff even removes speculative code (the Separate heads-up, not a code issue: this PR and #84 both independently add |
Closes #85.
Snowcap now manages external functions by their full signatures. It fetches and syncs overloaded functions. It uses FUNCTION for external function SQL and grants. It handles exclusions and zero-argument signatures.
This PR is stacked on PR #84 (branch fix/transfer-ownership-object-type). Its diff includes PR #84 commits until PR #84 merges.