This repository was archived by the owner on Dec 18, 2025. It is now read-only.
Repository navigation
What's New
Skip tarball transfer when remote already has matching hash
Optimizes deployments by comparing SHA256 hashes before transferring large tarballs:
- Hash computation: After saving a tarball, computes and stores SHA256 hash in
dist/*.tar.gz.sha256 - Remote check: Before transfer, checks if remote
/tmp/already has a tarball with matching hash via SSH - Smart skip: Skips tarball transfer if hashes match (template and env files still transferred)
- Validation: Validates hash format (64 hex chars) and handles SSH failures gracefully
- Cleanup: Hash files are cleaned up alongside old tarballs
Test suite
Added pytest test suite with 12 tests covering the hash comparison feature.
Files Changed
src/deploy_kit/docker.py- Hash computation and storagesrc/deploy_kit/backends/compose.py- Remote hash check logicsrc/deploy_kit/scripts/ssh_check_hash.sh- New script for remote hash retrievalsrc/deploy_kit/scripts/ssh_transfer.sh- Conditional tarball transfersrc/deploy_kit/scripts/__init__.py- Addedrun_script_capture()helpertests/test_hash_transfer.py- New test suite