-
Notifications
You must be signed in to change notification settings - Fork 59
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 project commands #2018
base: main
Are you sure you want to change the base?
Add project commands #2018
Conversation
88b8fcd
to
b492dd2
Compare
f795342
to
a4a3209
Compare
a4a3209
to
16bbb79
Compare
|
||
@unique | ||
class FeatureFlag(FeatureFlagMixin): | ||
ENABLE_SNOWFLAKE_PROJECTS = BooleanFlag("ENABLE_NATIVE_APP_PYTHON_SETUP", False) |
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.
Is this correct with ENABLE_NATIVE_APP_PYTHON_SETUP
?
cli_console.step(f"Creating stage {stage_name}") | ||
sm.create(fqn=stage_name) | ||
|
||
for file in project.artifacts: |
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.
Does this take care of replacing existing files on the stage with the same name? What about files already living on the stage directory used to feed the project. Are they being deleted when they don't existing in the new version?
Maybe each snow project create-version
should create a subdirectory on the stage that is prefixed with a unique identifier / the version name?
|
||
@app.command(requires_connection=True) | ||
@with_project_definition() | ||
def create_version( |
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.
Are we gonna have an init
command?
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.
Oh I see, create_version creates project if doesn't exist.
|
||
|
||
@unique | ||
class FeatureFlag(FeatureFlagMixin): |
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.
Can we show this feature only for PrPr customers?
|
||
@app.command(requires_connection=True) | ||
@with_project_definition() | ||
def create_version( |
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.
I have some doubts about this command:
- both execute and validate commands map directly to a single project SQL command, the create_version command suggests that it maps to
alter project p add version
, but it does much more - we should have a command which maps to the basic
alter project p add version
. I don't see how this will work with snow-git-based projects. If we add a basic "add version" command, then it can be used by users to create a version from any stage, also a snow-git-based one. And it can be used in this more complex command. - Imo the name should be more explicit, like, create_version_from_local_files or something like that.
Pre-review checklist
Changes description
Add
snow project
commands hidden behind a feature flag.