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 42 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 marked this pull request as ready for review December 5, 2024 16:35
@sfc-gh-pjafari sfc-gh-pjafari requested review from a team as code owners December 5, 2024 16:35
@sfc-gh-pjafari sfc-gh-pjafari changed the title subdirs Add optional subdirectory for stage in application package Dec 5, 2024
@sfc-gh-pjafari sfc-gh-pjafari changed the base branch from main to pj-template-processor-error December 5, 2024 18:15
@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
src/snowflake/cli/_plugins/nativeapp/commands.py Outdated Show resolved Hide resolved
return (
self.project_root
/ self._entity_model.deploy_root
/ self._entity_model.stage_subdirectory
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this changing? Seems like an unnecessary complication

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The deploy_root is now deploy_root/subdir. So all the actions (bundle, deploy, etc) that need to refer to deploy root to write/read artifacts look at this subdir.
I don't think I understand what you mean by unnecessary complication.

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean why is the deploy root now deploy_root/subdir?

src/snowflake/cli/_plugins/stage/diff.py Outdated Show resolved Hide resolved
src/snowflake/cli/_plugins/stage/diff.py Outdated Show resolved Hide resolved
src/snowflake/cli/_plugins/stage/diff.py Outdated Show resolved Hide resolved
src/snowflake/cli/_plugins/stage/diff.py Outdated Show resolved Hide resolved
src/snowflake/cli/_plugins/stage/manager.py 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
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.

3 participants