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: Apply various fixes #3176

Merged
merged 15 commits into from
Nov 8, 2024
Merged

fix: Apply various fixes #3176

merged 15 commits into from
Nov 8, 2024

Conversation

sfc-gh-asawicki
Copy link
Collaborator

Apply various fixes:

On the identifier validation topic:
ParseIdentifierString should generally allow parentheses. It should validate them for the identifiers for functions, procedures, etc. Because of that:

  • this validation was removed
  • method usages were analyzed to check what consequences it has throughout the provider
    • DecodeSnowflakeAccountIdentifier - OK, account level identifier
    • DecodeSnowflakeParameterID
      • buildOptsForGrantsOn (grants datasource) - NOK, had to fix the logic
      • ContainsIdentifierIgnoringQuotes - OK, transitively used only in network policies
      • TestDecodeSnowflakeParameterID - OK
      • IsValidIdentifier - OK, used for other identifier types
      • pkg/resource - OK, used in streams, table constraints and tag masking policy associations
    • suppressIdentifierQuoting
    • suppressIdentifierQuotingPartiallyQualifiedName - as above; currently used only for streams
    • parseIdentifier - used by other identifier types (type constraints added)
    • ParseObjectIdentifierString - OK, used for other identifier types (ParseSchemaObjectIdentifierWithArguments is dedicated for identifier with arguments)
    • ParseSchemaObjectIdentifierWithArguments - OK, we split the input string on first opening paren (so there are no other opening parens there)
    • Test_ParseIdentifierString - tests adjusted for the removed validation

Others:

  • Remove unused privileges.go file
  • Fix preview resources list for V1

References:

@sfc-gh-asawicki sfc-gh-asawicki changed the title fix: Apply Various fixes fix: Apply various fixes Nov 7, 2024
Copy link

github-actions bot commented Nov 7, 2024

Integration tests cancelled for 807aadc86174c3aa544470b787f259c3c5becc99

@sfc-gh-asawicki sfc-gh-asawicki marked this pull request as ready for review November 7, 2024 11:07
Copy link

github-actions bot commented Nov 7, 2024

Integration tests failure for 3096dca0239a93b690dbfb9825bf066f8cb8676c

Copy link

github-actions bot commented Nov 7, 2024

Integration tests failure for 1ff9b6dbcb5af401ce7049b206c20f379278c22b

@@ -14,7 +14,8 @@
* [snowflake_external_function](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/0.97.0/docs/resources/external_function)
* [snowflake_external_functions](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/0.97.0/docs/resources/external_functions)
* [snowflake_external_table](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/0.97.0/docs/resources/external_table)
* [snowflake_external_tables](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/0.97.0/docs/resources/external_tables)
* [snowflake_external_tables](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/0.97.0/docs/data-sources/external_tables) (datasource)
* [snowflake_external_volume](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/0.98.0/docs/resources/external_volume)
* [snowflake_failover_group](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/0.97.0/docs/resources/failover_group)
* [snowflake_failover_groups](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/0.97.0/docs/resources/failover_groups)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that failover groups should also be fixed. Check other resources as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oky, I will check with the next PR

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done in #3183

@sfc-gh-asawicki sfc-gh-asawicki merged commit 55591da into main Nov 8, 2024
8 of 9 checks passed
@sfc-gh-asawicki sfc-gh-asawicki deleted the various-fixes branch November 8, 2024 10:14
sfc-gh-jmichalak pushed a commit that referenced this pull request Nov 8, 2024
##
[0.98.0](v0.97.0...v0.98.0)
(2024-11-08)

Feature scope readiness for V1:
[link](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/v1-preparations/ESSENTIAL_GA_OBJECTS.MD)
([Roadmap
reference](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/ROADMAP.md#wrap-up-the-functional-scope)).
:exclamation: Migration guide: [v0.97.0 ->
v0.98.0](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/MIGRATION_GUIDE.md#v0970--v0980)

### 🎉 What's new
- New resources:
- authentication_policy
([#3098](#3098)),
references
[#2880](#2880)
- external_volume
([#3106](#3106)),
partially references
[#2980](#2980)
- stream_on_directory_table
([#3129](#3129))
- stream_on_view
([#3150](#3150))
- primary_connection, secondary_connection
([#3162](#3162))
- secret_with_basic_authentication, secret_with_generic_string,
secret_with_oauth_authorization_code_grant,
secret_with_oauth_client_credentials
([#3110](#3110)),
([#3141](#3141))
- New data sources:
- connections
([#3155](#3155)),
([#3173](#3173))
- secrets
([#3131](#3131))
- Reworked:
- provider configuration hierarchy
([#3166](#3166)),
references
[#1881](#1881),
[#2145](#2145),
[#2925](#2925),
[#2983](#2983),
[#3104](#3104)
- provider configuration fields
([#3152](#3152))
streams data source
([#3151](#3151))
- SDK upgrades:
- Upgrade tag SDK
([#3126](#3126))
- Recreate streams when they are stale
([#3129](#3129))
### 🔧  Misc
- Add object renaming research summary
([#3172](#3172))
- Test support for object renaming
([#3130](#3130)),
([#3147](#3147)),
([#3154](#3154))
- Add tests to issue
[#3117](#3117)
([#3133](#3133))
- New roadmap entry
([#3158](#3158))
- Test more authentication methods
([#3178](#3178))
- Minor fixes
([#3174](#3174))
### 🐛  Bug fixes
- Apply various fixes
([#3176](#3176)),
this addresses BCR 2024_08, references
[#2717](#2717),
[#3005](#3005),
[#3125](#3125),
[#3127](#3127),
[#3153](#3153)
- Connection and secret data sources tests
([#3177](#3177))
- Fix grant import docs
([#3183](#3183)),
resolves
[#3179](https://github.com/Snowflake-Labs/terraform-provider-snowflake/discussions/3179)
- Fix user resource import
([#3181](#3181))
- Handle external type changes in stream resources
([#3164](#3164))
- Do not use OR REPLACE on initial creation in resources with
copy_grants
([#3129](#3129))
- Address issue
[#2201](#2201)
by introducing new stream resources

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.

3 participants