shubham-j-sde commented on code in PR #34708:
URL: https://github.com/apache/beam/pull/34708#discussion_r2055063643


##########
sdks/python/apache_beam/yaml/yaml_transform.py:
##########
@@ -85,6 +85,12 @@ def validate_against_schema(pipeline, strictness):
     jsonschema.validate(pipeline, pipeline_schema(strictness))
   except jsonschema.ValidationError as exn:
     exn.message += f" around line {_closest_line(pipeline, exn.path)}"
+    # validation message for chain-type transform
+    if (exn.schema_path[-1] == 'not' and
+        exn.schema_path[-2] in ['input', 'output']):
+      exn.message = (
+          f"'{exn.schema_path[-2]}' should not be used "
+          "along with 'chain' type transforms. " + exn.message)

Review Comment:
   yeah sure. 
   it will be part of 
[transform_unit_test](https://github.com/apache/beam/blob/master/sdks/python/apache_beam/yaml/yaml_transform_unit_test.py)
 or 
[transform_test](https://github.com/apache/beam/blob/master/sdks/python/apache_beam/yaml/yaml_transform_test.py)
 ?
   I checked, the function isn't called for any current tests in either files.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@beam.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to