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

Disable snowflake.local.yml migration by default, add flag to enable it #1636

Merged
merged 2 commits into from
Sep 30, 2024

Conversation

sfc-gh-fcampbell
Copy link
Contributor

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

Fixes bug with snow helpers v1-to-v2 if a snowflake.local.yml is present. Currently, the local file isn't renamed, so a v1 local can be overlaid onto a v2 main definition file after migration, which breaks subsequent commands. Since local overrides are no longer a desired feature in PDFv2, we don't convert them unless --migrate-local-overrides is used.

migrate_local_yml: bool = typer.Option(
False,
"-l",
"--migrate-local-overrides",
Copy link
Contributor

Choose a reason for hiding this comment

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

we might have to wordsmith this to explain that we'll include it in the conversion but not produce a separate file / a separate set of entities for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@@ -35,10 +36,24 @@ def v1_to_v2(
accept_templates: bool = typer.Option(
False, "-t", "--accept-templates", help="Allows the migration of templates."
),
migrate_local_yml: bool = typer.Option(
False,
Copy link
Contributor

Choose a reason for hiding this comment

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

As discussed offline, would prefer to make this abort the migration if a snowflake.local.yml is present, and make the user choose the behaviour explicitly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@sfc-gh-fcampbell sfc-gh-fcampbell marked this pull request as ready for review September 27, 2024 17:07
@sfc-gh-fcampbell sfc-gh-fcampbell enabled auto-merge (squash) September 27, 2024 17:26
@sfc-gh-fcampbell sfc-gh-fcampbell merged commit 70bd382 into main Sep 30, 2024
21 checks passed
@sfc-gh-fcampbell sfc-gh-fcampbell deleted the frank-migrate-local-flag branch September 30, 2024 07:42
sfc-gh-jsikorski pushed a commit that referenced this pull request Sep 30, 2024
…it (#1636)

Fixes bug with `snow helpers v1-to-v2` if a `snowflake.local.yml` is present. Currently, the local file isn't renamed, so a v1 local can be overlaid onto a v2 main definition file after migration, which breaks subsequent commands. Since local overrides are no longer a desired feature in PDFv2, we don't convert them unless `--migrate-local-overrides` is used.
@sfc-gh-jsikorski sfc-gh-jsikorski mentioned this pull request Sep 30, 2024
8 tasks
sfc-gh-jsikorski pushed a commit that referenced this pull request Sep 30, 2024
…it (#1636)

Fixes bug with `snow helpers v1-to-v2` if a `snowflake.local.yml` is present. Currently, the local file isn't renamed, so a v1 local can be overlaid onto a v2 main definition file after migration, which breaks subsequent commands. Since local overrides are no longer a desired feature in PDFv2, we don't convert them unless `--migrate-local-overrides` is used.
sfc-gh-sichen pushed a commit that referenced this pull request Oct 17, 2024
…it (#1636)

Fixes bug with `snow helpers v1-to-v2` if a `snowflake.local.yml` is present. Currently, the local file isn't renamed, so a v1 local can be overlaid onto a v2 main definition file after migration, which breaks subsequent commands. Since local overrides are no longer a desired feature in PDFv2, we don't convert them unless `--migrate-local-overrides` is used.
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.

4 participants