Skip to content

ref: remove the fallback to uploading resources via CKAN - #126

Merged
paulmueller merged 1 commit into
DCOR-dev:mainfrom
paulmueller-agent:remove-legacy-upload
Nov 5, 2026
Merged

paulmueller merged 1 commit into
DCOR-dev:mainfrom
paulmueller-agent:remove-legacy-upload

Conversation

@paulmueller-agent

Copy link
Copy Markdown
Contributor

resource_add fell back to uploading resources via CKAN (resource_add_upload_legacy_indirect_ckan) when a server did not offer direct S3 uploads. All DCOR servers upload to S3, and DCOR-dev/ckanext-dcor_schemas#44 rejects uploads via CKAN, because such resources would never reach S3 since ckanext-dcor_depot 1.1.0.

Changes

  • Remove resource_add_upload_legacy_indirect_ckan and the fallback in resource_add. If a server does not offer S3 uploads, NoS3UploadAvailableError now propagates and the upload job goes into the error state with that message.
  • resource_add still returns (srv_time, etag); srv_time is now always 0 (documented).
  • Remove the requests_toolbelt dependency (only used for the legacy upload): pyproject.toml, the "Software" dialog, the PyInstaller hook.
  • CHANGELOG: ref and setup entries under 1.2.0.

Testing
ruff and flake8 pass. tests/test_api_dataset.py, tests/test_upload_job.py, and tests/test_cli_upload_task.py pass locally against DCOR-dev (36 passed). CI cannot run the tests for fork PRs.

🤖 Generated with Claude Code

DCOR only accepts uploads to S3 (DCOR-dev/ckanext-dcor_schemas#44).
This also removes the requests_toolbelt dependency, which was only
used for the legacy upload.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@paulmueller
paulmueller merged commit 45bf2a1 into DCOR-dev:main Nov 5, 2026
3 checks passed
@codecov

codecov Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.99%. Comparing base (8bca8f9) to head (577cd6a).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #126      +/-   ##
==========================================
+ Coverage   72.67%   72.99%   +0.32%     
==========================================
  Files          72       72              
  Lines        6063     6029      -34     
==========================================
- Hits         4406     4401       -5     
+ Misses       1657     1628      -29     

☔ 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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants