-
Notifications
You must be signed in to change notification settings - Fork 54
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
[SNOW-1371918] Make snow app deploy behave more intuitively #1170
Conversation
cb77258
to
62fc613
Compare
0d24ca3
to
c591fd7
Compare
c5f0361
to
fc0462d
Compare
fc0462d
to
aecd33c
Compare
specified, it must match one of the artifacts src pattern entries in snowflake.yml. If a directory is | ||
specified, it will be searched for subfolders or files to deploy based on artifacts src pattern entries. If | ||
unspecified, the command syncs all local changes to the stage.""" | ||
).strip(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iirc, the reason why this only says file or directory, and not a glob pattern, is because a user's shell should automatically expand that and pass that in to this arg as a list. Is that correct? Do we still need to clarify that here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That message has nothing to do with globbing. Any path specified as argument could be a file or a directory. The behaviour is somewhat different based on what the path corresponds to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me rephrase: My intent was to ask if a user can now do all three:
snow app deploy some/dir/**.py
snow app deploy some/dir
snow app deploy some/file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah. Yes they can, but this PR doesn't change that, it was true before as well. We it does change is what happens if some/dir is specified. Basically the path -> artifact rule mapping is just being relaxed here, nothing more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, replied to open threads.
specified, it must match one of the artifacts src pattern entries in snowflake.yml. If a directory is | ||
specified, it will be searched for subfolders or files to deploy based on artifacts src pattern entries. If | ||
unspecified, the command syncs all local changes to the stage.""" | ||
).strip(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me rephrase: My intent was to ask if a user can now do all three:
snow app deploy some/dir/**.py
snow app deploy some/dir
snow app deploy some/file
f274ec2
to
5646b1f
Compare
Co-authored-by: Cam Gorrie <cam.gorrie@snowflake.com>
5646b1f
to
2e86e9b
Compare
2e86e9b
to
3ad75f2
Compare
Pre-review checklist
Changes description
snow app deploy
, when invoked with directories, current a matching artifact deployment rule for each parameter. This is not very intuitive. For example, when a user specifies:in their
snowflake.yml
,snow app deploy -r app
results in an error. This change makes the command deploy all files that have been changed within the specified directory instead.