Do not assume Linux OCI images (can be useful for FreeBSD, etc.)
I wanted to unpack a FreeBSD OCI image and had to remove the PlatformOS check first. Would it be OK to drop it altogether?
:warning: Please install the to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 74.07%. Comparing base (a058839) to head (4d06d32).
:warning: Report is 28 commits behind head on main.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@ Coverage Diff @@
## main #645 +/- ##
==========================================
+ Coverage 72.89% 74.07% +1.18%
==========================================
Files 71 71
Lines 6164 4633 -1531
==========================================
- Hits 4493 3432 -1061
+ Misses 1213 748 -465
+ Partials 458 453 -5
| Files with missing lines | Coverage Δ | |
|---|---|---|
| oci/config/convert/runtime.go | 77.55% <ø> (+5.24%) |
:arrow_up: |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
You can't just remove the check because that code generates an OCI runtime-spec config.json and it currently can only generate Linux-specific ones. We just merged FreeBSD support into the spec, so if you'd like FreeBSD support I would suggest the following course of action:
- Split the logic into per-OS files with
//go:build. - Add code to generate FreeBSD
config.jsons. - Figure out how to run the CI tests on FreeBSD, and fix any issues that come up.
I see. Thanks for the explanation. I only needed to unpack an image at this point. Can't say if I'll find time to work on this properly, so feel free to close the PR.
If you just want to unpack an image, umoci raw unpack should work -- though this won't work with umoci repack. Maybe we need a flag for umoci unpack to disable generating a config.json...
Thank you for the tip. Haven't realized there's another version of the unpack command. That should work for me.