-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: fix explorer API for handling subpaths in S3 #792
Conversation
@@ -204,9 +204,11 @@ def __init__(self, app_config: AppConfig): | |||
methods=["GET"], | |||
) | |||
self.app.add_url_rule( | |||
f"/{url_dataroot}/<path:dataset>.cxg/", | |||
f"/{url_dataroot}/{CELLGUIDE_CXG_KEY_NAME}/<path:dataset>.cxg/", |
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.
This explicitly ensures that we only capture URLs that for this rule that are prefixed by "cellguide-cxgs/". path:dataset was interacting poorly with string:dataset because one subsumes the other.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #792 +/- ##
=======================================
Coverage 77.73% 77.74%
=======================================
Files 88 88
Lines 6792 6802 +10
=======================================
+ Hits 5280 5288 +8
- Misses 1512 1514 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
f816a88
to
1e85c9b
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.
Linted and added task_launch_type: ec2 which is now required for latest happy versions
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.
This regex was updated to assume a one-character dataroot, which is the point at which it starts scanning for subpaths leading up to /api
. This is required because otherwise it's impossible to exclude the /cellxgene/ api prefex from a regex that can dynamically get an arbitrary number of subpaths.
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.
lgtm
Fixed some bugs that were only visible when testing on a deployed environment. This has been tested with (way too many) pirated deployments to
dev
and all is working.