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: standard database v1 readiness #2842

Merged
merged 24 commits into from
Jun 17, 2024

Conversation

sfc-gh-jcieslak
Copy link
Collaborator

@sfc-gh-jcieslak sfc-gh-jcieslak commented May 29, 2024

Done in this pr:

  • Addressed comments from the previous pr
  • Added new standard_database resource (also added examples, import, mentioned in migration notes)
  • Deprecate old database resource
  • Adjust databases data-source to align with v1 requirements (add filters, missing values and outputs from DESCRIBE and SHOW PARAMETERS commands)
  • Replaced snowflake_database in all of the examples to snowflake_standard_database

To be done:

  • Add missing properties on all three new database types
  • Make sure all of the issues were resolved with the new types of databases

Test Plan

  • acceptance tests

References

CREATE DATABASE

Update

Changes done:

  • Added missing parameters to all the database types and moved them and operations on them to a common place (only metric_level parameter wasn't included as it is a preview feature and there wasn't enough information about and it seemed like ORGADMIN or certain privileges were required to be able to test/use it).
  • Switched to plain values instead of nested ones for parameters and adjusted customdiffs, so that the state is refreshed always when expected.
  • Every database type resolves database-connected issues (most if not all of them were already resolved by the latest versions of the provider for the snowflake_database resource).
  • Refresh for secondary was not added, as replication guidelines are recommending to create a task that would be refreshing the replica at a certain interval. To aid our users I created an example showing how to create a task that would run the refresh every 10 minutes. An easy upgrade (if we would like to) would be add a toggle to call refresh every read operation. The toggle could be turned on by default with the option to turn it off and refresh it in the task "manually".
  • State upgrader for snowflake_database (because we chose to rename the old one for have _old suffix).

Copy link

Integration tests failure for ef5c594c5dc08d56d5791ca5644b5d0881414633

Copy link

github-actions bot commented Jun 3, 2024

Integration tests failure for 03d86239251e594175388cbe8986fff6cf31d637

Copy link

github-actions bot commented Jun 4, 2024

Integration tests failure for d7adc392815fc345b168c192c6cb027ce5e8a2f5

@sfc-gh-jcieslak sfc-gh-jcieslak marked this pull request as ready for review June 4, 2024 11:18
@sfc-gh-jcieslak sfc-gh-jcieslak force-pushed the standard-database-v1-readiness branch from 006f857 to 5a77aab Compare June 4, 2024 11:18
Copy link

github-actions bot commented Jun 4, 2024

Integration tests failure for 006f8574865030400eb99ba7988af6410f1e1203

Copy link

github-actions bot commented Jun 4, 2024

Integration tests failure for 5a77aab28b787835c9a29cff8162a5fa238f6e2c

Copy link

github-actions bot commented Jun 5, 2024

Integration tests success for f24da0a2c01083c9af7d7b6bd2a1d64d359618e1

examples/additional/deprecated_resources.MD Outdated Show resolved Hide resolved
pkg/resources/shared_database.go Outdated Show resolved Hide resolved
examples/data-sources/snowflake_databases/data-source.tf Outdated Show resolved Hide resolved
MIGRATION_GUIDE.md Outdated Show resolved Hide resolved
pkg/acceptance/asserts.go Outdated Show resolved Hide resolved
pkg/resources/standard_database.go Outdated Show resolved Hide resolved
pkg/resources/standard_database.go Outdated Show resolved Hide resolved
pkg/resources/standard_database.go Outdated Show resolved Hide resolved
pkg/resources/standard_database.go Outdated Show resolved Hide resolved
pkg/resources/standard_database_acceptance_test.go Outdated Show resolved Hide resolved
pkg/resources/standard_database.go Outdated Show resolved Hide resolved
pkg/resources/standard_database.go Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Jun 6, 2024

Integration tests failure for 2d42fc3f16de15f36c0b09033ba9afda2633e432

Copy link

github-actions bot commented Jun 6, 2024

Integration tests success for 33da7950d47ca4881e317ac2b12c227179dee94d

MIGRATION_GUIDE.md Outdated Show resolved Hide resolved
MIGRATION_GUIDE.md Outdated Show resolved Hide resolved
docs/data-sources/databases.md Outdated Show resolved Hide resolved
pkg/resources/standard_database.go Outdated Show resolved Hide resolved
docs/resources/standard_database.md Outdated Show resolved Hide resolved
pkg/resources/standard_database_acceptance_test.go Outdated Show resolved Hide resolved
pkg/resources/standard_database_acceptance_test.go Outdated Show resolved Hide resolved
pkg/resources/standard_database_acceptance_test.go Outdated Show resolved Hide resolved
pkg/resources/standard_database_acceptance_test.go Outdated Show resolved Hide resolved
pkg/resources/standard_database_acceptance_test.go Outdated Show resolved Hide resolved
@sfc-gh-jcieslak sfc-gh-jcieslak force-pushed the standard-database-v1-readiness branch from 64962c3 to 4d13d80 Compare June 10, 2024 05:39
# Conflicts:
#	MIGRATION_GUIDE.md
#	docs/resources/secondary_database.md
#	docs/resources/shared_database.md
#	pkg/resources/secondary_database_acceptance_test.go
#	pkg/resources/shared_database_acceptance_test.go
@sfc-gh-jcieslak sfc-gh-jcieslak force-pushed the standard-database-v1-readiness branch from d1fee94 to ffd87e2 Compare June 10, 2024 05:51
Copy link

Integration tests failure for d1fee941afc0c1a731a5cff7315d204bd41c9ba5

Copy link

Integration tests failure for ffd87e20ef6ef1da8d2736a32e03e46224e6b481

@sfc-gh-jcieslak sfc-gh-jcieslak force-pushed the standard-database-v1-readiness branch from ffd87e2 to 460bab4 Compare June 10, 2024 06:59
Copy link

Integration tests failure for 460bab45f9fe1a52d32d4d355a87e617c6bfa532

Copy link

Integration tests failure for bcbdeb06ee051a648761c8d323de49a92672c738

Copy link

Integration tests failure for 4e2ba31ef04f21974be9873e264405fb00fc27f7

Copy link

Integration tests failure for 91d0d50bb1e9bfaa1a4f0a5f04e842ceb62bd817

@sfc-gh-jcieslak sfc-gh-jcieslak force-pushed the standard-database-v1-readiness branch from 71db0fa to 21b79ad Compare June 14, 2024 08:48
Copy link

Integration tests failure for 71db0fada89a08e52011a55818e37ccfb89b9965

Copy link

Integration tests failure for 21b79adc3a76a0843e9a54d1d491f76c4ee944e8

Copy link

Integration tests failure for 7e9ed40765cfc71bc992a33714039bdb00709b23

Copy link

Integration tests success for 7e9ed40765cfc71bc992a33714039bdb00709b23

@sfc-gh-jcieslak sfc-gh-jcieslak force-pushed the standard-database-v1-readiness branch 2 times, most recently from 0f6865f to 513db10 Compare June 14, 2024 13:30
Copy link

Integration tests cancelled for a6d7ce68f51b76cfed81c2f5248afee05d451274

Copy link

Integration tests cancelled for 08d5c51eef2fd73ee52d2304e58a1f368b097891

Copy link

Integration tests cancelled for 513db10f99a071df7310984bad045c5beb9f8aac

@sfc-gh-jcieslak sfc-gh-jcieslak force-pushed the standard-database-v1-readiness branch from 513db10 to 082945a Compare June 14, 2024 13:37
Copy link

Integration tests failure for 0f6865f298b5527a36a44e751bff88ba03e6b812

Copy link

Integration tests failure for 082945a7bf11d335e5ee2219193378f8e9458aca

@sfc-gh-jcieslak sfc-gh-jcieslak merged commit 3c11953 into main Jun 17, 2024
8 of 9 checks passed
@sfc-gh-jcieslak sfc-gh-jcieslak deleted the standard-database-v1-readiness branch June 17, 2024 08:33
sfc-gh-asawicki pushed a commit that referenced this pull request Jun 25, 2024
Apply the rest of the changes requested in #2842 
- Moved out a schema for the show database output
- Throw error in state upgrader for certain cases we cannot upgrade to
- Update state upgrader to map account locators to the recommended
account identifier format
- Use more strict mapping functions in update functions for all
databases (+ test them)

To add (in this pr)
- Better documentation for old database `from_share` field

TODO
- Find out which test is setting data retention time in days on the
account and doesn't call unset (causing `TestAcc_Database_IntParameter`
to fail).
sfc-gh-jcieslak pushed a commit that referenced this pull request Jul 10, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.93.0](v0.92.0...v0.93.0)
(2024-07-10)


### 🎉 **What's new:**

* Add OAUTH integration for custom clients
([#2908](#2908))
([d9b557f](d9b557f))
* Add oauth integration for partner applications
([#2912](#2912))
([91788e5](91788e5))
* Add support for cortex search service
([#2860](#2860))
([43aa89f](43aa89f))
* API Authentication integration v1 readiness
([#2898](#2898))
([91931da](91931da))
* External Oauth integration v1 readiness
([#2907](#2907))
([ed237c3](ed237c3))
* Generate show outputs with mappers
([#2886](#2886))
([1cada88](1cada88))
* Introduce security integrations datasource
([#2892](#2892))
([7f6c657](7f6c657))
* SAML2 integration v1 readiness
([#2868](#2868))
([d0c136d](d0c136d))
* SCIM integration v1 readiness
([#2846](#2846))
([269df6b](269df6b))
* Security integrations datasource v1 readiness
([#2913](#2913))
([d10474a](d10474a))
* standard database v1 readiness
([#2842](#2842))
([3c11953](3c11953))
* Warehouse redesign final touches
([#2900](#2900))
([0eab636](0eab636))
* Warehouse redesign part1
([#2864](#2864))
([6664457](6664457))
* Warehouse redesign part2
([#2887](#2887))
([1aaf417](1aaf417))
* Warehouse redesign part3
([#2890](#2890))
([873a1ed](873a1ed))
* Warehouse redesign part4
([#2893](#2893))
([d525fd9](d525fd9))


### 🔧 **Misc**

* Add documentation on unset and defaults
([#2882](#2882))
([85a7836](85a7836))
* apply minor database changes
([#2872](#2872))
([6ccac59](6ccac59))
* Apply new resource conventions to scim integration
([#2891](#2891))
([e11e608](e11e608))
* Improve generator template organization
([#2820](#2820))
([5035e2f](5035e2f))
* Nuke stale objects
([#2869](#2869))
([9c4a117](9c4a117))
* Show a possible solution for
[#2877](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2877)
([#2878](#2878))
([6fb437b](6fb437b))
* Validations cleanup and old grants removal
([#2884](#2884))
([05b7eee](05b7eee))


### 🐛 **Bug fixes:**

* Add disclaimers and fix tests
([#2905](#2905))
([1deaedc](1deaedc))
* Fix cortex search service
([#2904](#2904))
([763d06c](763d06c))
* use suppressQuoting to fix stage file_format permadiff
([#2885](#2885))
([fd70f6e](fd70f6e))

---
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.

3 participants