[
https://issues.apache.org/jira/browse/BEAM-6963?focusedWorklogId=221666&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-221666
]
ASF GitHub Bot logged work on BEAM-6963:
----------------------------------------
Author: ASF GitHub Bot
Created on: 02/Apr/19 09:50
Start Date: 02/Apr/19 09:50
Worklog Time Spent: 10m
Work Description: lgajowy commented on pull request #8183: [BEAM-6963]
Added Jenkins jobs running Java examples on Dataflow with Java 11
URL: https://github.com/apache/beam/pull/8183#discussion_r271217963
##########
File path: runners/google-cloud-dataflow-java/examples/build.gradle
##########
@@ -87,6 +87,61 @@ task preCommitFnApiWorker(type: Test) {
}
}
+task postCommitFnApiWorkerJava11(type: Test) {
Review comment:
I see that this is a similar task to `preCommitFnApiWorker`. Could we reuse
`preCommitFnApiWorker` and parametrize it? My main concern now is that we
duplicate lots of code that will be hard to maintain.
When refactoring this, please remember to set default argument/parameter
values to java 8's in order not to need to change anything else in the code
that already uses this. Also please change its name to `fnApiWorkerTests` or
something similar because it's clearly not preCommit only now.
----------------------------------------------------------------
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: 221666)
Time Spent: 20m (was: 10m)
> Bug in RuntimeValueProvider JSON serialization
> ----------------------------------------------
>
> Key: BEAM-6963
> URL: https://issues.apache.org/jira/browse/BEAM-6963
> Project: Beam
> Issue Type: Bug
> Components: sdk-java-core
> Affects Versions: 2.11.0
> Reporter: Balázs Németh
> Priority: Critical
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Classes affected:
> org.apache.beam.sdk.options.ValueProvider.Serializer
> org.apache.beam.sdk.options.ValueProvider.Deserializer
> The problem is that according to the JsonDeserializer documentation, the
> deserialize method isn't executed for null nodes:
> (
> [https://static.javadoc.io/com.fasterxml.jackson.core/jackson-databind/2.9.6/com/fasterxml/jackson/databind/JsonDeserializer.html#deserialize(com.fasterxml.jackson.core.JsonParser,%20com.fasterxml.jackson.databind.DeserializationContext)|https://static.javadoc.io/com.fasterxml.jackson.core/jackson-databind/2.9.6/com/fasterxml/jackson/databind/JsonDeserializer.html#deserialize(com.fasterxml.jackson.core.JsonParser,%20com.fasterxml.jackson.databind.DeserializationContext]
> )
> )
> "Note that this method is never called for JSON null literal, and thus
> deserializers need (and should) not check for it."
> If we serialize a RuntimeValueProvider, the isAccessible() will return false,
> so we call a writeNull(). During deserialization this isn't handled properly
> as mentioned and our deserialization will return null.
> The end result is that getters with ValueProvider return values will return
> "null". AFAIK ValueProvider getters should be never null.
> My guess is that either we should completely omit serializing
> RuntimeValueProviders, or during deserialization the proper runtime value
> provider should be created again - which requires more than just a simple
> "null" being present in the json.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)