Skip to content

Commit 4c6f501

Browse files
committed
chore: handle pipeline.MustNewIDWithName deprecation
Signed-off-by: Bence Csati <[email protected]>
1 parent 7c8af8e commit 4c6f501

File tree

1 file changed

+5
-1
lines changed
  • pkg/resources/otel_conf_gen/validator

1 file changed

+5
-1
lines changed

pkg/resources/otel_conf_gen/validator/hooks.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@ func decodeID(from reflect.Type, to reflect.Type, data interface{}) (interface{}
6161
if len(parts) != 2 {
6262
return nil, fmt.Errorf("invalid pipeline ID format: %s", data.(string))
6363
}
64-
return pipeline.MustNewIDWithName(parts[0], parts[1]), nil
64+
signal := pipeline.Signal{}
65+
if err := signal.UnmarshalText([]byte(parts[0])); err != nil {
66+
return nil, fmt.Errorf("invalid pipeline signal: %s", parts[0])
67+
}
68+
return pipeline.NewIDWithName(signal, parts[1]), nil
6569
}
6670
}
6771

0 commit comments

Comments
 (0)