bosh-agent icon indicating copy to clipboard operation
bosh-agent copied to clipboard

Add compression detection for BOSH release compilation

Open mdzhigarov opened this issue 3 months ago • 1 comments

Summary

This PR adds compression detection for BOSH release compilation

Changes

  • Updated bosh-utils dependency to latest version that removes the -z flag during tar extraction
  • Updated Compressor interface calls to pass CompressorOptions parameter as required by the new interface
  • Fixed tar decompression commands to use -xf instead of -xzf for better compatibility
  • Updated agent code in concrete_compiler.go and logs_tar_provider.go to use the new interface
  • Modify compiler to preserve original compression format during compilation
  • Update releasetarball compilation to detect and preserve tarball compression format
  • Implement compression detection in concrete_compiler to preserve original package compression state
  • Update release tarball compilation to detect and preserve compression format
  • Maintain backward compatibility with existing compressed packages

This ensures that compiled packages maintain the same compression format as their source packages, improving compatibility and reducing unnecessary recompression.

Testing

  • All existing functionality is preserved
  • Tar extraction now works reliably across different environments
  • Compression still works as expected with the -z flag when appropriate
  • Tested with both compressed and non-compressed tars on the latest jammy stemcell by running bosh-agent compile ...

mdzhigarov avatar Sep 23 '25 07:09 mdzhigarov

This PR probably also needs to align with package spec based approach: https://github.com/cloudfoundry/bosh-cli/pull/696#issuecomment-3437670344

rkoster avatar Oct 30 '25 15:10 rkoster

Thank you @mdzhigarov for this contribution!

beyhan avatar Nov 27 '25 15:11 beyhan