tvalentyn commented on code in PR #29828:
URL: https://github.com/apache/beam/pull/29828#discussion_r1433773915
##########
sdks/python/apache_beam/options/pipeline_options.py:
##########
@@ -572,12 +572,18 @@ def _add_argparse_args(cls, parser):
class CrossLanguageOptions(PipelineOptions):
+ @staticmethod
+ def _beam_services_from_enviroment():
+ return json.loads(os.environ.get('BEAM_SERVICE_OVERRIDES') or '{}')
+
@classmethod
def _add_argparse_args(cls, parser):
parser.add_argument(
'--beam_services',
- type=json.loads,
- default={},
+ type=lambda s: {
+ **cls._beam_services_from_enviroment(), **json.loads(s)
Review Comment:
LGTM, thanks. PTAL at doc string while we are at it.
- do we still want to mention gradle details there?
- do we want to document reference BEAM_SERVICE_OVERRIDES there?
- any other changes you'd like to mention.
--
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]