You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SNOW-2229492 and SNOW-2229493 - cleanup versions in DCM (#2511)
* remove --no-version parameter
* remove dcm add_version command
* remove `--version` flag for `dcm plan` and `dcm deploy` - use given stage or upload local files
* Reverted logic in test_project_deploy_from_stage
* Reverted logic in test_project_drop_version
* Reverted logic in test_project_deploy
* Add support for `snow dcm deploy --alias` and revert drop_version integration test logic
* port `--prune` from non-existing `add-version` to `dcm plan` and `dcm deploy`
* fix the integation test for prune
* SNOW-2229498 rename show versions to show deployments in dcm (#2510)
* review fixes
* rely on existing user-facing errors
help="Version of the DCM Project to use. If not specified default version is used. For names containing '$', use single quotes to prevent shell expansion (e.g., 'VERSION$1').",
61
-
show_default=False,
62
-
)
63
57
variables_flag=variables_option(
64
58
'Variables for the execution context; for example: `-D "<key>=<value>"`.'
65
59
)
@@ -72,6 +66,22 @@
72
66
from_option=OverrideableOption(
73
67
None,
74
68
"--from",
69
+
mutually_exclusive=["prune"],
70
+
show_default=False,
71
+
)
72
+
73
+
prune_option=OverrideableOption(
74
+
False,
75
+
"--prune",
76
+
help="Remove unused artifacts from the stage during sync. Mutually exclusive with --from.",
77
+
mutually_exclusive=["from_stage"],
78
+
show_default=False,
79
+
)
80
+
81
+
alias_option=typer.Option(
82
+
None,
83
+
"--alias",
84
+
help="Alias for the deployment.",
75
85
show_default=False,
76
86
)
77
87
@@ -91,52 +101,46 @@
91
101
@app.command(requires_connection=True)
92
102
defdeploy(
93
103
identifier: FQN=dcm_identifier,
94
-
version: Optional[str] =version_flag,
95
104
from_stage: Optional[str] =from_option(
96
-
help="Apply changes defined in given stage instead of using a specific project version."
105
+
help="Deploy DCM Project deployment from a given stage."
97
106
),
98
107
variables: Optional[List[str]] =variables_flag,
99
108
configuration: Optional[str] =configuration_flag,
109
+
alias: Optional[str] =alias_option,
110
+
prune: bool=prune_option(),
100
111
**options,
101
112
):
102
113
"""
103
114
Applies changes defined in DCM Project to Snowflake.
104
115
"""
105
-
ifversionandfrom_stage:
106
-
raiseCliError("--version and --from are mutually exclusive.")
0 commit comments