Skip to content

Point failed uploads to validation report - #1896

Merged
yarikoptic merged 8 commits into
dandi:masterfrom
AtomicGlance:agent/point-upload-validation-report
Aug 10, 2026
Merged

Point failed uploads to validation report#1896
yarikoptic merged 8 commits into
dandi:masterfrom
AtomicGlance:agent/point-upload-validation-report

Conversation

@AtomicGlance

Copy link
Copy Markdown
Contributor

Summary

  • point failed uploads to the saved validation report with a ready-to-run dandi validate --load command
  • handle validation failures as normal CLI errors, including when development options are enabled
  • cover the report guidance and no-traceback behavior with regression tests

Closes #1859.

Testing

  • python -m pytest dandi/cli/tests/test_cmd_upload.py -q
  • Black, isort, flake8, and codespell on the changed files
  • python -m mypy dandi (93 source files)
  • full CLI suite: 118 passed, 8 skipped, 1 xpassed; 7 environment-dependent failures on Windows from a missing Deno executable and unavailable symlink privileges

@AtomicGlance
AtomicGlance marked this pull request as ready for review August 5, 2026 09:56

@yarikoptic yarikoptic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

overall looks good. minor nit due to my duplication allergies.

Comment thread dandi/upload.py Outdated
@yarikoptic yarikoptic added UX patch Increment the patch version when merged labels Aug 6, 2026
@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.11%. Comparing base (e982b3b) to head (f1f37ed).

Files with missing lines Patch % Lines
dandi/exceptions.py 0.00% 2 Missing ⚠️
dandi/upload.py 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1896      +/-   ##
==========================================
+ Coverage   77.06%   77.11%   +0.04%     
==========================================
  Files          88       89       +1     
  Lines       13065    13089      +24     
==========================================
+ Hits        10068    10093      +25     
+ Misses       2997     2996       -1     
Flag Coverage Δ
unittests 77.11% <90.00%> (+0.04%) ⬆️

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.

@AtomicGlance
AtomicGlance requested a review from yarikoptic August 7, 2026 09:19
@AtomicGlance

Copy link
Copy Markdown
Contributor Author

I merged the current master into this branch and pushed the update. The validation warning now builds one message and points to the saved report with dandi validate --load.\n\nThe focused CLI regression test passes (1 passed). The upload integration test is skipped on this Windows runner because Docker is not installed. Please take another look when you have a chance.

@yarikoptic

Copy link
Copy Markdown
Member

@AtomicGlance are those \n\n side effects of some suboptimal agent channeling of messages into github? ;) asking since "mine" do not do that, but I also try to explicitly acknowledge use of agents.

@yarikoptic

Copy link
Copy Markdown
Member

seems failing tests relate to these changes.. review/address

dandi/tests/test_upload.py:225: in test_upload_bids_invalid
    assert (
E   assert 'Use `dandi validate --load /tmp/pytest-of-runner/pytest-0/test_upload_bids_invalid0/upload_validation.jsonl` to review the saved results.' in ...

@AtomicGlance

Copy link
Copy Markdown
Contributor Author

Yes, I used Codex to help with this. The literal \n\n came from how I passed the comment body through the CLI, and I should have checked the rendered result :)))

I traced the Ubuntu failure to the test helper forcing devel_debug=True, which raises before the user-facing summary warning is logged. I pushed a fix so this test exercises the normal upload path instead. CI is rerunning now.

@AtomicGlance

Copy link
Copy Markdown
Contributor Author

One more update: I tightened the CLI regression test so it explicitly disables the general map_to_click_exceptions mapping. It now exercises the DANDI_DEVEL=1 behavior from #1859 instead of passing through the normal fallback.

Local checks:

  • focused CLI regression: 1 passed
  • CLI suite: 120 passed, 8 skipped, 1 xpassed; three Windows symlink failures and two GitHub/network fixture errors were unrelated
  • Black, isort, flake8, and codespell: passed on the changed files
  • mypy dandi: passed

The current Actions runs are waiting for maintainer approval (action_required with zero jobs), so the Docker-backed upload test and Codecov report cannot refresh until those workflows run. The earlier inline duplication thread is resolved. When convenient, could you approve the runs and re-review?

@yarikoptic

Copy link
Copy Markdown
Member

Thank you @AtomicGlance

@yarikoptic
yarikoptic merged commit c2957de into dandi:master Aug 10, 2026
38 checks passed
@AtomicGlance

Copy link
Copy Markdown
Contributor Author

Thank you @AtomicGlance

Loved working on this, thanks for the opportunity. Slava Ukraini❤️

@yarikoptic

Copy link
Copy Markdown
Member

Героям Слава!

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 UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

upload should point to the validation log file

2 participants