feat: add package checksum tracking and re-extraction logic#193
feat: add package checksum tracking and re-extraction logic#193OliverTrautvetter merged 9 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds package checksum tracking and automatic re-extraction logic to enable downloading and installing new builds of the same version/branch without manually cleaning up the oms-workdir first.
Changes:
- Implements checksum tracking using sidecar
.md5files alongside downloaded packages and marker files within extracted directories - Adds automatic re-extraction logic when package checksums change, enabling seamless updates to new builds of the same version
- Maintains backward compatibility by gracefully handling cases where checksum files don't exist
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| internal/installer/package.go | Adds checksum comparison functions and modifies Extract() to automatically re-extract when package checksums change |
| internal/installer/package_test.go | Adds comprehensive test coverage for checksum tracking scenarios including checksum changes, missing markers, and backward compatibility |
| cli/cmd/download_package.go | Saves MD5 checksums to sidecar files after successful package download and verification |
| cli/cmd/download_package_test.go | Adds test to verify MD5 checksum sidecar file creation during package download |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
NautiluX
left a comment
There was a problem hiding this comment.
Thanks for the PR, the whole file handling is a bit complicated and the extraction relies on the md5sum file being there, which means a user who deletes the md5sum file may run into problems (although users can always shoot themselves in the foot, of course).
See my comment, also happy to discuss in sync :)
NautiluX
left a comment
There was a problem hiding this comment.
I think you need to adjust it in the bootstrapping as well, I guess that part is missing tests? Probably we can abstract the package filename generation into a common function.
oms/internal/bootstrap/gcp/gcp.go
Line 1387 in 4db7095
Signed-off-by: OliverTrautvetter <66372584+OliverTrautvetter@users.noreply.github.com>
Add the ability to download/install new builds of the same branch without cleaning up the oms-workdir first.
Clickup