-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SNOW-1486485] Fix tearing down an app whose package has already been…
… dropped (#1224) When a package is dropped, subsequent `snow app teardown` calls fail with “Application is no longer available for use. Please contact the application provider for more details.” since the CLI is still trying to execute `show objects owned by application`. If this query fails with this error, we should ask the user if they want to cascade drop the application without being able to see the objects.
- Loading branch information
1 parent
2bc8245
commit 8cb7228
Showing
7 changed files
with
171 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright (c) 2024 Snowflake Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
APPLICATION_NO_LONGER_AVAILABLE = 93079 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
tests/nativeapp/__snapshots__/test_teardown_processor.ambr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# serializer version: 1 | ||
# name: test_drop_application_cascade[False-application_objects3-None-False] | ||
'' | ||
# --- | ||
# name: test_drop_application_cascade[False-application_objects4-None-False] | ||
''' | ||
The following objects are owned by application myapp and will NOT be dropped: | ||
(DATABASE) db | ||
|
||
''' | ||
# --- | ||
# name: test_drop_application_cascade[False-application_objects5-None-False] | ||
''' | ||
Could not determine which objects are owned by application myapp, they will NOT be dropped. | ||
|
||
''' | ||
# --- | ||
# name: test_drop_application_cascade[None-application_objects10-yes-True] | ||
''' | ||
Could not determine which objects are owned by application myapp | ||
|
||
''' | ||
# --- | ||
# name: test_drop_application_cascade[None-application_objects11-no-False] | ||
''' | ||
The following objects are owned by application myapp | ||
(DATABASE) db | ||
|
||
''' | ||
# --- | ||
# name: test_drop_application_cascade[None-application_objects12-no-False] | ||
''' | ||
Could not determine which objects are owned by application myapp | ||
|
||
''' | ||
# --- | ||
# name: test_drop_application_cascade[None-application_objects6-None-False] | ||
'' | ||
# --- | ||
# name: test_drop_application_cascade[None-application_objects9-yes-True] | ||
''' | ||
The following objects are owned by application myapp | ||
(DATABASE) db | ||
|
||
''' | ||
# --- | ||
# name: test_drop_application_cascade[True-application_objects0-None-True] | ||
'' | ||
# --- | ||
# name: test_drop_application_cascade[True-application_objects1-None-True] | ||
''' | ||
The following objects are owned by application myapp and will be dropped: | ||
(DATABASE) db | ||
|
||
''' | ||
# --- | ||
# name: test_drop_application_cascade[True-application_objects2-None-True] | ||
''' | ||
Could not determine which objects are owned by application myapp, an unknown number of objects will be dropped. | ||
|
||
''' | ||
# --- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters