Skip to content

v0.2.0

Choose a tag to compare

@jmt-lab jmt-lab released this 11 Jun 20:41
· 21 commits to main since this release

Other

  • (deps) migrate keyring v3 to v4
  • address review feedback for soundness, correctness, and API hygiene

Fixed (review-driven)

  • #1 Replaced all unsafe impl Send/Sync (RegistryClient, Registry, Decompress, Reader) with sound trait-bound types backed by Arc<dyn ... + Send + Sync> and Pin<Box<dyn AsyncRead + Send + Sync>>.
  • #2 Introduced Digest newtype (src/digest.rs) that validates algo:hex; replaced every digest unwrap() / strip_prefix("sha256:").unwrap() with Digest::parse(...)?.
  • #3 Token::parse and ECR base64 decoding now return typed InvalidAuth errors instead of panicking on malformed config.
  • #4 Replaced join_all with try_join_all in Image::to_tarball, Index::to_oci, and CLI copy/push so the first error aborts the operation.
  • #5/#19 Chunked-upload Location handling: start_blob_upload parses and resolves the upload URL; upload_part and finish_blob_upload PATCH/PUT against the URL returned by the previous response (preserving any pre-existing query string) instead of reformatting /v2/{repo}/blobs/uploads/{upload}.
  • #6 Removed all _progress API duplication: Layer::create, Layer::open, Image::filesystem, Image::to_tarball, and Index::to_oci now take Option<&dyn ProgressReporter> (or SharedProgress where spawning is required).
  • #7 Compression: lz4 now returns Error::Unsupported instead of misusing the LZMA decoder. Decompress::new is fallible; DockerImageRootfs(None) passes through uncompressed.
  • #8 Writer rewritten as an explicit state machine (Initial → Starting → Idle ↔ Uploading → Finishing → Done) with no wake_by_ref. Hash and offset advance only after the registry confirms each part. Done rejects further writes; poll_shutdown drains.
  • #9 Auth precedence enforced: .finch → .docker → keyring; loop breaks on the first hit and never overwrites a resolved token with None.
  • #10 Layer copy now advances by read_size, not chunk_size (was a real bug for size < MIN_CHUNK_SIZE); covered by copy_handles_short_reads test.
  • #11 Spawned JoinErrors now map to a typed Error::Join variant rather than being context-shifted into a generic error.
  • #12 Reader::poll_read ticks progress by after - before per poll instead of only at EOF.
  • #13 Reader validates streamed size and digest against expected values at EOF and returns LayerSizeMismatch / DigestMismatch.
  • #14 RegistryClient upload methods now take &self.
  • #15 Ctx exposes a single Arc-backed SharedProgress instead of leaking a MultiProgress; spawned tasks clone the Arc rather than relying on unsafe lifetime extension.