Skip to content

Commit

Permalink
Addressed PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-bdufour committed Sep 19, 2024
1 parent 475b32e commit 8db07c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/snowflake/cli/_plugins/nativeapp/application_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def drop(
)
return

# 3. Check if created by the Snowflake CLI
# 2. Check if created by the Snowflake CLI
row_comment = show_obj_row[COMMENT_COL]
if row_comment not in ALLOWED_SPECIAL_COMMENTS and needs_confirmation(
needs_confirm, auto_yes
Expand All @@ -247,7 +247,7 @@ def drop(
# leave behind an orphan app when we get to dropping the package
raise typer.Abort()

# 4. Check for application objects owned by the application
# 3. Check for application objects owned by the application
# This query will fail if the application package has already been dropped, so handle this case gracefully
has_objects_to_drop = False
message_prefix = ""
Expand Down Expand Up @@ -325,7 +325,7 @@ def drop(
# If there's nothing to drop, set cascade to an explicit False value
cascade = False

# 5. All validations have passed, drop object
# 4. All validations have passed, drop object
drop_generic_object(
console=console,
object_type="application",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ def drop(
return

with sql_executor.use_role(package_role):
# 3. Check for versions in the application package
# 2. Check for versions in the application package
show_versions_query = f"show versions in application package {package_name}"
show_versions_cursor = sql_executor.execute_query(
show_versions_query, cursor_class=DictCursor
Expand All @@ -616,7 +616,7 @@ def drop(
"Drop versions first, or use --force to override."
)

# 4. Check distribution of the existing application package
# 3. Check distribution of the existing application package
actual_distribution = cls.get_app_pkg_distribution_in_snowflake(
package_name=package_name,
package_role=package_role,
Expand All @@ -631,7 +631,7 @@ def drop(
f"Dropping application package {package_name} with distribution '{actual_distribution}'."
)

# 5. If distribution is internal, check if created by the Snowflake CLI
# 4. If distribution is internal, check if created by the Snowflake CLI
row_comment = show_obj_row[COMMENT_COL]
if actual_distribution == INTERNAL_DISTRIBUTION:
if row_comment in ALLOWED_SPECIAL_COMMENTS:
Expand Down

0 comments on commit 8db07c7

Please sign in to comment.