diff --git a/core/actions/assertion.ts b/core/actions/assertion.ts index 34cfa48b8..954293a1e 100644 --- a/core/actions/assertion.ts +++ b/core/actions/assertion.ts @@ -161,6 +161,12 @@ export class Assertion extends ActionBuilder { } this.proto.actionDescriptor.reservation = config.reservation; } + if (config.metadata) { + if (!this.proto.actionDescriptor) { + this.proto.actionDescriptor = {}; + } + this.proto.actionDescriptor.metadata = config.metadata; + } return this; } diff --git a/core/actions/assertion_test.ts b/core/actions/assertion_test.ts index 02ec6e637..9deeedad8 100644 --- a/core/actions/assertion_test.ts +++ b/core/actions/assertion_test.ts @@ -104,6 +104,14 @@ actions: description: "description", hermetic: true, dependOnDependencyAssertions: true, + metadata: { + overview: "assertion overview", + extraProperties: { + fields: { + priority: { stringValue: "high" } + } + } + } }`; [ { @@ -147,7 +155,15 @@ SELECT 1` name: "name" }, actionDescriptor: { - description: "description" + description: "description", + metadata: { + overview: "assertion overview", + extraProperties: { + fields: { + priority: { stringValue: "high" } + } + } + } }, dependencyTargets: [ { diff --git a/protos/configs.proto b/protos/configs.proto index ad8668c96..a0aca3f39 100644 --- a/protos/configs.proto +++ b/protos/configs.proto @@ -528,6 +528,9 @@ message ActionConfig { // If unset, the value from workflow_settings.yaml is used. If neither is set, default BigQuery behavior applies. // Dataform CLI only (GCP Dataform support pending). string reservation = 11; + + // Metadata for this assertion. + Metadata metadata = 12; } message OperationConfig {