From 80590662bd9956d3c93449ca4703a2430e0613b7 Mon Sep 17 00:00:00 2001 From: HenryNguyen5 <6404866+HenryNguyen5@users.noreply.github.com> Date: Mon, 6 May 2024 15:49:38 -0400 Subject: [PATCH] Normalize ref regex (#13112) --- .changeset/ten-dodos-run.md | 5 +++++ core/services/workflows/models_yaml.go | 2 +- .../testdata/fixtures/workflows/workflow_schema.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/ten-dodos-run.md diff --git a/.changeset/ten-dodos-run.md b/.changeset/ten-dodos-run.md new file mode 100644 index 00000000000..42ab8ec58b2 --- /dev/null +++ b/.changeset/ten-dodos-run.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal Normalize keystone workflow ref regex property to match id regex diff --git a/core/services/workflows/models_yaml.go b/core/services/workflows/models_yaml.go index 5ed7941f84a..74ed8ee466d 100644 --- a/core/services/workflows/models_yaml.go +++ b/core/services/workflows/models_yaml.go @@ -211,7 +211,7 @@ type stepDefinitionYaml struct { // - “ref” has a circular reference. // // NOTE: Should introduce a custom validator to cover trigger case - Ref string `json:"ref,omitempty" jsonschema:"pattern=^[a-z0-9_]+$"` + Ref string `json:"ref,omitempty" jsonschema:"pattern=^[a-z0-9_-]+$"` // Capabilities can specify an additional optional ”inputs” property. It allows specifying a dependency on the result of one or more other capabilities. These are always runtime values that cannot be provided upfront. It takes a map of the argument name internal to the capability and an explicit reference to the values. // diff --git a/core/services/workflows/testdata/fixtures/workflows/workflow_schema.json b/core/services/workflows/testdata/fixtures/workflows/workflow_schema.json index 7f257f7798d..f9f9fd88646 100644 --- a/core/services/workflows/testdata/fixtures/workflows/workflow_schema.json +++ b/core/services/workflows/testdata/fixtures/workflows/workflow_schema.json @@ -48,7 +48,7 @@ }, "ref": { "type": "string", - "pattern": "^[a-z0-9_]+$" + "pattern": "^[a-z0-9_-]+$" }, "inputs": { "$ref": "#/$defs/mapping"