-
Notifications
You must be signed in to change notification settings - Fork 427
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: go casting errors + additional fixes (#2743)
Done in this pr: - Fixed a few Go casting errors. (actually just two in `external_oauth_integraiton`) - Other casts like identifiers were adjusted by adding schema validation where known object type's is expected (e.g. `table_id`). Also introduced parsing function that will fail in Create operation (just in case). - **Question:** Other castings were not adjusted as they were casting the `d.Id()` in Update/Read/Delete operations and every single of them was correct (I was hesitating because those castings were not in Create, but can replace old parsing function the new one: `id := helpers.DecodeSnowflakeID(d.Id()).(sdk.SomeIdentifier)` would translate to `id, err := helpers.SafelyDecodeSnowflakeID[sdk.SomeIdentifier](d.Id())`. Should we do it or before identifiers rework just leave it as is ? - When going through the resources and data sources also fixed. - Failover groups and unsetting `replication_schedule`. - Table constraint and required field being `optional` (actually no behavior change, because without the `references` block it would crash anyway, but now the error makes more sense with the `required` flag). - Resource monitor (followed IDE hint and added nil check as the value could be not set in the previous lines). ## Test Plan <!-- detail ways in which this PR has been tested or needs to be tested --> * [x] acceptance tests added for failover groups and table constraint * [x] unit and integration also added for failover groups and new unset option * [x] units for new "decoding" helper function
- Loading branch information
1 parent
68d0318
commit 66e380d
Showing
20 changed files
with
314 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.