New AntTP v0.17.5 released with lots of internal changes and refactors.
The biggest external change is the deprecation of the public archive (upload) status endpoint in favour of using the command queue status instead.
The code to upload a new public archive is now much simpler and happens instantly from a user perspective. I’ll be pushing a new version of IMIM which embraces these changes too (it should be backwards compatible in the interim).
- Refactors file_service, file_controller and archive_helper to move HttpResponses to the controller layer and introduce internal errors in the service layer.
- Separates out response header definitions into header_builder to avoid duplication.
- file controller refactors to share HttpResponse building code between archives and raw files.
- Refactors to reduce the spread of direct URL/request tests deeper in the code, by making better use of ResolvedAddress. Also reduces the number of arguments/dependencies.
- Change archive_info.state to be a simpler is_modified boolean, as only 2 states.
- Simplified archive_info.action matches/actions to reduce amount of code/duplication.
- Further reductions in log duplication/noise.
- Refactors and minor fixes to simplify route resolution for archive files.
- Combined checking is_modified header into resolver to simplify and allow early exit when not modified.
- Simplified dependencies and moved more file service HTTP responses to file controller.
- Minor rename of command functions to align with Rust standards.
- Minor refactors and performance tweaks to reduce cloning.
- Moves a cache key prefixes to constants to avoid bad re-use/typos
- Changes tarchive size default from u64::MAX to 0, to better reflect an error condition and avoid overflows.
- File service refactors to re-use content length / range functions. These are boundary sensitive, so better to minimise duplication.
- Updates test URLs
- Simplifies XorName type usage and etag checking
- Simplifies resolver and header builder to reduce dependencies an superfluous code.
- Minor simplifications, logging improvements, clean up.
- Various simplifications to logging to use ? operator with From trait.
- Moves errors to their own module and simplifies handling further, by decoupling error handling from core logic.
- Reduces potential panics on bad serialization/deserialization.
- Refactors service/controller error handling for inserts/updates to remove all HTTP errors from the service layer, improve error messages and simplify handling.
- Improves error handling when attempting to upload mutable data without an app private key set (which is needed to derive keys).
- Removes ‘cost’ from REST payload, now that uploads are fully asynchronous.
- Removes upload state/status for public archives, as background commands have superseded the functionality.
- Updates header builder to correctly allow text/markdown to be returned for MD/markdown files.
- Refactors and error handling improvements.
- Updates roadmap
Github: Release v0.17.5 · traktion/AntTP · GitHub
Dockerhub: https://hub.docker.com/r/traktion/anttp
Cargo: cargo install anttp
Edit: You may still need to cargo install anttp --locked if it fails to build.