Skip to content
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

Exporting batch jobs does not create a file with no entries anymore #3310

Merged
merged 1 commit into from
Jun 18, 2021

Conversation

MDeLuise
Copy link
Contributor

This PR fix the following issue: in the Web UI the "Export to CSV" feature present in the Batch Jobs section create a CSV file with empty entries.
In addition to this, it was optimised the close method of the JobTargetExporterCsv class.

Description of the solution adopted

  • It's removed the osw.close() call present in the init method of the JobTargetExporterCsv class. That call closed the OutputStreamWriter before using it (causing the bug).
  • The close of the OutputStreamWriter object is done when the JobTargetExporterCsv close is called.
  • Since the writer.close() internally call writer.flush() the latter call is unnecessary, so it's removed from the close method of JobTargetExporterCsv.

@codecov
Copy link

codecov bot commented May 13, 2021

Codecov Report

Merging #3310 (0583688) into develop (80954ba) will decrease coverage by 9.40%.
The diff coverage is n/a.

❗ Current head 0583688 differs from pull request most recent head 05f6d3c. Consider uploading reports for the commit 05f6d3c to get more accurate results
Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #3310      +/-   ##
=============================================
- Coverage      55.30%   45.90%   -9.41%     
+ Complexity       868      776      -92     
=============================================
  Files           1516     1516              
  Lines          30463    30463              
  Branches        2528     2528              
=============================================
- Hits           16847    13983    -2864     
- Misses         12687    15725    +3038     
+ Partials         929      755     -174     
Impacted Files Coverage Δ
...pse/kapua/kura/simulator/GatewayConfiguration.java 0.00% <0.00%> (-100.00%) ⬇️
...lipse/kapua/service/tag/internal/TagQueryImpl.java 0.00% <0.00%> (-100.00%) ⬇️
...a/kura/simulator/birth/BirthCertificateModule.java 0.00% <0.00%> (-100.00%) ⬇️
.../job/engine/exception/JobMissingStepException.java 0.00% <0.00%> (-100.00%) ⬇️
.../kapua/service/tag/internal/TagListResultImpl.java 0.00% <0.00%> (-100.00%) ⬇️
...ervice/account/internal/AccountListResultImpl.java 0.00% <0.00%> (-100.00%) ⬇️
...rvice/account/internal/KapuaAccountErrorCodes.java 0.00% <0.00%> (-100.00%) ⬇️
...rvice/endpoint/internal/EndpointInfoQueryImpl.java 0.00% <0.00%> (-100.00%) ⬇️
...scheduler/exception/SchedulerServiceException.java 0.00% <0.00%> (-100.00%) ⬇️
...cheduler/exception/SchedulerServiceErrorCodes.java 0.00% <0.00%> (-100.00%) ⬇️
... and 188 more

@MDeLuise MDeLuise marked this pull request as ready for review May 17, 2021 07:47
@Coduz Coduz added the Bug This is a bug or an unexpected behaviour. Fix it! label May 17, 2021
@MDeLuise MDeLuise force-pushed the fix-emptyListOfJobsExported branch from 5b1f4ae to 06eff6e Compare June 17, 2021 12:49
@MDeLuise MDeLuise force-pushed the fix-emptyListOfJobsExported branch from 06eff6e to 05f6d3c Compare June 18, 2021 09:33
@Coduz Coduz merged commit 6c1913c into eclipse:develop Jun 18, 2021
@MDeLuise MDeLuise deleted the fix-emptyListOfJobsExported branch June 18, 2021 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug or an unexpected behaviour. Fix it!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants