diff --git a/cli/index.ts b/cli/index.ts index 43507a96e..9b212bc4b 100644 --- a/cli/index.ts +++ b/cli/index.ts @@ -86,7 +86,8 @@ const tagsOption: INamedOption = { name: "tags", option: { describe: "A list of tags to filter the actions to run.", - type: "array" + type: "array", + coerce: (rawTags: string[] | null) => rawTags.map(tags => tags.split(",")).flat() } }; @@ -469,6 +470,7 @@ export function runCli() { credentialsOption, jsonOutputOption, timeoutOption, + tagsOption, ...ProjectConfigOptions.allYargsOptions ], processFn: async argv => { diff --git a/cli/index_test.ts b/cli/index_test.ts index 3806e1de7..fd3ac80c3 100644 --- a/cli/index_test.ts +++ b/cli/index_test.ts @@ -194,7 +194,7 @@ defaultAssertionDataset: dataform_assertions fs.writeFileSync( filePath, ` -config { type: "table" } +config { type: "table", tags: ["someTag"] } select 1 as \${dataform.projectConfig.vars.testVar2} ` ); @@ -230,7 +230,8 @@ select 1 as \${dataform.projectConfig.vars.testVar2} }, query: "\n\nselect 1 as testValue2\n", disabled: false, - fileName: "definitions/example.sqlx" + fileName: "definitions/example.sqlx", + tags: ["someTag"] } ], projectConfig: { @@ -267,7 +268,8 @@ select 1 as \${dataform.projectConfig.vars.testVar2} "--dry-run", "--json", "--vars=testVar1=testValue1,testVar2=testValue2", - "--default-location=europe" + "--default-location=europe", + "--tags=someTag,someOtherTag" ]) ); @@ -306,7 +308,8 @@ select 1 as \${dataform.projectConfig.vars.testVar2} } }, runConfig: { - fullRefresh: false + fullRefresh: false, + tags: ["someTag", "someOtherTag"] }, warehouseState: {} }); diff --git a/docs/configs-reference.md b/docs/configs-reference.md index 388735de1..1402016db 100644 --- a/docs/configs-reference.md +++ b/docs/configs-reference.md @@ -39,7 +39,7 @@ ### ActionConfig -Action config defines the configuration properties of actions. +Action config defines the contents of `actions.yaml` configuration files. | Field | Type | Label | Description | diff --git a/protos/configs.proto b/protos/configs.proto index 649c2e88f..5b1b870fa 100644 --- a/protos/configs.proto +++ b/protos/configs.proto @@ -51,7 +51,7 @@ message ActionConfigs { repeated ActionConfig actions = 1; } -// Action config defines the configuration properties of actions. +// Action config defines the contents of `actions.yaml` configuration files. message ActionConfig { // Target represents a unique action identifier. message Target {