You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/10/28 22:40:37 UTC

[GitHub] [beam] tvalentyn commented on a change in pull request #13142: [BEAM-5939] - Deduplicate constants

tvalentyn commented on a change in pull request #13142:
URL: https://github.com/apache/beam/pull/13142#discussion_r513802306



##########
File path: sdks/python/apache_beam/runners/dataflow/internal/names.py
##########
@@ -27,7 +27,13 @@
 # Standard file names used for staging files.
 from builtins import object
 
-DATAFLOW_SDK_TARBALL_FILE = 'dataflow_python_sdk.tar'
+# pylint: disable=unused-import
+from apache_beam.runners.internal.names import DATAFLOW_SDK_TARBALL_FILE
+from apache_beam.runners.internal.names import PICKLED_MAIN_SESSION_FILE

Review comment:
       I think we could avoid importing all of these except for PICKLED_MAIN_SESSION_FILE, and update all references in Beam codeabase to use apache_beam.runners.internal.names instead, similar what we do in apiclient.py.
   
   ```
   # pylint: disable=unused-import
   # Used by Dataflow legacy worker. 
   from apache_beam.runners.internal.names import PICKLED_MAIN_SESSION_FILE
   ```

##########
File path: sdks/python/apache_beam/runners/internal/names.py
##########
@@ -20,8 +20,11 @@
 # All constants are for internal use only; no backwards-compatibility
 # guarantees.
 
+DATAFLOW_SDK_TARBALL_FILE = 'dataflow_python_sdk.tar'

Review comment:
       Let's rename this to:
    
   `STAGED_SDK_SOURCES_FILENAME = 'dataflow_python_sdk.tar'  # Current value is hardcoded in Dataflow internal infrastructure; please don't change without a review from Dataflow maintainers.`
   




----------------------------------------------------------------
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.

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