Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-melnacouzi committed Dec 12, 2024
1 parent 659fd6c commit e096e2e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/snowflake/cli/_plugins/nativeapp/sf_sql_facade.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from snowflake.cli._plugins.nativeapp.constants import (
AUTHORIZE_TELEMETRY_COL,
CHANNEL_COL,
DEFAULT_CHANNEL,
DEFAULT_DIRECTIVE,
NAME_COL,
SPECIAL_COMMENT,
Expand Down Expand Up @@ -674,11 +675,11 @@ def get_app_properties():
using_clause = install_method.using_clause(stage_fqn)
if release_channel:
current_release_channel = get_app_properties().get(
CHANNEL_COL, "DEFAULT"
CHANNEL_COL, DEFAULT_CHANNEL
)
if not same_identifiers(release_channel, current_release_channel):
raise UpgradeApplicationRestrictionError(
f"Cannot upgrade application {name} from release channel {release_channel} because application is already on a different channel."
f"Application {name} is currently on release channel {current_release_channel}. Cannot upgrade to release channel {release_channel}."
)

upgrade_cursor = self._sql_executor.execute_query(
Expand Down
2 changes: 1 addition & 1 deletion tests/nativeapp/test_sf_sql_facade.py
Original file line number Diff line number Diff line change
Expand Up @@ -2146,7 +2146,7 @@ def test_upgrade_application_with_release_channel_not_same_as_app_properties_the

assert (
str(err.value)
== f"Cannot upgrade application {app_name} from release channel {release_channel} because application is already on a different channel."
== f"Application {app_name} is currently on release channel different_channel. Cannot upgrade to release channel {release_channel}."
)


Expand Down

0 comments on commit e096e2e

Please sign in to comment.