-
Notifications
You must be signed in to change notification settings - Fork 28
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
ENH: list localhost:8085 as the web UI for dandi-api-local-docker-tests #1003
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1003 +/- ##
==========================================
- Coverage 88.53% 88.47% -0.06%
==========================================
Files 73 74 +1
Lines 9295 9309 +14
==========================================
+ Hits 8229 8236 +7
- Misses 1066 1073 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
938c6ba
to
3d84714
Compare
Troubleshooting dandi-archive locally and needed to download a new dandiset from it. But it was not working because of $> dandi -l DEBUG download -f debug http://localhost:8085/dandiset/000002 2022-05-05 16:46:10,698 [ DEBUG] Starting new HTTPS connection (1): rig.mit.edu:443 2022-05-05 16:46:10,961 [ DEBUG] https://rig.mit.edu:443 "GET /et/projects/dandi/dandi-cli HTTP/1.1" 200 579 2022-05-05 16:46:10,962 [ DEBUG] Running a newer version (0.39.5+4.gcca19df4.dirty) of dandi/dandi-cli than available (0.39.5) 2022-05-05 16:46:11,143 [ DEBUG] Creating converter from 7 to 5 2022-05-05 16:46:11,143 [ DEBUG] Creating converter from 5 to 7 2022-05-05 16:46:11,143 [ DEBUG] Creating converter from 7 to 5 2022-05-05 16:46:11,143 [ DEBUG] Creating converter from 5 to 7 2022-05-05 16:46:12,556 [ DEBUG] Parsing url http://localhost:8085/dandiset/000002 2022-05-05 16:46:12,611 [ DEBUG] Parsed into DandisetURL(api_url=AnyHttpUrl('http://localhost:8085', scheme='http', host='localhost', host_type='int_domain', port='8085'), dandiset_id='000002', version_id=None) 2022-05-05 16:46:12,613 [ DEBUG] Initializing mode with given value of None 2022-05-05 16:46:12,614 [ DEBUG] Setting write mode to 'update' 2022-05-05 16:46:12,614 [ DEBUG] Setting width to stream width: 213 2022-05-05 16:46:12,617 [ DEBUG] GET http://localhost:8085/dandisets/000002/ 2022-05-05 16:46:12,622 [ DEBUG] Starting new HTTP connection (1): localhost:8085 2022-05-05 16:46:12,637 [ DEBUG] http://localhost:8085 "GET /dandisets/000002/ HTTP/1.1" 404 156 2022-05-05 16:46:12,638 [ DEBUG] Response: 404 2022-05-05 16:46:12,638 [ ERROR] Error 404 while sending GET request to http://localhost:8085/dandisets/000002/: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Error</title> </head> <body> <pre>Cannot GET /dandisets/000002/</pre> </body> </html> 2022-05-05 16:46:12,638 [ DEBUG] Caught exception No such Dandiset: '000002' 2022-05-05 16:46:12,638 [ INFO] Logs saved in /home/yoh/.cache/dandi-cli/log/20220505204610Z-120654.log Error: No such Dandiset: '000002' There might be a better fix, since in general we know that our archive is one page app, and thus requesting such urls directly would lead to such 404s, so we should act accordingly. But meanwhile I have decided to just announce availability of such an instance of an archive which is started locally from dandi-archive repo. That seems to resolve the issue and allows to download (and hopefully to upload, which will be tried shortly).
Per @jwodder comment and thus to avoid ambiguity in reverse mapping
3d84714
to
3d42e50
Compare
3d42e50
to
58ec075
Compare
@jwodder - how to figure out why docker-compose stopped working in this PR? see e.g.
i.e could we see stderr? |
@yarikoptic I believed I identified & reported the issue in dandi/dandi-archive#1230. |
58ec075
to
4a56d1c
Compare
hm, windows failed with
I will just restart it... |
@pytest.mark.skipif( | ||
bool(known_instances["dandi-api-local-docker-tests"].gui), | ||
reason="this instance now has GUI URL", | ||
) |
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.
If you change the URL in the test to http://localhost:8085/#/dandiset/123456/draft
, the test will pass and there won't be a need for the skipif
.
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.
;-) that is what I pretty much did first but then looked at the name of the test : test_download_api_instance_in_dandiset
. And then (copy pasted?) test above differing only in name test_download_gui_instance_in_dandiset
and url to point to GUI. So, it is that test above which already checks for that code path and this one was intended to check that we would resolve to api instance if there is no GUI url. As such, there is no need for two identical tests, and I decided to skip it while keeping for future happen we kill gui there again or smth like that
Troubleshooting dandi-archive locally and needed to download a new
dandiset from it. But it was not working because of
There might be a better fix, since in general we know that our archive is one
page app, and thus requesting such urls directly would lead to such 404s, so we
should act accordingly. But meanwhile I have decided to just announce
availability of such an instance of an archive which is started locally from
dandi-archive repo. That seems to resolve the issue and allows to download
(and hopefully to upload, which will be tried shortly).