You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "TSultanov (via GitHub)" <gi...@apache.org> on 2023/02/13 13:03:52 UTC

[GitHub] [beam] TSultanov commented on a diff in pull request #25365: Refactoring: Moved hard coded environment variables' names into constants.

TSultanov commented on code in PR #25365:
URL: https://github.com/apache/beam/pull/25365#discussion_r1104441227


##########
playground/infrastructure/checker.py:
##########
@@ -90,10 +91,10 @@ def check_sdk_examples(paths: List[PurePath], sdk: Sdk, root_dir: str) -> bool:
 def main():
     args = parse_args()
 
-    root_dir = os.getenv("BEAM_ROOT_DIR")
+    root_dir = os.getenv(BEAM_ROOT_DIR_ENV_VAR_KEY)
     if root_dir is None:
         raise KeyError("BEAM_ROOT_DIR environment variable should be specified in os")

Review Comment:
   Please use value from the new constant when building the error message so won't get out of sync with the actually expected value



##########
playground/infrastructure/checker.py:
##########
@@ -90,10 +91,10 @@ def check_sdk_examples(paths: List[PurePath], sdk: Sdk, root_dir: str) -> bool:
 def main():
     args = parse_args()
 
-    root_dir = os.getenv("BEAM_ROOT_DIR")
+    root_dir = os.getenv(BEAM_ROOT_DIR_ENV_VAR_KEY)
     if root_dir is None:
         raise KeyError("BEAM_ROOT_DIR environment variable should be specified in os")
-    categories_file = os.getenv("BEAM_EXAMPLE_CATEGORIES")
+    categories_file = os.getenv(BEAM_EXAMPLE_CATEGORIES_ENV_VAR_KEY)
     if categories_file is None:
         raise KeyError("BEAM_EXAMPLE_CATEGORIES environment variable should be specified in os")

Review Comment:
   Please use value from the new constant when building the error message



-- 
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-unsubscribe@beam.apache.org

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