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: support drop for accounts and fix read race condition #2065

Merged
merged 7 commits into from
Oct 2, 2023

Conversation

sfc-gh-swinkler
Copy link
Collaborator

Snowflake now supports drop and undrop operations on account

https://docs.snowflake.com/en/sql-reference/sql/drop-account

Also after creating an account, it doesn't always show up immediately, so add in some retry logic.

Finally, comments actually cannot be set on account so changing that back to force new. Also cannot rename an account that is not in the same account so removing that as well

@github-actions
Copy link

Integration tests success for c1f3e0a1984c91e10876ed01e020cb9bb22f7610

pkg/sdk/accounts.go Outdated Show resolved Hide resolved
pkg/sdk/accounts_integration_test.go Outdated Show resolved Hide resolved
pkg/sdk/accounts_integration_test.go Show resolved Hide resolved
pkg/sdk/accounts_integration_test.go Show resolved Hide resolved
pkg/resources/account.go Show resolved Hide resolved
pkg/resources/account.go Show resolved Hide resolved
@github-actions
Copy link

Integration tests failure for 51adf71cb055eddb256404a738e413ca484a30f0

t.Skip("Skipping TestInt_AccountCreate")
require.NoError(t, err)
_, err = client.Accounts.ShowByID(ctx, NewAccountObjectIdentifier("NOT_EXISTING_ACCOUNT"))
require.ErrorIs(t, err, ErrObjectNotExistOrAuthorized)

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
undefined: ErrObjectNotExistOrAuthorized (typecheck)

t.Skip("Skipping TestInt_AccountCreate")
require.NoError(t, err)
_, err = client.Accounts.ShowByID(ctx, NewAccountObjectIdentifier("NOT_EXISTING_ACCOUNT"))
require.ErrorIs(t, err, ErrObjectNotExistOrAuthorized)

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
undefined: ErrObjectNotExistOrAuthorized) (typecheck)

@github-actions
Copy link

Integration tests failure for 4d51c2a4917a4f337281d2200df014ebde87215d

@github-actions
Copy link

Integration tests failure for 77458c7a08f5cc0ce20c2c22b08d2b29fd306c38

@github-actions
Copy link

Integration tests success for d139eec825724f8651c54adb7162607f7e2d548e

@sfc-gh-asawicki sfc-gh-asawicki self-requested a review September 29, 2023 11:16
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.

4 participants