-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
task: Support the zip/gzip format in tracker exporter endpoints [ DHIS2-16165 ] #15994
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #15994 +/- ##
============================================
+ Coverage 66.40% 66.45% +0.04%
- Complexity 31551 31567 +16
============================================
Files 3506 3508 +2
Lines 130529 130664 +135
Branches 15227 15243 +16
============================================
+ Hits 86678 86830 +152
+ Misses 36778 36764 -14
+ Partials 7073 7070 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 100 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me!
But I think we also need to support the same compression for csv format.
You can see in the old tracker that this is possible and in the Import/Export app it is supported to export compressed events in csv format
Ok @enricocolasante, I've missed that. Actually, there is already the gzip support for csv. We can start from that and complete the job then |
...isp/dhis/webapi/controller/tracker/export/trackedentity/TrackedEntitiesExportController.java
Fixed
Show fixed
Hide fixed
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
https://dhis2.atlassian.net/browse/DHIS2-16165
Apply the same logic as in the old tracker events endpoint we can find in AbstractRootNodeMessageConverter.
Two new GET mapping are created in
tracker/events
applying to:Also, we harmonize the CSV compression for
EventsExportController
andTrackedEntititesExportController
with the same logic.Using the same logic as the old tracker, the Rest invocation will accept the
attachment
parameter, defaulting toevent.json.zip
orevent.json.gzip
if missing.This also introduces the
EventExportTestConfiguration
, which can be used to mock configuration beans. This way, we don't need to invoke the service, also because the event query uses Postgres functions and doesn't work with the h2 database. Overall, the MVC tests should test only the web layer and not the services. We can still invoke the real method when applicable or fake a response if we want to.