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 --from-stage option to version create #1973

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

Conversation

sfc-gh-melnacouzi
Copy link
Contributor

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

Add --from-stage option to version create

When --from-stage is provided, snow app version create --from-stage will create a version from the content of the stage directly without resyncing the local files to the stage.

@sfc-gh-melnacouzi sfc-gh-melnacouzi requested review from a team as code owners January 7, 2025 22:15
@sfc-gh-melnacouzi sfc-gh-melnacouzi enabled auto-merge (squash) January 8, 2025 13:46
@sfc-gh-melnacouzi sfc-gh-melnacouzi force-pushed the melnacouzi-add-from-stage-to-version-create branch from cf9c075 to ab0a5c2 Compare January 8, 2025 13:46
@sfc-gh-melnacouzi sfc-gh-melnacouzi force-pushed the melnacouzi-add-from-stage-to-version-create branch from ab0a5c2 to 85865f7 Compare January 8, 2025 18:04
# then do not re-deploy the artifacts or touch the stage
if from_stage:
# verify package exists:
show_obj_row = self.get_existing_app_pkg_info()

Choose a reason for hiding this comment

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

nit: we can directly check self.get_existing_app_pkg_info() in the if statement

@@ -25,6 +25,7 @@
* `snow app release-directive set`
* `snow app release-directive unset`
* `snow app version create` now returns version, patch, and label in JSON format.
* Add `--from-stage` flag to `snow app version create` to allow version creation from the content of the stage without re-syncing to the stage.

Choose a reason for hiding this comment

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

Out of curiosity, what does "re-syncing to the stage" mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

uploading files to the stage from local workspace.

@@ -1923,6 +1923,13 @@
| untracked or stages |
| files in git. Default: |
| unset. |
| --from-stage When enabled, the |

Choose a reason for hiding this comment

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

I'm curious what is this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It contains snapshots from all the commands through unit tests - it is auto-generated, and helps verify that the command output changes (--help) are as expected.

Choose a reason for hiding this comment

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

got it thanks

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