bvolpato opened a new pull request, #39614:
URL: https://github.com/apache/beam/pull/39614

   Fixes #39499.
   
   Python Dataflow client migration changed `ValueProvider` serialization to 
`str(v)`. Unset runtime providers were consequently sent in 
`sdk_pipeline_options` as their object representation, which Flex Template 
workers treated as the runtime value.
   
   This restores previous JSON behavior:
   
   - accessible providers serialize their resolved value
   - inaccessible providers serialize as `null`
   - focused coverage checks both static and unresolved runtime providers
   - `CHANGES.md` documents the 2.76.0 bug fix
   
   ## Reproduction
   
   Before the fix, the new test fails with:
   
   ```
   AssertionError: 'RuntimeValueProvider(option: at_vp_arg1, type: str, 
default_value: None)' is not None
   ```
   
   The same test passes after restoring value-aware serialization.
   
   ## Testing
   
   - `uvx tox -e py311-cloud -- 
apache_beam/runners/dataflow/internal/apiclient_test.py -k 
test_value_provider_options_serialization`
   - `target/.tox/py311-cloud/bin/pytest -q 
apache_beam/runners/dataflow/internal/apiclient_test.py 
apache_beam/internal/gcp/json_value_test.py` (78 passed, 1 skipped)
   - `uvx pre-commit run --files CHANGES.md 
sdks/python/apache_beam/runners/dataflow/internal/apiclient.py 
sdks/python/apache_beam/runners/dataflow/internal/apiclient_test.py`
   
   ------------------------
   
   - [x] Linked relevant issue.
   - [x] Updated `CHANGES.md`.
   - [x] Small contribution; ICLA not applicable.
   


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