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

Add optional subdirectory for stage in application package #1916

Open
wants to merge 48 commits into
base: main
Choose a base branch
from

Conversation

sfc-gh-pjafari
Copy link
Contributor

@sfc-gh-pjafari sfc-gh-pjafari commented Dec 3, 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

Added an optional stage_subdirectory to the application package.
This change means that the root of the stage is no longer the assumed path to finding the artifacts and the manifest.yml. If specified, the application package will only ever operate on stage/stage_subdirectory. This includes deploy, diff, and version create.

For detailed information on how this affects each command, if specified, refer to the design document.

@sfc-gh-pjafari sfc-gh-pjafari changed the title Pj subartifacts subdirs subdirs Dec 3, 2024
@sfc-gh-pjafari sfc-gh-pjafari changed the base branch from pj-template-processor-error to main December 5, 2024 18:33
RELEASE-NOTES.md Outdated Show resolved Hide resolved
src/snowflake/cli/_plugins/nativeapp/sf_sql_facade.py Outdated Show resolved Hide resolved
tests/nativeapp/test_application_package_entity.py Outdated Show resolved Hide resolved
tests/stage/test_diff.py Outdated Show resolved Hide resolved
@sfc-gh-pjafari sfc-gh-pjafari force-pushed the pj-subartifacts-subdirs branch from 8347118 to b94bad5 Compare December 18, 2024 15:04
@@ -192,7 +192,8 @@ def stage_diff(
Diffs a stage with a local folder.
"""
diff: DiffResult = compute_stage_diff(
local_root=Path(folder_name), stage_fqn=stage_name
local_root=Path(folder_name),
stage_path=StageManager._stage_path_part_factory(stage_name), # noqa: SLF001
Copy link
Contributor

Choose a reason for hiding this comment

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

_stage_path_part_factory is a private function, could you rename it to something like stage_path_patrs_of_str and add a docstring?

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