Skip to content

Reject failed reference uploads before registration - #682

Open
agocharbhatia wants to merge 1 commit into
openlayer-ai:mainfrom
agocharbhatia:fix-reference-upload-errors
Open

agocharbhatia wants to merge 1 commit into
openlayer-ai:mainfrom
agocharbhatia:fix-reference-upload-errors

Conversation

@agocharbhatia

Copy link
Copy Markdown

Pull Request

Summary

Reject a failed reference-dataset storage upload before registering its URI with the inference pipeline. Previously, upload_reference_dataframe ignored the upload response and attempted registration even after an HTTP error.

Changes

  • Apply the same non-2xx check already used by batch uploads.
  • Add local regressions for rejected uploads, successful registration and transport errors across the four storage backends. The tests retain the real file uploader and generated API client, with external HTTP requests mocked.

Context

The reference helper should only register a URI after the archive has uploaded successfully. This fixes that client-side ordering; it does not change the shared uploader or generated API.

Testing

  • Unit tests: the same focused cases give 8 failures and 32 passes on the current base, and 40 passes with this patch.
  • Other: full Ruff check and strict Pyright on the new test file pass.
  • Postman CI/CD

Run the regressions with python -m pytest -o addopts= tests/test_data_uploads.py. They use synthetic data and reject live network connections.

Full Pyright and Mypy have unchanged diagnostics on the base and patch in my local environment. The pinned development install could not resolve backports-asyncio-runner==1.2.0 on Python 3.13, so I am not claiming a clean full type-check run. No live Openlayer or object-store tests were run.

This branch has not been deployed

No deployments
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.

1 participant