From e1375f82e6e0ff2c2bfe7a53bd9b316d28874289 Mon Sep 17 00:00:00 2001 From: Abby Shen Date: Fri, 13 Dec 2024 15:30:57 -0800 Subject: [PATCH] snapshot --- tests/__snapshots__/test_help_messages.ambr | 475 ++++++++++++++++++-- 1 file changed, 429 insertions(+), 46 deletions(-) diff --git a/tests/__snapshots__/test_help_messages.ambr b/tests/__snapshots__/test_help_messages.ambr index 0188bec9ae..214a3a11f5 100644 --- a/tests/__snapshots__/test_help_messages.ambr +++ b/tests/__snapshots__/test_help_messages.ambr @@ -578,6 +578,355 @@ +------------------------------------------------------------------------------+ + ''' +# --- +# name: test_help_messages[app.release-directive.list] + ''' + + Usage: default app release-directive list [OPTIONS] + + Lists release directives in an application package. If no release channel is + specified, release directives for all channels are listed. If a release + channel is specified, only release directives for that channel are listed. + If --like is provided, only release directives matching the SQL pattern are + listed. + + +- Options --------------------------------------------------------------------+ + | --like -l TEXT SQL LIKE pattern for filtering objects by | + | name. For example, snow app | + | release-directive list --like='my%' lists | + | all release directives starting with | + | 'my'. | + | [default: %%] | + | --channel TEXT The release channel to use when listing | + | release directives. If not provided, | + | release directives from all release | + | channels are listed. | + | --package-entity-id TEXT The ID of the package entity on which to | + | operate when definition_version is 2 or | + | higher. | + | --app-entity-id TEXT The ID of the application entity on which | + | to operate when definition_version is 2 | + | or higher. | + | --project -p TEXT Path where Snowflake project resides. | + | Defaults to current working directory. | + | --env TEXT String in format of key=value. Overrides | + | variables from env section used for | + | templates. | + | --help -h Show this message and exit. | + +------------------------------------------------------------------------------+ + +- Connection configuration ---------------------------------------------------+ + | --connection,--environment -c TEXT Name of the connection, as | + | defined in your config.toml | + | file. Default: default. | + | --host TEXT Host address for the | + | connection. Overrides the | + | value specified for the | + | connection. | + | --port INTEGER Port for the connection. | + | Overrides the value | + | specified for the | + | connection. | + | --account,--accountname TEXT Name assigned to your | + | Snowflake account. Overrides | + | the value specified for the | + | connection. | + | --user,--username TEXT Username to connect to | + | Snowflake. Overrides the | + | value specified for the | + | connection. | + | --password TEXT Snowflake password. | + | Overrides the value | + | specified for the | + | connection. | + | --authenticator TEXT Snowflake authenticator. | + | Overrides the value | + | specified for the | + | connection. | + | --private-key-file,--private… TEXT Snowflake private key file | + | path. Overrides the value | + | specified for the | + | connection. | + | --token-file-path TEXT Path to file with an OAuth | + | token that should be used | + | when connecting to Snowflake | + | --database,--dbname TEXT Database to use. Overrides | + | the value specified for the | + | connection. | + | --schema,--schemaname TEXT Database schema to use. | + | Overrides the value | + | specified for the | + | connection. | + | --role,--rolename TEXT Role to use. Overrides the | + | value specified for the | + | connection. | + | --warehouse TEXT Warehouse to use. Overrides | + | the value specified for the | + | connection. | + | --temporary-connection -x Uses connection defined with | + | command line parameters, | + | instead of one defined in | + | config | + | --mfa-passcode TEXT Token to use for | + | multi-factor authentication | + | (MFA) | + | --enable-diag Run Python connector | + | diagnostic test | + | --diag-log-path TEXT Diagnostic report path | + | --diag-allowlist-path TEXT Diagnostic report path to | + | optional allowlist | + +------------------------------------------------------------------------------+ + +- Global configuration -------------------------------------------------------+ + | --format [TABLE|JSON] Specifies the output format. | + | [default: TABLE] | + | --verbose -v Displays log entries for log levels info | + | and higher. | + | --debug Displays log entries for log levels debug | + | and higher; debug logs contain additional | + | information. | + | --silent Turns off intermediate output to console. | + +------------------------------------------------------------------------------+ + + + ''' +# --- +# name: test_help_messages[app.release-directive.set] + ''' + + Usage: default app release-directive set [OPTIONS] DIRECTIVE + + Sets a release directive. + target_accounts cannot be specified for default release directives. + target_accounts field is required when creating a new non-default release + directive. + + +- Arguments ------------------------------------------------------------------+ + | * directive TEXT Name of the release directive to set | + | [required] | + +------------------------------------------------------------------------------+ + +- Options --------------------------------------------------------------------+ + | --channel TEXT Name of the release channel to use | + | [default: DEFAULT] | + | --target-accounts TEXT List of the accounts to apply the | + | release directive to. Format has to | + | be org1.account1,org2.account2 | + | * --version TEXT Version of the application package | + | to use | + | [required] | + | * --patch INTEGER Patch number to use for the | + | selected version | + | [required] | + | --package-entity-id TEXT The ID of the package entity on | + | which to operate when | + | definition_version is 2 or higher. | + | --app-entity-id TEXT The ID of the application entity on | + | which to operate when | + | definition_version is 2 or higher. | + | --project -p TEXT Path where Snowflake project | + | resides. Defaults to current | + | working directory. | + | --env TEXT String in format of key=value. | + | Overrides variables from env | + | section used for templates. | + | --help -h Show this message and exit. | + +------------------------------------------------------------------------------+ + +- Connection configuration ---------------------------------------------------+ + | --connection,--environment -c TEXT Name of the connection, as | + | defined in your config.toml | + | file. Default: default. | + | --host TEXT Host address for the | + | connection. Overrides the | + | value specified for the | + | connection. | + | --port INTEGER Port for the connection. | + | Overrides the value | + | specified for the | + | connection. | + | --account,--accountname TEXT Name assigned to your | + | Snowflake account. Overrides | + | the value specified for the | + | connection. | + | --user,--username TEXT Username to connect to | + | Snowflake. Overrides the | + | value specified for the | + | connection. | + | --password TEXT Snowflake password. | + | Overrides the value | + | specified for the | + | connection. | + | --authenticator TEXT Snowflake authenticator. | + | Overrides the value | + | specified for the | + | connection. | + | --private-key-file,--private… TEXT Snowflake private key file | + | path. Overrides the value | + | specified for the | + | connection. | + | --token-file-path TEXT Path to file with an OAuth | + | token that should be used | + | when connecting to Snowflake | + | --database,--dbname TEXT Database to use. Overrides | + | the value specified for the | + | connection. | + | --schema,--schemaname TEXT Database schema to use. | + | Overrides the value | + | specified for the | + | connection. | + | --role,--rolename TEXT Role to use. Overrides the | + | value specified for the | + | connection. | + | --warehouse TEXT Warehouse to use. Overrides | + | the value specified for the | + | connection. | + | --temporary-connection -x Uses connection defined with | + | command line parameters, | + | instead of one defined in | + | config | + | --mfa-passcode TEXT Token to use for | + | multi-factor authentication | + | (MFA) | + | --enable-diag Run Python connector | + | diagnostic test | + | --diag-log-path TEXT Diagnostic report path | + | --diag-allowlist-path TEXT Diagnostic report path to | + | optional allowlist | + +------------------------------------------------------------------------------+ + +- Global configuration -------------------------------------------------------+ + | --format [TABLE|JSON] Specifies the output format. | + | [default: TABLE] | + | --verbose -v Displays log entries for log levels info | + | and higher. | + | --debug Displays log entries for log levels debug | + | and higher; debug logs contain additional | + | information. | + | --silent Turns off intermediate output to console. | + +------------------------------------------------------------------------------+ + + + ''' +# --- +# name: test_help_messages[app.release-directive.unset] + ''' + + Usage: default app release-directive unset [OPTIONS] DIRECTIVE + + Unsets a release directive. + + +- Arguments ------------------------------------------------------------------+ + | * directive TEXT Name of the release directive | + | [required] | + +------------------------------------------------------------------------------+ + +- Options --------------------------------------------------------------------+ + | --channel TEXT Name of the release channel to use | + | [default: DEFAULT] | + | --package-entity-id TEXT The ID of the package entity on which to | + | operate when definition_version is 2 or | + | higher. | + | --app-entity-id TEXT The ID of the application entity on which | + | to operate when definition_version is 2 | + | or higher. | + | --project -p TEXT Path where Snowflake project resides. | + | Defaults to current working directory. | + | --env TEXT String in format of key=value. Overrides | + | variables from env section used for | + | templates. | + | --help -h Show this message and exit. | + +------------------------------------------------------------------------------+ + +- Connection configuration ---------------------------------------------------+ + | --connection,--environment -c TEXT Name of the connection, as | + | defined in your config.toml | + | file. Default: default. | + | --host TEXT Host address for the | + | connection. Overrides the | + | value specified for the | + | connection. | + | --port INTEGER Port for the connection. | + | Overrides the value | + | specified for the | + | connection. | + | --account,--accountname TEXT Name assigned to your | + | Snowflake account. Overrides | + | the value specified for the | + | connection. | + | --user,--username TEXT Username to connect to | + | Snowflake. Overrides the | + | value specified for the | + | connection. | + | --password TEXT Snowflake password. | + | Overrides the value | + | specified for the | + | connection. | + | --authenticator TEXT Snowflake authenticator. | + | Overrides the value | + | specified for the | + | connection. | + | --private-key-file,--private… TEXT Snowflake private key file | + | path. Overrides the value | + | specified for the | + | connection. | + | --token-file-path TEXT Path to file with an OAuth | + | token that should be used | + | when connecting to Snowflake | + | --database,--dbname TEXT Database to use. Overrides | + | the value specified for the | + | connection. | + | --schema,--schemaname TEXT Database schema to use. | + | Overrides the value | + | specified for the | + | connection. | + | --role,--rolename TEXT Role to use. Overrides the | + | value specified for the | + | connection. | + | --warehouse TEXT Warehouse to use. Overrides | + | the value specified for the | + | connection. | + | --temporary-connection -x Uses connection defined with | + | command line parameters, | + | instead of one defined in | + | config | + | --mfa-passcode TEXT Token to use for | + | multi-factor authentication | + | (MFA) | + | --enable-diag Run Python connector | + | diagnostic test | + | --diag-log-path TEXT Diagnostic report path | + | --diag-allowlist-path TEXT Diagnostic report path to | + | optional allowlist | + +------------------------------------------------------------------------------+ + +- Global configuration -------------------------------------------------------+ + | --format [TABLE|JSON] Specifies the output format. | + | [default: TABLE] | + | --verbose -v Displays log entries for log levels info | + | and higher. | + | --debug Displays log entries for log levels debug | + | and higher; debug logs contain additional | + | information. | + | --silent Turns off intermediate output to console. | + +------------------------------------------------------------------------------+ + + + ''' +# --- +# name: test_help_messages[app.release-directive] + ''' + + Usage: default app release-directive [OPTIONS] COMMAND [ARGS]... + + Manages release directives of an application package + + +- Options --------------------------------------------------------------------+ + | --help -h Show this message and exit. | + +------------------------------------------------------------------------------+ + +- Commands -------------------------------------------------------------------+ + | list Lists release directives in an application package. If no release | + | channel is specified, release directives for all channels are | + | listed. If a release channel is specified, only release directives | + | for that channel are listed. | + | set Sets a release directive. | + | unset Unsets a release directive. | + +------------------------------------------------------------------------------+ + + ''' # --- # name: test_help_messages[app.run] @@ -634,6 +983,18 @@ | determined from the | | project definition | | file. Default: unset. | + | --channel TEXT The name of the | + | release channel to | + | use when creating or | + | upgrading an | + | application instance | + | from a release | + | directive. Requires | + | the | + | --from-release-direc… | + | flag to be set. If | + | unset, the default | + | channel will be used. | | --interactive --no-interactive When enabled, this | | option displays | | prompts even if the | @@ -1406,23 +1767,27 @@ | --help -h Show this message and exit. | +------------------------------------------------------------------------------+ +- Commands -------------------------------------------------------------------+ - | bundle Prepares a local folder with configured app artifacts. | - | deploy Creates an application package in your Snowflake account and | - | syncs the local changes to the stage without creating or updating | - | the application. Running this command with no arguments at all, | - | as in snow app deploy, is a shorthand for snow app deploy --prune | - | --recursive. | - | events Fetches events for this app from the event table configured in | - | Snowflake. | - | open Opens the Snowflake Native App inside of your browser, once it | - | has been installed in your account. | - | run Creates an application package in your Snowflake account, uploads | - | code files to its stage, then creates or upgrades an application | - | object from the application package. | - | teardown Attempts to drop both the application object and application | - | package as defined in the project definition file. | - | validate Validates a deployed Snowflake Native App's setup script. | - | version Manages versions defined in an application package | + | bundle Prepares a local folder with configured app artifacts. | + | deploy Creates an application package in your Snowflake account | + | and syncs the local changes to the stage without | + | creating or updating the application. Running this | + | command with no arguments at all, as in snow app deploy, | + | is a shorthand for snow app deploy --prune --recursive. | + | events Fetches events for this app from the event table | + | configured in Snowflake. | + | open Opens the Snowflake Native App inside of your browser, | + | once it has been installed in your account. | + | release-directive Manages release directives of an application package | + | run Creates an application package in your Snowflake | + | account, uploads code files to its stage, then creates | + | or upgrades an application object from the application | + | package. | + | teardown Attempts to drop both the application object and | + | application package as defined in the project definition | + | file. | + | validate Validates a deployed Snowflake Native App's setup | + | script. | + | version Manages versions defined in an application package | +------------------------------------------------------------------------------+ @@ -6730,8 +7095,6 @@ Usage: default spcs service events [OPTIONS] NAME - Fetches events for this app from the event table configured in Snowflake. - +- Arguments ------------------------------------------------------------------+ | * name TEXT Identifier of the service; for example: my_service | | [required] | @@ -7496,8 +7859,6 @@ Usage: default spcs service metrics [OPTIONS] NAME - Fetches events for this app from the event table configured in Snowflake. - +- Arguments ------------------------------------------------------------------+ | * name TEXT Identifier of the service; for example: my_service | | [required] | @@ -8204,8 +8565,7 @@ | schema. | | describe Provides description of service. | | drop Drops service with given name. | - | events Fetches events for this app from the event | - | table configured in Snowflake. | + | events | | execute-job Creates and executes a job service in the | | current schema. | | list Lists all available services. | @@ -8215,8 +8575,7 @@ | list-roles Lists all service roles in a service. | | logs Retrieves local logs from a service | | container. | - | metrics Fetches events for this app from the event | - | table configured in Snowflake. | + | metrics | | resume Resumes the service from a SUSPENDED state. | | set Sets one or more properties for the | | service. | @@ -9969,6 +10328,28 @@ +------------------------------------------------------------------------------+ + ''' +# --- +# name: test_help_messages_no_help_flag[app.release-directive] + ''' + + Usage: default app release-directive [OPTIONS] COMMAND [ARGS]... + + Manages release directives of an application package + + +- Options --------------------------------------------------------------------+ + | --help -h Show this message and exit. | + +------------------------------------------------------------------------------+ + +- Commands -------------------------------------------------------------------+ + | list Lists release directives in an application package. If no release | + | channel is specified, release directives for all channels are | + | listed. If a release channel is specified, only release directives | + | for that channel are listed. | + | set Sets a release directive. | + | unset Unsets a release directive. | + +------------------------------------------------------------------------------+ + + ''' # --- # name: test_help_messages_no_help_flag[app.version] @@ -10005,23 +10386,27 @@ | --help -h Show this message and exit. | +------------------------------------------------------------------------------+ +- Commands -------------------------------------------------------------------+ - | bundle Prepares a local folder with configured app artifacts. | - | deploy Creates an application package in your Snowflake account and | - | syncs the local changes to the stage without creating or updating | - | the application. Running this command with no arguments at all, | - | as in snow app deploy, is a shorthand for snow app deploy --prune | - | --recursive. | - | events Fetches events for this app from the event table configured in | - | Snowflake. | - | open Opens the Snowflake Native App inside of your browser, once it | - | has been installed in your account. | - | run Creates an application package in your Snowflake account, uploads | - | code files to its stage, then creates or upgrades an application | - | object from the application package. | - | teardown Attempts to drop both the application object and application | - | package as defined in the project definition file. | - | validate Validates a deployed Snowflake Native App's setup script. | - | version Manages versions defined in an application package | + | bundle Prepares a local folder with configured app artifacts. | + | deploy Creates an application package in your Snowflake account | + | and syncs the local changes to the stage without | + | creating or updating the application. Running this | + | command with no arguments at all, as in snow app deploy, | + | is a shorthand for snow app deploy --prune --recursive. | + | events Fetches events for this app from the event table | + | configured in Snowflake. | + | open Opens the Snowflake Native App inside of your browser, | + | once it has been installed in your account. | + | release-directive Manages release directives of an application package | + | run Creates an application package in your Snowflake | + | account, uploads code files to its stage, then creates | + | or upgrades an application object from the application | + | package. | + | teardown Attempts to drop both the application object and | + | application package as defined in the project definition | + | file. | + | validate Validates a deployed Snowflake Native App's setup | + | script. | + | version Manages versions defined in an application package | +------------------------------------------------------------------------------+ @@ -10262,8 +10647,7 @@ | schema. | | describe Provides description of service. | | drop Drops service with given name. | - | events Fetches events for this app from the event | - | table configured in Snowflake. | + | events | | execute-job Creates and executes a job service in the | | current schema. | | list Lists all available services. | @@ -10273,8 +10657,7 @@ | list-roles Lists all service roles in a service. | | logs Retrieves local logs from a service | | container. | - | metrics Fetches events for this app from the event | - | table configured in Snowflake. | + | metrics | | resume Resumes the service from a SUSPENDED state. | | set Sets one or more properties for the | | service. |