[ 
https://issues.apache.org/jira/browse/BEAM-5939?focusedWorklogId=505954&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-505954
 ]

ASF GitHub Bot logged work on BEAM-5939:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 28/Oct/20 22:40
            Start Date: 28/Oct/20 22:40
    Worklog Time Spent: 10m 
      Work Description: 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:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 505954)
    Time Spent: 4.5h  (was: 4h 20m)

> Deduplicate constants
> ---------------------
>
>                 Key: BEAM-5939
>                 URL: https://issues.apache.org/jira/browse/BEAM-5939
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py-core
>            Reporter: Ahmet Altay
>            Assignee: Tomasz Szerszen
>            Priority: P3
>              Labels: starer
>          Time Spent: 4.5h
>  Remaining Estimate: 0h
>
> apache_beam/runners/dataflow/internal/names.py
> apache_beam/runners/portability/stager.py
> has same constants defined in both files.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to