Skip to content

Remove two server-compatibility kludges which are no longer needed - #1969

Open
yarikoptic-gitmate wants to merge 1 commit into
masterfrom
claude/zealous-turing-ahafkn-cleanup
Open

yarikoptic-gitmate wants to merge 1 commit into
masterfrom
claude/zealous-turing-ahafkn-cleanup

Conversation

@yarikoptic-gitmate

@yarikoptic-gitmate yarikoptic-gitmate commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

This removes two candidates from the "removable now?" table in #1963.

Changes

  • get_instance() in dandi/utils.py: drop the check meant to say that the dandi-staging instance identifier was removed in favor of dandi-sandbox (made an error in 0.74.0, Add support for all known instances in short URL format, removed dandi-staging and renamed EMBER* ones into EMBER-DANDI* #1750).
    • It never ran for an identifier given as a string, because known_instances[dandi_id] raises KeyError: 'dandi-staging' first. That KeyError is what users already get, so nothing changes for them.
    • It could only run for a DandiInstance object named dandi-staging.
    • The rename (Rename dandiarchive staging => sandbox #1668) happened in August 2025.
  • _check_attempts_and_sleep() in dandi/download.py: stop retrying downloads on HTTP 400.
    • The retry was added in 2020 because Girder returned 400 (download: we need to retry #87), and Girder support was removed in 2021.
    • Each retry requests the same archive download URL again, so a 400 would not turn into a success.
    • Downloads still retry on RETRY_STATUSES (429, 500, 502, 503, 504) and on errors without a response.
    • A new test checks that 400, 403 and 404 are not retried.

The registry PR, #1970, also drops the allowed_schema_versions TODO about dandi/dandi-archive#2624, since it rewrites that block; it is left out here to avoid a conflict.

Testing

  • test_download.py -k check_attempts, test_utils.py and cli/tests/test_instances.py pass locally. The exception is test_server_info, which needs dandiarchive.org, and the sandbox this was prepared in cannot reach it.
  • pre-commit and mypy are clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_014sJtxzEPbSxycxetp4DquU

- get_instance(): drop the check meant to tell that the 'dandi-staging'
  instance identifier was removed (in 0.74.0, in favor of
  'dandi-sandbox').  It never ran for an identifier given as a string,
  since looking it up in known_instances raised KeyError first, and the
  rename is more than a year old.

- Downloads: stop retrying on HTTP 400.  It was added in 2020 for
  Girder (gh-87), whose support has since been removed; each retry
  requests the same archive download URL again, which would not turn a
  400 into a success.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014sJtxzEPbSxycxetp4DquU
@yarikoptic-gitmate yarikoptic-gitmate added the patch Increment the patch version when merged label Oct 28, 2026 — with Claude
@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.90%. Comparing base (e65abd3) to head (d63290c).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1969      +/-   ##
==========================================
+ Coverage   90.82%   90.90%   +0.08%     
==========================================
  Files          92       92              
  Lines       14190    14196       +6     
==========================================
+ Hits        12888    12905      +17     
+ Misses       1302     1291      -11     
Flag Coverage Δ
unittests 90.90% <100.00%> (+0.08%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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
Copy Markdown
Collaborator Author

test (ubuntu-latest, 3.11, nfs) failed in the step "Run all tests except those involving obolibrary" (job). Every other job in the run passed. That includes test (ubuntu-latest, 3.11, normal, default), which runs the same tests on the same OS and Python without NFS.

I couldn't read which test failed. The log tools available to me return only the last 5000 lines of the job, which are the Docker Compose dump from the next step.

I don't think this PR caused it:

  • The change is the same on any filesystem. The PR stops retrying downloads on HTTP 400 and drops a get_instance() branch that can never run. If that broke a test, the test should also fail without NFS.
  • The server log shows no failed downloads. In the part of the log that is visible (the last ~3.5 min of the test step), every /download/ request got a 302. The only two 400s were on upload endpoints (/api/uploads/initialize/, /api/zarr/), and those don't go through _check_attempts_and_sleep().
  • NFS mode has known flaky tests. test_dandi_file_zarr_with_excluded_dotfiles is marked flaky(reruns=10), and test_reextract_metadata is xfailed under NFS (test_reextract_metadata some times times out on NFS #1507).
  • master is green on the same base (e65abd3).

No fix exists to port, since the failing test isn't known. I'm re-running the failed job once. If it fails again, I'll treat it as real.


Generated by Claude Code

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants