-
Notifications
You must be signed in to change notification settings - Fork 33
Add support for all known instances in short URL format, removed dandi-staging and renamed EMBER* ones into EMBER-DANDI* #1750
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
Conversation
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
I vaguely recall we might have a listing of supported regexes dumped/hardcoded somewhere in docs. Please check and adjust if needed |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1750 +/- ##
=======================================
Coverage 75.02% 75.02%
=======================================
Files 84 84
Lines 11888 11889 +1
=======================================
+ Hits 8919 8920 +1
Misses 2969 2969
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
83173b1 to
3f49100
Compare
|
@copilot I submitted for rebase, when CI finishes up - please review failures and whether relate to the changes - and where they do - fix them. |
Found and updated
CI is still pending for this branch after the rebase. I ran the related tests locally ( Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot I think the test isn't happy yet |
yarikoptic
left a comment
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.
fix for testing failure
Fixed in commit df9b186. Updated Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
df9b186 to
fea7e03
Compare
|
damn
inviting @candleindark |
fea7e03 to
0d17005
Compare
candleindark
left a comment
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.
My understanding is that _dandi_url_parser.parse parses an id or identifier of a Dandiset, as defined in https://github.com/dandi/dandi-schema/blob/f6e5aa69e1c6b4d3bbd122edc75f4db89f8977c4/dandischema/models.py#L1666-L1679, into a DandisetURL object. Per the definition, both id and identifier start with the instance name defined in https://github.com/dandi/dandi-schema/blob/f6e5aa69e1c6b4d3bbd122edc75f4db89f8977c4/dandischema/conf.py#L112-L121. However, this PR assumes the names of the known instances are the keys of known_instances. This assumption is not true. In https://github.com/aplbrain/dandi-infrastructure/pull/47/files#diff-6ea1fa151ea6453c7c8ca98d07be3693b1435072a5bfd2cd82fd369b63c015cc, we established the two EMBER instances to be named "EMBER-DANDI" and "EMBER-DANDI-SANDBOX", respectively, and there is currently no instance named "dandi-staging" but one that is named "DANDI-SANDBOX" per https://github.com/dandi/dandi-infrastructure/pull/224/files#diff-6ea1fa151ea6453c7c8ca98d07be3693b1435072a5bfd2cd82fd369b63c015cc.
With the current definition of known_instances, this PR will bring confusion even if it works. My suggestion is to update/correct known_instances.
|
I have reread a few times but still failing to see a problem.
|
Co-authored-by: yarikoptic <[email protected]>
- Changed regex from generic `[-\w._]+` to pattern composed from known instance names - Prevents false matches like `http:000001` or other invalid patterns - Pattern is built dynamically: dandi|dandi-staging|dandi-sandbox|...|ember-sandbox - All existing tests pass, invalid patterns now correctly rejected Co-authored-by: yarikoptic <[email protected]>
…URL format Co-authored-by: yarikoptic <[email protected]>
Co-authored-by: yarikoptic <[email protected]>
3f1c199 to
01e4e48
Compare
… case, only capital So it would avoid confusion with dandi:// URL. Also fixing up tests for prior commit renames
7d46b40 to
ad3a3f0
Compare
ad3a3f0 to
c463d67
Compare
| " api: https://api-dandi.emberarchive.org/api\n" | ||
| " gui: https://dandi.emberarchive.org\n" | ||
| "ember-sandbox:\n" | ||
| "ember-dandi-sandbox:\n" |
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.
@dandi/ember would it be ok to change or they are in wide use and we should provide deprecation cycle?
We are just trying to match the names of the instances as in the INSTANCE_ID provided in infrastructure deployment and would be visible in their IDs on the instances (ATM they are still all DANDI:)
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.
@yarikoptic we don't foresee any issues. Lets go ahead with the changes.
candleindark
left a comment
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.
I think this is ready to go except the minor issue what you pointed out at #1750 (comment).
dandi/dandiarchive.pyto dynamically build the instance name pattern fromknown_instancesDANDI:<dandiset id>[/<version>]to<INSTANCE>:<dandiset id>[/<version>]docs/source/ref/urls.rstto reflect all known instances supporttest_helptext.pyto expect the new<INSTANCE>:format in help textOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Release notes
Added support for all known instances in short URL format (such as
DANDI-SANDBOX:123456orEMBER-DANDI:123456) matching the instance names known to the dandi CLI and library.BREAKING: Note that
INSTANCE:in above examples must be capital - lower casedandi:123456would no longer be supported. Also version will be treated case-sensitive so must bedraftnotDRAFT.Removed deprecated
dandi-staginginstance definition.Renamed
emberandember-sandboxintoember-dandiandember-dandi-sandboxcorrespondingly.