-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add files api #360
Add files api #360
Conversation
bad25c0
to
a35d564
Compare
fe07924
to
7d77fb5
Compare
7d77fb5
to
1e5dc53
Compare
a0b1942
to
2df3761
Compare
A short Readme.md file needs to be created
|
In |
Yes, name it |
See be12ee5 |
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.
Really nice! Tested it manually (without using the integration test) and it works great! Also tested with another user and the result is an empty json array, which feels correct. Not sure if we would like to add a message such as Updated the review after Alex's findingno files found
or something, but that's just an extra thing I guess
I made a test with two files. I uploaded the first one:
and the [
{
"inboxPath": "test_dummy.org/test_file_demo.c4gh",
"fileStatus": "uploaded",
"createAt": "2023-11-17T14:07:48.825563Z"
}
] Then, I uploaded another file:
Then
but the [
{
"inboxPath": "test_dummy.org/asd/testtest.c4gh/test_file_demo.c4gh",
"fileStatus": "uploaded",
"createAt": "2023-11-17T14:11:47.143238Z"
}
] We sat down with @dbampalikis and tested a correction to the |
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.
Really nice, apart for the comment about the database.
Also tested with another user and the result is an empty json array, which feels correct. Not sure if we would like to add a message such as no files found or something, but that's just an extra thing.
Finally, maybe we should have tests for multiple files?
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #360 +/- ##
=======================================
Coverage ? 60.89%
=======================================
Files ? 19
Lines ? 3445
Branches ? 0
=======================================
Hits ? 2098
Misses ? 1207
Partials ? 140
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Thanks @aaperis and @dbampalikis , really good that you spotted this 🙈 🙏 ! I commited your fix along with a test case for this, see dd0e91f. |
5129946
to
daf9168
Compare
(force pushed to rebase on main) |
Co-authored-by: Joakim Bygdell <[email protected]>
Co-authored-by: Dimitris Bampalikis <[email protected]>
Co-authored-by: Dimitris Bampalikis <[email protected]>
Co-authored-by: Pontus Freyhult <[email protected]>
Co-authored-by: Pontus Freyhult <[email protected]>
This reverts commit ca3185e.
4f8255d
to
61b4cb1
Compare
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.
Nice!
Looks good. I have some thoughts about the TLS-configuration but I think I'll make an issue for general overhaul at some point instead. |
This PR closes #435. It is based on neicnordic/sda-pipeline#540
api
from reposda-pipeline
intosda
files
to the API service for retrieving information about the files a user has submitteduserauth
fromcmd
tointernal
, for reuse inapi
api
code to use the common codeTesting:
When running the containers from sda-s3-integration.yml, this should work:
If the integration tests (
docker compose -f ~/NBIS/sloth/sensitive-data-archive/.github/integration/sda-s3-integration.yml run integration_test
) are run, the curl response should be[{"inboxPath":"requester_demo.org/data/file1.c4gh","fileStatus":"uploaded","createAt":"2023-11-13T10:12:43.144242Z"}]
Updates of the status of the user's file in the psql db should be reflected in the output of the call, so that only the last event is shown.
fixes #444
fixes #436