Skip to content

Conversation

@yarikoptic
Copy link
Member

@yarikoptic yarikoptic commented Nov 21, 2025

We have it confusing, as the identifier in the client model is just the numeric part. We should have called it differently from the metadata model identifier.

That original code which added those divergences though seemed tried to make meditor possible:

Without this fix, we get confusing

❯ dandi upload -i dandi-sandbox
2025-11-21 14:52:43,287 [    INFO] Logs saved in /home/yoh/.local/state/dandi-cli/log/2025.11.21-19.52.42Z-110471.log
Error: Dandiset identifier DANDI-SANDBOX:217838 does not follow expected convention '^[0-9]{6}$'.

which accents such divergence of definition of "identifier". If we just remove stripping away the prefix, then upload stalls while retrying and getting 500s from the server (nothing in dandi-cli logs was useful to point to the issue).

TODOs:

  • figure out why it was not failing before on our original tests against client?

@codecov
Copy link

codecov bot commented Nov 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.05%. Comparing base (45c679a) to head (176eac0).
⚠️ Report is 37 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1751      +/-   ##
==========================================
- Coverage   75.05%   75.05%   -0.01%     
==========================================
  Files          84       84              
  Lines       11874    11873       -1     
==========================================
- Hits         8912     8911       -1     
  Misses       2962     2962              
Flag Coverage Δ
unittests 75.05% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes identifier extraction to handle prefixed dandiset identifiers (e.g., "DANDI-SANDBOX:217838") by generalizing the prefix-stripping logic to remove any prefix before the last colon, rather than only stripping the "DANDI:" prefix.

Key Changes:

  • Replaced startswith("DANDI:") check with split(":")[-1] to extract the numeric identifier from any prefixed format
  • Updated comments to reflect the uncertainty about the original PR #348 and mark the code for future refactoring

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@candleindark
Copy link
Member

@yarikoptic To get the CI tests to pass, we need to first merge #1744.

…et identifier

We have it confusing, as the identifier in the client model is just the
numeric part. We should have called it differently from the metadata model identifier
@yarikoptic
Copy link
Member Author

merged, and marked mystery resolved as IIRC we figured it out on Friday as it was not the identifier within dandiset.yaml as was retrieved from non-vendored back then instance.

Copy link
Member

@candleindark candleindark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a small change. Otherwise, it is approved.

Co-authored-by: Isaac To <candleindark@users.noreply.github.com>
@yarikoptic
Copy link
Member Author

@candleindark you would need to reapprove for it to become mergeable... feel welcome to click merge as well, not yet sure if worth releasing right away, may be more would come up?

@candleindark candleindark merged commit fa3ce1e into master Nov 24, 2025
42 checks passed
@candleindark candleindark deleted the rf-DANDI-prefix branch November 24, 2025 21:28
@github-project-automation github-project-automation bot moved this from In Progress to Done in Multi-DANDI instance support Nov 24, 2025
@github-actions
Copy link

🚀 PR was released in 0.74.0 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch Increment the patch version when merged released

Projects

Development

Successfully merging this pull request may close these issues.

3 participants