-
Notifications
You must be signed in to change notification settings - Fork 427
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: Rework config hierarchy #3166
Conversation
Integration tests failure for 53cc9dc025b2e34c3914fe454d06c5ee5479b08c |
Integration tests cancelled for b3bb72dd89b7d9f21c693b392993bdbf249c82f2 |
Integration tests cancelled for 94dfe58adcf7fd6909a90f66a1929c4f9f9765f5 |
Integration tests failure for 83146de4c284f6eb624fdabd85fb1d4bda16b7c7 |
Integration tests failure for bfd73028b05ca4d97d4f7bbea9d48d3b42b5cca2 |
Integration tests failure for 5f0fa00258a238476972f22053fa727318ef32ef |
MIGRATION_GUIDE.md
Outdated
- `account_name` and `organization_name` were added to improve handling account names. Read more in [docs](https://docs.snowflake.com/en/user-guide/admin-account-identifier#using-an-account-name-as-an-identifier). | ||
|
||
#### *(behavior change)* deprecated fields | ||
Because of new fields `account_name` and `organization_name`, `account` is now deprecated. Please adjust your configurations from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's add here that we will remove this deprecated attribute with the V1 release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit (for next PR): It will be removed before v1.
-> It will be removed with the v1 release.
(before V1 is inaccurate and AFAIK we do not plan to remove it before the V1)
t.Setenv(snowflakeenvs.TmpDirectoryPath, "../") | ||
t.Setenv(snowflakeenvs.DisableConsoleLogin, "false") | ||
}, | ||
Config: providerConfig(testprofiles.CompleteFields), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: was complete fields added:
- to the GH stored config toml
- to our 1pass (there is a config that should be updated)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not yet - I was waiting for the review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be addressed in the next pr because of incompatible config files in older versions.
Integration tests failure for af1a6f8d5ea244752ff2ec1631490341f84b7845 |
Integration tests failure for 91c05617abf5ddfcd937d0d28e6ee63c1b5bfc0d |
@@ -74,7 +74,7 @@ test-architecture: ## check architecture constraints between packages | |||
go test ./pkg/architests/... -v | |||
|
|||
test-client: ## runs test that checks sdk.Client without instrumentedsql | |||
SF_TF_NO_INSTRUMENTED_SQL=1 SF_TF_GOSNOWFLAKE_LOG_LEVEL=debug go test ./pkg/sdk/internal/client/... -v | |||
SF_TF_NO_INSTRUMENTED_SQL=1 go test ./pkg/sdk/internal/client/... -v |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have a follow-up task to turn on logging back here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this is not needed anymore. I think we can't reuse SNOWFLAKE_DRIVER_TRACING
here because we would set it in NewClient
, which means the value from the TF config would be overridden by the env. I can revert it in the next PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem here is that client initialization does not use environment variables (because using them from the Terraform level caused order problems), but the old SF_TF_GOSNOWFLAKE_LOG_LEVEL was handled additionally. We could handle the new env the same way as the old one, this could be the only env that is currently directly supported by the client initialization and the ordering is good: envs > toml.
@@ -29,17 +28,3 @@ func TestNewClientWithoutInstrumentedSQL(t *testing.T) { | |||
assert.Contains(t, sql.Drivers(), "snowflake") | |||
}) | |||
} | |||
|
|||
func TestNewClientWithDebugLoggingSetFromEnv(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's skip this one for now and add it to the issue I asked about in a separate comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be reverted in the next PR.
Integration tests failure for 91c05617abf5ddfcd937d0d28e6ee63c1b5bfc0d |
a888620
Integration tests failure for a888620c9a9bbc34730d7b96536a2399fa9aa74e |
Integration tests cancelled for 65e7b4c456e43ca7e30b4aa90e5adcf52a4cc49c |
## [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>
account
sqlmock
driver in one of the testsTest Plan
References
#1881
#2145
#2925
#2983
#3104
TODO