Closed valyo closed 1 year ago
Merging #1472 (9f67d66) into dev (f32c284) will increase coverage by
0.85%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## dev #1472 +/- ##
==========================================
+ Coverage 90.32% 91.17% +0.85%
==========================================
Files 29 29
Lines 4484 4542 +58
==========================================
+ Hits 4050 4141 +91
+ Misses 434 401 -33
Files | Coverage Δ | |
---|---|---|
dds_web/api/__init__.py | 100.00% <100.00%> (ø) |
|
dds_web/api/files.py | 83.75% <100.00%> (+0.47%) |
:arrow_up: |
dds_web/commands.py | 85.62% <100.00%> (+5.35%) |
:arrow_up: |
dds_web/utils.py | 94.65% <100.00%> (+2.04%) |
:arrow_up: |
The last test in test_utils.py is commented out since I couldn't make it produce the "File not found in S3" error. Suggestion are welcome! We could probably skip this test but I am curious how to make it work.
Update branch and set it has ready for review :)
Read this before submitting the PR
If there is a field which you are unsure about, enter the edit mode of this description or go to the PR template; There are invisible comments providing descriptions which may be of help.
1. Description / Summary
On data upload, it can happen that some files uploaded to S3 are not added to the DB (due to failed API request or DB lock). In such cases, DDS CLI creates a log file containing the failed files, which is supposed to be passed to the
update-uploaded-file
flask command for adding the files in the DB. This change creates an endpoint for updating the failed files upon a request from DDS CLI.Tested manually in the following way:
data_putter.py
,def put
, line 376 (in the try-except block), I added:data_putter.py
,def add_file_db
, line 431 (in the try-except block), I added:dds data put -p [project] -s tests
--overwrite
--overwrite
2. Jira task / GitHub issue
DDS-1529
3. Type of change
What type of change(s) does the PR contain?
Check the relevant boxes below. For an explanation of the different sections, enter edit mode of this PR description template.
4. Additional information
master
branch: _If checked, read the release instructions5. Actions / Scans
Check the boxes when the specified checks have passed.
For information on what the different checks do and how to fix it if they're failing, enter edit mode of this description or go to the PR template.