olehborysevych commented on code in PR #26279:
URL: https://github.com/apache/beam/pull/26279#discussion_r1170149575


##########
playground/infrastructure/verify.py:
##########
@@ -66,7 +72,46 @@ async def _run_and_verify(self, examples: List[Example]):
             examples: beam examples that should be run
         """
 
+
         async def _populate_fields(example: Example):
+            """
+            Populate fields of the example reading them from the backend or 
from the repository.
+            Args:
+                example: beam example that should be verified
+            """
+            if example.tag.never_run:
+                logging.info("populating example fields from provided files 
%s", example.filepath)
+                _populate_from_repo(example)
+            else:
+                await _populate_from_runner(example)
+
+        def _populate_from_repo(example: Example):
+            """
+            Populate fields of the example reading them from the repository.
+            Args:
+                example: beam example that should be verified
+            """
+            path = Path(example.filepath)
+            example_folder = path.parent
+
+            log_file_path = example_folder / self.LOGS_FILENAME
+            # Check if the file exists and read its content
+            if log_file_path.exists():

Review Comment:
   > If these files don't exist, should we be raising some sort of exception?
   We do not treat this as exception. It's ok if some files are missing.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to