checkpointctl icon indicating copy to clipboard operation
checkpointctl copied to clipboard

Display network information of checkpoints created with Podman

Open deveshgoyal1000 opened this issue 7 months ago • 8 comments
trafficstars

This PR implements support for displaying network information (IP and MAC addresses) from Podman container checkpoints, addressing issue.

Currently, checkpointctl shows IP address information for checkpoints created with CRI-O but not with Podman. For Podman checkpoints, this information is stored in network.status in JSON format.

Implementation:

  • Added network.status file parsing functionality
  • Added IP and MAC address display to checkpoint show output
  • Added test coverage for network information parsing

Testing Results: Before (Original Output) and After (With Network Information output)

Screenshot (1191)

Screenshot (1195)

The implementation successfully displays:

  • Container's IP address
  • MAC address
  • Maintains existing checkpoint information

Fixes #132

deveshgoyal1000 avatar Apr 05 '25 01:04 deveshgoyal1000

Test Results

61 tests  ±0   61 ✅ ±0   2s ⏱️ ±0s  1 suites ±0    0 💤 ±0   1 files   ±0    0 ❌ ±0 

Results for commit 7669ce5a. ± Comparison against base commit 2eec4336.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Apr 05 '25 14:04 github-actions[bot]

Please have a look at the CI failures and try to fix them.

Also, please rebase and remove the merge commit.

adrianreber avatar Apr 05 '25 14:04 adrianreber

You should also remove the dependabot commit from your PR.

adrianreber avatar Apr 05 '25 14:04 adrianreber

@deveshgoyal1000 Thank you for working on this! In addition to Adrian's comments, it would be great if you can add more detailed commit messages. The following contributor guide provides more information: https://github.com/checkpoint-restore/criu/blob/criu-dev/CONTRIBUTING.md#describe-your-changes

rst0git avatar Apr 05 '25 14:04 rst0git

Thanks for the feedback! I’ll start working on the suggested updates.

deveshgoyal1000 avatar Apr 05 '25 22:04 deveshgoyal1000

Codecov Report

Attention: Patch coverage is 74.02597% with 20 lines in your changes missing coverage. Please review.

Project coverage is 71.41%. Comparing base (88acd95) to head (7669ce5). Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
internal/podman_network.go 43.75% 9 Missing :warning:
internal/container.go 88.23% 5 Missing and 1 partial :warning:
internal/oci_image_build.go 0.00% 5 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #162      +/-   ##
==========================================
- Coverage   71.43%   71.41%   -0.02%     
==========================================
  Files          13       14       +1     
  Lines        1565     1599      +34     
==========================================
+ Hits         1118     1142      +24     
- Misses        373      384      +11     
+ Partials       74       73       -1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov-commenter avatar Apr 06 '25 15:04 codecov-commenter

Oh also, it looks like you need to format the files correctly

snprajwal avatar Apr 07 '25 10:04 snprajwal

Yes, I’m working on it. Thanks for the detailed review and suggestions

deveshgoyal1000 avatar Apr 07 '25 23:04 deveshgoyal1000