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: Rework schema resource #2955

Merged
merged 18 commits into from
Jul 26, 2024
Merged

feat: Rework schema resource #2955

merged 18 commits into from
Jul 26, 2024

Conversation

sfc-gh-jmichalak
Copy link
Collaborator

@sfc-gh-jmichalak sfc-gh-jmichalak commented Jul 24, 2024

Rework schema resource:

  • add missing fields
  • add acceptance tests
  • add entry to migration guide
  • add schema upgrader with acc test

Test Plan

  • acceptance tests

References

https://docs.snowflake.com/en/sql-reference/sql/create-schema

@sfc-gh-jmichalak sfc-gh-jmichalak marked this pull request as ready for review July 24, 2024 11:03
docs/resources/schema.md Outdated Show resolved Hide resolved
pkg/resources/schema.go Outdated Show resolved Hide resolved
pkg/resources/schema.go Outdated Show resolved Hide resolved
pkg/resources/schema.go Show resolved Hide resolved
pkg/resources/schema.go Outdated Show resolved Hide resolved
MIGRATION_GUIDE.md Show resolved Hide resolved
pkg/resources/schema.go Outdated Show resolved Hide resolved
pkg/resources/schema.go Show resolved Hide resolved
pkg/resources/schema_acceptance_test.go Outdated Show resolved Hide resolved
pkg/resources/schema_acceptance_test.go Outdated Show resolved Hide resolved
Copy link

Integration tests failure for 38317bc0d9ad727b7c4c9646f9e5cf569e538c0c

Copy link

Integration tests failure for ef8d5bec6c77fbd1509fb6b8784e3c52bfba6b3f

Copy link

Integration tests failure for 19afea9810274927b4acf78f2d575312da60a40a

docs/resources/schema.md Show resolved Hide resolved
docs/resources/schema.md Show resolved Hide resolved
docs/resources/schema.md Outdated Show resolved Hide resolved
docs/resources/schema.md Outdated Show resolved Hide resolved
pkg/resources/schema.go Show resolved Hide resolved
pkg/resources/schema.go Outdated Show resolved Hide resolved
pkg/resources/schema_acceptance_test.go Outdated Show resolved Hide resolved
"comment": config.StringVariable(comment),
PreConfig: func() {
params := acc.TestClient().Parameter.ShowAccountParameters(t)
*accountDataRetentionTimeInDays = helpers.FindParameter(t, params, sdk.AccountParameterDataRetentionTimeInDays).Value
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe try using the new object parameters assertions here? 🙏

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If we have time before release, then sure.

"name": config.StringVariable(name),
"database": config.StringVariable(acc.TestDatabaseName),
"comment": config.StringVariable(""),
ConfigDirectory: acc.ConfigurationDirectory("TestAcc_Schema/basic"),
Copy link
Collaborator

Choose a reason for hiding this comment

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

does import care about the cfg dir and vars?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

When I remove them, I get Error: No value for required variable

Copy link
Collaborator

Choose a reason for hiding this comment

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

okay, but these are not used for the import tests AFAIK

pkg/resources/schema_acceptance_test.go Show resolved Hide resolved
Copy link

Integration tests failure for d46d51cc22941bc5ed3a0d660dca8868f7974149

Copy link

Integration tests failure for cc7ddfa10fb63d02dea0297c44fef8746c298532

@sfc-gh-asawicki sfc-gh-asawicki self-requested a review July 26, 2024 09:53
MIGRATION_GUIDE.md Show resolved Hide resolved
pkg/resources/diff_suppressions.go Outdated Show resolved Hide resolved
pkg/resources/schema.go Outdated Show resolved Hide resolved
pkg/resources/schema.go Outdated Show resolved Hide resolved
pkg/resources/schema.go Outdated Show resolved Hide resolved
pkg/resources/schema.go Show resolved Hide resolved
pkg/resources/schema.go Outdated Show resolved Hide resolved
Copy link

Integration tests failure for 04fbf35cf383e2ee6a104bec90574665770fb9df

Copy link

Integration tests failure for fe0fcf26a7bc01226a125131d60229fcf50f2598

Copy link

Integration tests failure for 3e6a86e26ef3d3e50fa74b0d1b30cd8d4da96072

Copy link

Integration tests cancelled for ee74e0dadc5c8a78b8a8a7fbdd5df53817fd7835

Copy link

Integration tests failure for 75658b69464eda5d1b01af624813b89d696f653d

Copy link

Integration tests failure for 5a190b0c6fa30ed9a386baabf24593d81b2e9c2d

Copy link

Integration tests failure for 95400fb56051ea67a69a5fc50a94d8cc424f2d9a

@sfc-gh-jcieslak sfc-gh-jcieslak merged commit 400a5c8 into main Jul 26, 2024
8 of 9 checks passed
@sfc-gh-jcieslak sfc-gh-jcieslak deleted the schema-resource-v1 branch July 26, 2024 16:31
sfc-gh-jcieslak pushed a commit that referenced this pull request Jul 26, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.94.0](v0.93.0...v0.94.0)
(2024-07-26)


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

* Add missing session parameters
([#2936](#2936))
([4ce662d](4ce662d))
* Adjust user SDK
([#2947](#2947))
([1127bb3](1127bb3))
* Better tests poc
([#2917](#2917))
([ef496c2](ef496c2))
* Introduce assertions generators part1
([#2952](#2952))
([1582a9f](1582a9f))
* Introduce assertions generators part2
([#2956](#2956))
([f715e8a](f715e8a))
* network policy v1 readiness
([#2914](#2914))
([3408c3f](3408c3f))
* Rework schema datasource
([#2954](#2954))
([f70e40e](f70e40e))
* Rework schema resource
([#2955](#2955))
([400a5c8](400a5c8))
* Role v1 readiness
([#2916](#2916))
([32c7690](32c7690))
* Schema SDK upgrade
([#2945](#2945))
([bca0836](bca0836))
* Streamlit v1 readiness
([#2930](#2930))
([aa42260](aa42260))


### 🔧 **Misc**

* Remove deprecation from unsafe execute
([#2941](#2941))
([ed712d7](ed712d7))
* Update documentation
([#2931](#2931))
([da98bc3](da98bc3))


### 🐛 **Bug fixes:**

* ATTRIBUTE set(string) parsing for cortex search service
([#2953](#2953))
([70a1c9a](70a1c9a))
* external function header parsing and add missing privileges
([#2961](#2961))
([9d882fe](9d882fe))
* Fix sync_password field for Azure scim clients
([#2950](#2950))
([6781133](6781133))
* Fix tests and relax warehouse validations
([#2959](#2959))
([dd01ce9](dd01ce9)),
closes
[#2948](#2948)

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