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 app deploy command #921

Merged
merged 13 commits into from
Mar 22, 2024
Merged

Conversation

sfc-gh-gbloom
Copy link
Contributor

@sfc-gh-gbloom sfc-gh-gbloom commented Mar 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.
  • 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

Adding the snow app deoply command, which syncs the local changes to the stage without creating/updating the application (More details in SNOW-1215781).

Since the deploy command is basically the same as the run command without the last step of creating/updating the application, I moved the shared logic to the base NativeAppManager class.

The next step will be to extend the command to accept optional file paths arguments to sync only specific files: snow app deploy [file]*.

Test

Created a basic app:

snow app run -c QA3 --warehouse TEST1

Running deploy with no changes:

snow app deploy -c QA3

There are no new files that exist only in your local directory.
There are no new files that exist only on the stage.
There are no existing files that have been modified, or their status is unknown.
Existing files identical to the stage:
README.md
manifest.yml
setup_script.sql

Making a change to the readme and running deploy again:

snow app deploy -c QA3

Existing files modified or status unknown:
README.md
Existing files identical to the stage:
manifest.yml
setup_script.sql
Uploading diff-ed files from your local /Users/gbloom/gbloom-training-app/output/deploy directory to the Snowflake stage.

@sfc-gh-gbloom sfc-gh-gbloom marked this pull request as ready for review March 21, 2024 00:18
@sfc-gh-gbloom sfc-gh-gbloom requested review from sfc-gh-bgoel and a team as code owners March 21, 2024 00:18
Copy link
Contributor

@sfc-gh-cgorrie sfc-gh-cgorrie left a comment

Choose a reason for hiding this comment

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

Generally looks good to me -- I'd like to see an integration test that confirms the existence of the app package + stage contents as there does not appear to be any additional test coverage.

Copy link
Contributor

@sfc-gh-bgoel sfc-gh-bgoel left a comment

Choose a reason for hiding this comment

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

  • Cam's comment: please add relevant integration test(s) for this command.

@sfc-gh-gbloom sfc-gh-gbloom mentioned this pull request Mar 21, 2024
7 tasks
@sfc-gh-gbloom sfc-gh-gbloom merged commit f9914b3 into main Mar 22, 2024
8 checks passed
@sfc-gh-gbloom sfc-gh-gbloom deleted the gbloom-SNOW-1215781-app-deploy-command branch March 22, 2024 18:55
sfc-gh-sichen pushed a commit that referenced this pull request Oct 17, 2024
* add app deploy command

* update snapshot

* add integration test

* update release notes

* verify manifest exists in stage
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