From cdbd77898a82eb8707d4954fc787789bdd6b587a Mon Sep 17 00:00:00 2001 From: Jeffrey Kinard Date: Wed, 6 Dec 2023 14:22:58 -0500 Subject: [PATCH] [yaml] fix yaml label appending Signed-off-by: Jeffrey Kinard --- sdks/python/apache_beam/yaml/yaml_transform.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdks/python/apache_beam/yaml/yaml_transform.py b/sdks/python/apache_beam/yaml/yaml_transform.py index ff5547db034c..8a5ccb3bb8b0 100644 --- a/sdks/python/apache_beam/yaml/yaml_transform.py +++ b/sdks/python/apache_beam/yaml/yaml_transform.py @@ -962,7 +962,9 @@ def expand(self, pcolls): python_provider = yaml_provider.InlineProvider({}) options = pipeline.options.view_as(GoogleCloudOptions) - options.labels = ["yaml=true"] + if not options.labels: + options.labels = [] + options.labels += ["yaml=true"] result = expand_transform( self._spec,