Repository navigation
perf: compute artifact checksums in the publishing CLI - #6
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Publishing currently makes the Worker reread every artifact from R2 and compute four hashes, consuming CPU proportional to artifact size. Compute all four hashes in the Go proxy's existing spooling pass and submit them with each upload instead. Completion checks stored size and multipart completeness without reading the artifact body; generated Maven metadata is still hashed by the Worker.
Artifact hashes are publisher-provided declarations. Single-part uploads retain R2 SHA-256 validation; multipart hashes are not independently verified. Retry declarations must keep their size and all hashes, and existing immutable release objects are never replaced by an identical declared retry. Clients and the Worker must be upgraded together; older pending publications must be restarted.
Validation:
just readypassed (26 Worker tests, Go race tests, formatting, lint, type checks, and builds). Worker tests and type checking passed again after simplifying metadata hashing. Tests cover all four CLI digests, checksum serving, generated metadata hashes, invalid declarations, retry conflicts, stored-size mismatch, and multipart completion without body reads. Free-tier deployment still requires workload validation and removal of the paid CPU setting.Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.