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: Upgrade stream sdk #3105

Merged
merged 4 commits into from
Sep 30, 2024
Merged

feat: Upgrade stream sdk #3105

merged 4 commits into from
Sep 30, 2024

Conversation

sfc-gh-jmichalak
Copy link
Collaborator

@sfc-gh-jmichalak sfc-gh-jmichalak commented Sep 25, 2024

  • generate object assertions
  • add helpers client
  • rename methods in table helpers client for consistency
  • adjust and regenerate sdk
  • remove fields that are not present in Snowflake
  • add LastQueryId function - it's needed to test stream's AT|BEFORE
  • add missing tests
  • clean up integration tests
  • add some external table helper functions

Test Plan

  • integration tests
  • unit tests

References

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

TODO

Adjust SHOW field types. Add new resources for each type of stream. Adjust stream data source.

Copy link

Integration tests failure for 71a87b70a29afeafa3981e7586a5ac623d905099

@sfc-gh-jmichalak sfc-gh-jmichalak marked this pull request as ready for review September 26, 2024 09:53
Copy link

Integration tests failure for ee076b8ce3bc852cc8721b6fe25837c6ee2be7c4

pkg/sdk/streams_validations_gen.go Show resolved Hide resolved
HasSchemaName(id.SchemaName()).
HasComment("some comment").
HasSourceType("Table").
HasMode("APPEND_ONLY").
Copy link
Collaborator

Choose a reason for hiding this comment

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

are there any enums for sourceType and mode? Asserts could be extended to use them

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These will be added in the next PR.

pkg/sdk/testint/streams_gen_integration_test.go Outdated Show resolved Hide resolved
pkg/sdk/testint/streams_gen_integration_test.go Outdated Show resolved Hide resolved
Copy link

Integration tests cancelled for faf87ff0051195b154f6075c5e0b435eff3db474

Copy link

Integration tests failure for c6973732317bfeb78e468ed860b85041c852d472

@sfc-gh-jmichalak sfc-gh-jmichalak merged commit ad5fa11 into main Sep 30, 2024
8 of 9 checks passed
@sfc-gh-jmichalak sfc-gh-jmichalak deleted the stream-v1 branch September 30, 2024 14:44
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/sdk"
)

func (s *StreamAssert) HasTableId(expected string) *StreamAssert {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: why string and to schemaobjectidentifier here as input?

sfc-gh-jcieslak pushed a commit that referenced this pull request Oct 11, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.97.0](v0.96.0...v0.97.0)
(2024-10-10)


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

* Add secret to sdk
([#3091](#3091))
([7430aee](7430aee))
* Add service user and legacy service user resources
([#3119](#3119))
([0e88e08](0e88e08))
* Handle all Task parameters in SDK
([#3103](#3103))
([08ae072](08ae072))
* Stream on external table resource
([#3122](#3122))
([d837341](d837341))
* Stream on table resource
([#3109](#3109))
([97fa9b4](97fa9b4))
* Tasks v1 readiness - SDK part
([#3086](#3086))
([0a77383](0a77383))
* Upgrade stream sdk
([#3105](#3105))
([ad5fa11](ad5fa11))


### 🔧 **Misc**

* Add pre check to each datasource
([#3065](#3065))
([560ab6b](560ab6b))
* Bump golang-ci lint to 1.61
([#3112](#3112))
([f23e085](f23e085))
* Secret Validation change
([#3111](#3111))
([666630e](666630e))


### 🐛 **Bug fixes:**

* Fix parsing text in view, check parenthesis in
ParseSchemaObjectIdentifierWithArguments
([#3102](#3102))
([b0a67e6](b0a67e6))
* Try to reproduce 2679 and 3117
([#3124](#3124))
([ccdbc30](ccdbc30))

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