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

SNOW-1643309 Move version drop to app package #1610

Merged
merged 3 commits into from
Sep 23, 2024

Conversation

sfc-gh-fcampbell
Copy link
Contributor

@sfc-gh-fcampbell sfc-gh-fcampbell commented Sep 20, 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

Moves implementation of snow app version drop to ApplicationPackageEntity.version_drop and wires it into snow ws version drop too.

@sfc-gh-fcampbell sfc-gh-fcampbell marked this pull request as ready for review September 23, 2024 14:46
@sfc-gh-fcampbell sfc-gh-fcampbell enabled auto-merge (squash) September 23, 2024 15:19
"""
Drops a version defined in an application package. If --force is provided, then no user prompts will be executed.
"""
is_interactive = False
Copy link
Contributor

Choose a reason for hiding this comment

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

it might be confusing to have 2 similar variables. Can we do something like this instead?

if force:
  interactive = False
  policy = AllowAlwaysPolicy()
else:
  policy = AskAlwaysPolicy() if interactive else DenyAlwaysPolicy()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was copied verbatim from https://github.com/snowflakedb/snowflake-cli/pull/1610/files#diff-7f950152d04e5fc16d6529457263e2b23df2e9f6a0023f6572d49bdb5a9a9d38L140-L147 but yeah i can change it. I'm planning a refactor of this force/interactive/policy stuff anyways

version = to_identifier(version)

console.step(
f"About to drop version {version} in application package {package_name}."
Copy link
Contributor

Choose a reason for hiding this comment

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

did this message change? was there a backslash at the beginning?

Copy link
Contributor Author

@sfc-gh-fcampbell sfc-gh-fcampbell Sep 23, 2024

Choose a reason for hiding this comment

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

it was a multiline string when it didn't need to be since it's only one line

@sfc-gh-fcampbell sfc-gh-fcampbell merged commit a6aa19f into main Sep 23, 2024
21 checks passed
@sfc-gh-fcampbell sfc-gh-fcampbell deleted the frank-ws-version-drop branch September 23, 2024 16:29
sfc-gh-sichen pushed a commit that referenced this pull request Oct 17, 2024
Moves implementation of `snow app version drop` to `ApplicationPackageEntity.version_drop` and wires it into `snow ws version drop` too.
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