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

Workspaces application - drop action #1572

Merged
merged 4 commits into from
Sep 13, 2024
Merged

Workspaces application - drop action #1572

merged 4 commits into from
Sep 13, 2024

Conversation

sfc-gh-gbloom
Copy link
Contributor

@sfc-gh-gbloom sfc-gh-gbloom commented Sep 13, 2024

Pre-review checklist

  • I've confirmed that instructions included in README.md are still correct after my changes in the codebase.
  • I've added or updated automated unit tests to verify correctness of my new code.
  • I've added or updated integration tests to verify correctness of my new code.
  • I've confirmed that my changes are working by executing CLI's commands manually on MacOS.
  • I've confirmed that my changes are working by executing CLI's commands manually on Windows.
  • I've confirmed that my changes are up-to-date with the target branch.
  • I've described my changes in the release notes.
  • I've described my changes in the section below.

Changes description

Implementing ApplicationEntity.action_drop() by extracting the logic from NativeAppTeardownProcessor.

Manual Test

Simple deploy and drop:

$ snow ws deploy --entity-id=app
$ snow ws drop --entity-id=app
Dropping application pdfv2_gbloom now.
Dropped application pdfv2_gbloom successfully.

Interactive flow:

$ snow ws deploy --entity-id=app
$ snow sql -q "alter application pdfv2_gbloom set comment = 'foo'"
$ snow ws drop --entity-id=app
Application object pdfv2_gbloom was not created by Snowflake CLI.
Application object details:
Name: pdfv2_gbloom
Created on: 2024-09-13 12:26:11.234000-07:00
Source: PDFV2_PKG_GBLOOM
Owner: ACCOUNTADMIN
Comment: foo
Version: UNVERSIONED
Patch: 0
Are you sure you want to drop it?
 [y/N]:
Did not drop application object pdfv2_gbloom.
Aborted.

Force drop:

$ snow ws deploy --entity-id=app
$ snow sql -q "alter application pdfv2_gbloom set comment = 'foo'"
$ snow ws drop --entity-id=app --force
Dropping application pdfv2_gbloom now.
Dropped application pdfv2_gbloom successfully.

@sfc-gh-gbloom sfc-gh-gbloom marked this pull request as ready for review September 13, 2024 19:52
@sfc-gh-gbloom sfc-gh-gbloom requested review from a team as code owners September 13, 2024 19:52
@sfc-gh-gbloom sfc-gh-gbloom enabled auto-merge (squash) September 13, 2024 20:12
@sfc-gh-gbloom sfc-gh-gbloom merged commit 2d33807 into main Sep 13, 2024
19 checks passed
@sfc-gh-gbloom sfc-gh-gbloom deleted the ws-app-drop-action branch September 13, 2024 20:13
sfc-gh-sichen pushed a commit that referenced this pull request Oct 17, 2024
* app drop action

* update unit tests

* integration tests
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.

2 participants