Closed snackk closed 2 weeks ago
Attention: Patch coverage is 77.77778%
with 2 lines
in your changes missing coverage. Please review.
Project coverage is 58.78%. Comparing base (
6703b9d
) to head (e8f49a5
).
Files | Patch % | Lines |
---|---|---|
...ownloader/destination/local/LocalFileAcceptor.java | 0.00% | 1 Missing :warning: |
...here/downloader/stream/StreamWithMD5Decorator.java | 87.50% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Alternative to -> https://github.com/DiceTechnology/dice-where/pull/112
WHAT
Fix dice-where and update dce-id to use the newest dice-where version.
We call .md5() twice on the same StreamWithMD5Decorator object. This causes the second invocation to return the incorrect hash.
First call is newly added to the LocalFileAcceptor and S3FileAcceptor classes
Second call is already existing in S3Source.produce()
This causes dice-where to download a file successfully, but not return the correct DownloadExecutionResult when it’s finished processing. The error is triggered in the ID test DiceWhereDownloaderScheduleJobTest .
WHY
Recently dice-where was updated to add extra md5 checks prevent faulty downloads. We need to update id to use the newest version.
Sadly the above change also introduced a bug for services using dice-where as a library. This also needs to be fixed so that we can use the updated version in id.
AC
Dice-where is fixed so it no longer calls md5() twice on the same object.
dce-id testDiceWhereDownloaderScheduleJobTest passes with the updated version of dice-where
Updated dce-id can be deployed and successfully pulls in files from dce-shared.
Fix context
Override was necessary to keep the digest updated as the InputStream is being ingested in batches rather than in one sitting.