med9110 opened a new pull request, #113:
URL: https://github.com/apache/solr-orbit/pull/113

   ### Description
   
   Previously, `SolrProvisioner.download()` wrote directly to the final cache 
path. If a download was interrupted, it could leave a partial `.tgz` file that 
subsequent runs would incorrectly treat as a valid cached archive.
   
   This change prevents incomplete downloads from being cached by:
   
   - Downloading archives to temporary files in the cache directory and 
atomically publishing them with `os.replace()` only after successful retrieval.
   - Cleaning up temporary files when downloads fail or are interrupted.
   - Preserving mirror fallback behavior for download failures while allowing 
local filesystem errors to propagate.
   
   ### Issues Resolved
   
   Fixes #104
   
   ### Testing
   
   - [x] New functionality includes testing
   
   Added five regression tests covering:
   
   - Interrupted downloads do not leave partial cached archives.
   - Successful downloads are cached and reused.
   - Mirror fallback works after a partial download failure.
   - Exhausting all mirrors raises `SolrProvisionerError` without leaving 
incomplete files.
   - Publication failures propagate correctly and clean up temporary files.
   
   **Validation:**
   - `uv run pytest tests/ -q` — 1,145 passed, 5 skipped.
   - `uv run ruff check .` — All checks passed.
   - `git diff --check` — No whitespace errors.
   
   ---
   
   By submitting this pull request, I confirm that my contribution is made 
under the terms of the Apache 2.0 license.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to