[
https://issues.apache.org/jira/browse/GOBBLIN-987?focusedWorklogId=350807&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-350807
]
ASF GitHub Bot logged work on GOBBLIN-987:
------------------------------------------
Author: ASF GitHub Bot
Created on: 28/Nov/19 03:36
Start Date: 28/Nov/19 03:36
Worklog Time Spent: 10m
Work Description: codecov-io commented on issue #2833: [GOBBLIN-987]
Reject unrecognized Enum symbols in JsonRecordAvroSchemaToAvroConverter
URL:
https://github.com/apache/incubator-gobblin/pull/2833#issuecomment-559328522
#
[Codecov](https://codecov.io/gh/apache/incubator-gobblin/pull/2833?src=pr&el=h1)
Report
> Merging
[#2833](https://codecov.io/gh/apache/incubator-gobblin/pull/2833?src=pr&el=desc)
into
[master](https://codecov.io/gh/apache/incubator-gobblin/commit/f3cf13d75eae638698662041fd035e838f0939b2?src=pr&el=desc)
will **increase** coverage by `0.01%`.
> The diff coverage is `100%`.
[](https://codecov.io/gh/apache/incubator-gobblin/pull/2833?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #2833 +/- ##
============================================
+ Coverage 45.61% 45.62% +0.01%
- Complexity 8969 8972 +3
============================================
Files 1902 1902
Lines 71292 71295 +3
Branches 7863 7863
============================================
+ Hits 32520 32530 +10
+ Misses 35777 35775 -2
+ Partials 2995 2990 -5
```
| [Impacted
Files](https://codecov.io/gh/apache/incubator-gobblin/pull/2833?src=pr&el=tree)
| Coverage Δ | Complexity Δ | |
|---|---|---|---|
|
[...ro/JsonElementConversionWithAvroSchemaFactory.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2833/diff?src=pr&el=tree#diff-Z29iYmxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NvbnZlcnRlci9hdnJvL0pzb25FbGVtZW50Q29udmVyc2lvbldpdGhBdnJvU2NoZW1hRmFjdG9yeS5qYXZh)
| `68.93% <100%> (+0.93%)` | `6 <0> (ø)` | :arrow_down: |
|
[...in/java/org/apache/gobblin/cluster/HelixUtils.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2833/diff?src=pr&el=tree#diff-Z29iYmxpbi1jbHVzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NsdXN0ZXIvSGVsaXhVdGlscy5qYXZh)
| `35.51% <0%> (-3.74%)` | `12% <0%> (-1%)` | |
|
[.../org/apache/gobblin/cluster/GobblinTaskRunner.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2833/diff?src=pr&el=tree#diff-Z29iYmxpbi1jbHVzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NsdXN0ZXIvR29iYmxpblRhc2tSdW5uZXIuamF2YQ==)
| `65.27% <0%> (+0.46%)` | `28% <0%> (ø)` | :arrow_down: |
|
[...main/java/org/apache/gobblin/util/HadoopUtils.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2833/diff?src=pr&el=tree#diff-Z29iYmxpbi11dGlsaXR5L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3V0aWwvSGFkb29wVXRpbHMuamF2YQ==)
| `30.87% <0%> (+0.67%)` | `25% <0%> (+1%)` | :arrow_up: |
|
[.../apache/gobblin/runtime/api/JobExecutionState.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2833/diff?src=pr&el=tree#diff-Z29iYmxpbi1ydW50aW1lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3J1bnRpbWUvYXBpL0pvYkV4ZWN1dGlvblN0YXRlLmphdmE=)
| `80.37% <0%> (+0.93%)` | `24% <0%> (ø)` | :arrow_down: |
|
[...e/gobblin/runtime/locks/ZookeeperBasedJobLock.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2833/diff?src=pr&el=tree#diff-Z29iYmxpbi1ydW50aW1lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3J1bnRpbWUvbG9ja3MvWm9va2VlcGVyQmFzZWRKb2JMb2NrLmphdmE=)
| `64.44% <0%> (+1.11%)` | `16% <0%> (+1%)` | :arrow_up: |
|
[.../org/apache/gobblin/metrics/RootMetricContext.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2833/diff?src=pr&el=tree#diff-Z29iYmxpbi1tZXRyaWNzLWxpYnMvZ29iYmxpbi1tZXRyaWNzLWJhc2Uvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dvYmJsaW4vbWV0cmljcy9Sb290TWV0cmljQ29udGV4dC5qYXZh)
| `79.68% <0%> (+1.56%)` | `16% <0%> (+1%)` | :arrow_up: |
|
[...lin/restli/throttling/ZookeeperLeaderElection.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2833/diff?src=pr&el=tree#diff-Z29iYmxpbi1yZXN0bGkvZ29iYmxpbi10aHJvdHRsaW5nLXNlcnZpY2UvZ29iYmxpbi10aHJvdHRsaW5nLXNlcnZpY2Utc2VydmVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3Jlc3RsaS90aHJvdHRsaW5nL1pvb2tlZXBlckxlYWRlckVsZWN0aW9uLmphdmE=)
| `72.22% <0%> (+2.22%)` | `13% <0%> (ø)` | :arrow_down: |
|
[...rter/avro/JsonRecordAvroSchemaToAvroConverter.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2833/diff?src=pr&el=tree#diff-Z29iYmxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL2NvbnZlcnRlci9hdnJvL0pzb25SZWNvcmRBdnJvU2NoZW1hVG9BdnJvQ29udmVydGVyLmphdmE=)
| `77.77% <0%> (+4.44%)` | `11% <0%> (ø)` | :arrow_down: |
|
[...lin/util/filesystem/FileSystemInstrumentation.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2833/diff?src=pr&el=tree#diff-Z29iYmxpbi11dGlsaXR5L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3V0aWwvZmlsZXN5c3RlbS9GaWxlU3lzdGVtSW5zdHJ1bWVudGF0aW9uLmphdmE=)
| `92.85% <0%> (+7.14%)` | `3% <0%> (ø)` | :arrow_down: |
------
[Continue to review full report at
Codecov](https://codecov.io/gh/apache/incubator-gobblin/pull/2833?src=pr&el=continue).
> **Legend** - [Click here to learn
more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by
[Codecov](https://codecov.io/gh/apache/incubator-gobblin/pull/2833?src=pr&el=footer).
Last update
[f3cf13d...c62ae78](https://codecov.io/gh/apache/incubator-gobblin/pull/2833?src=pr&el=lastupdated).
Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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: 350807)
Time Spent: 20m (was: 10m)
> JsonRecordAvroSchemaToAvroConverter does not reject unrecognized Enum symbols
> -----------------------------------------------------------------------------
>
> Key: GOBBLIN-987
> URL: https://issues.apache.org/jira/browse/GOBBLIN-987
> Project: Apache Gobblin
> Issue Type: Bug
> Reporter: Ahmed Abdul Hamid
> Priority: Major
> Attachments: invalid-enum-unit-test.patch
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Here is a failing unit test that demonstrates the issue we encounter when we
> attempt to encode the records produced by
> {{JsonRecordAvroSchemaToAvroConverter}} with unrecognized Enum symbols:
> [^invalid-enum-unit-test.patch]
> Here's how to apply the patch and run the test:
> {code:bash}
> $ git apply invalid-enum-unit-test.patch$
> $ ./gradlew :gobblin-core:test --tests *testEnumConversion* {code}
> Here's the output:
> {code:java}
> java.lang.NullPointerException: null of string in field fieldToIgnore of
> org.apache.gobblin.test.TestRecord
> at
> org.apache.avro.generic.GenericDatumWriter.npe(GenericDatumWriter.java:132)
> at
> org.apache.avro.generic.GenericDatumWriter.writeWithoutConversion(GenericDatumWriter.java:126)
> at
> org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:73)
> at
> org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:60)
> at
> org.apache.gobblin.converter.avro.JsonRecordAvroSchemaToAvroConverterTest.testEnumConversion(JsonRecordAvroSchemaToAvroConverterTest.java:82)
> {code}
> The root cause of the issue is that {{JsonRecordAvroSchemaToAvroConverter}}
> allows unrecognized Enum symbols not declared in the specified Avro schema.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)