[
https://issues.apache.org/jira/browse/BEAM-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16337796#comment-16337796
]
ASF GitHub Bot commented on BEAM-3525:
--------------------------------------
pgerv12 opened a new pull request #4478: [BEAM-3525] Remove unnecessary
serialization of PipelineOptions in TestPipeline in run()
URL: https://github.com/apache/beam/pull/4478
Follow this checklist to help us incorporate your contribution quickly and
easily:
- [ ] Make sure there is a [JIRA
issue](https://issues.apache.org/jira/projects/BEAM/issues/) filed for the
change (usually before you start working on it). Trivial changes like typos do
not require a JIRA issue. Your pull request should address just this issue,
without pulling in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line
and body.
- [ ] Format the pull request title like `[BEAM-XXX] Fixes bug in
ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA
issue.
- [ ] Write a pull request description that is detailed enough to
understand what the pull request does, how, and why.
- [ ] Run `mvn clean verify` to make sure basic checks pass. A more
thorough check will be performed on your pull request automatically.
- [ ] If this contribution is large, please file an Apache [Individual
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
---
This PR removes the serialization of PipelineOptions prematurely before the
TestPipeline is run (which creates a runner instance, which in turn uses
options to run the Beam application). Since this serialization occurs before
the selected runner has the chance to use/look at them, any options marked with
`JsonIgnore` do not survive -- leading to undesired behavior since
serialization is really only needed between job creation/submission vs runtime.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> TestPipeline serializes PipelineOptions prematurely
> ---------------------------------------------------
>
> Key: BEAM-3525
> URL: https://issues.apache.org/jira/browse/BEAM-3525
> Project: Beam
> Issue Type: Bug
> Components: testing
> Affects Versions: 2.2.0
> Reporter: Paul Gerver
> Assignee: Paul Gerver
> Priority: Minor
>
> The TestPipeline in its run() method now serializes PipelineOptions and adds
> in TestValueProvider values before submitting the pipeline to run [1].
> This premature serialization can cause options marked with JsonIgnore
> annotations to be dropped before a runner has had a chance to see those
> parameters. For example, take the FlinkRunner options, if flinkMaster is
> marked with JsonIgnore because that information is only needed by the runner
> submitting the job and is not needed during runtime, tests will be run
> locally incorrectly instead of against the Flink cluster.
> [1]
> https://github.com/apache/beam/blob/master/sdks/java/core/src/main/java/org/apache/beam/sdk/testing/TestPipeline.java#L354
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)