Skip to content

umoci stat: add config and manifest info#624

Merged
cyphar merged 7 commits into
opencontainers:mainfrom
cyphar:umoci-stat-upgrade
Sep 18, 2025
Merged

umoci stat: add config and manifest info#624
cyphar merged 7 commits into
opencontainers:mainfrom
cyphar:umoci-stat-upgrade

Conversation

@cyphar

@cyphar cyphar commented Sep 17, 2025

Copy link
Copy Markdown
Member

This is needed for #601's tests.

Signed-off-by: Aleksa Sarai cyphar@cyphar.com

@codecov-commenter

codecov-commenter commented Sep 17, 2025

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 41.50198% with 148 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.29%. Comparing base (e0662ee) to head (f11b243).
⚠️ Report is 64 commits behind head on main.

Files with missing lines Patch % Lines
utils.go 39.49% 96 Missing and 48 partials ⚠️
oci/casext/blob.go 73.33% 3 Missing and 1 partial ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #624      +/-   ##
==========================================
- Coverage   73.68%   72.29%   -1.39%     
==========================================
  Files          69       69              
  Lines        5556     5808     +252     
==========================================
+ Hits         4094     4199     +105     
- Misses       1074     1172      +98     
- Partials      388      437      +49     
Files with missing lines Coverage Δ
oci/casext/blob.go 69.04% <73.33%> (-2.83%) ⬇️
utils.go 47.81% <39.49%> (-14.07%) ⬇️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cyphar
cyphar force-pushed the umoci-stat-upgrade branch 4 times, most recently from 3dbde7a to 50d00d2 Compare September 18, 2025 07:07
We have to read the whole blob into memory anyway and some users might
want to use the raw blob data rather than our re-parsed version (i.e.,
there may be JSON fields that get ignored when we parse them).

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
These tests only care about history entries, and if we add more output
to umoci-stat (as we do in the next patches in this series) they will
break.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Previously if someone added "\n" to one of the fields we printed it
would screw up the table output, possibly confusing users. A much more
preferable setup is to output %q-formatted strings, but only if
formatting was necessary.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Most users probably want access to this information and previously there
was no easy way of getting it from umoci.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
This information is arguably a bit too "internal" but given that tools
like [1] exist now, maybe just providing this information anyway could
be useful. (Our tests would benefit from being able to pull out the
digests of the configs and layers directly.)

[1]: https://oci.dag.dev/

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
@cyphar
cyphar merged commit 5173ba9 into opencontainers:main Sep 18, 2025
20 checks passed
@cyphar
cyphar deleted the umoci-stat-upgrade branch September 19, 2025 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants