You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 27, 2024. It is now read-only.
I've noticed container-diff inconsistently handles the diff operation between apt and pip analyzers. Example below:
$ container-diff diff --json --type pip --type apt daemon://<image> daemon://ubuntu:xenial-20180417 >package_diff.json
...
Extracting container diff to logs/package_diff.json
time="2019-01-04T11:06:29Z" level=error msg="Could not get size for smproteus-1.0: strconv.ParseInt: parsing \"3.0 kB\": invalid syntax"
time="2019-01-04T11:06:29Z" level=error msg="Could not get size for smpipeline: strconv.ParseInt: parsing \"13 kB\": invalid syntax"
time="2019-01-04T11:06:29Z" level=error msg="Could not find Python package PyYAML for corresponding metadata info"
time="2019-01-04T11:06:30Z" level=error msg="Could not find Python package PyYAML for corresponding metadata info"
...
$ grep -iC3 smpipeline package_diff.json
"Size": 9064448
},
{
"Name": "smpipeline",
"Version": "2.4.20",
"Size": -1024
},
The two packages (smproteus-1.0, smpipeline) are proprietary debs which are listed in the diff (with Size: -1024) , PyYAML is a pypi package and is not listed in the report.
IMO, it would be much more graceful to report the PIP package no matter what, just skipping the size (or reporting it as an obviously wrong value, e.g.
@weakcamel thanks for the issue, and sorry for the late reply!
I did some investigating today and it looks like there are a few improvements that need to be made here to fix this issue. I found the underlying cause of your issue and addressed it here, but I agree that container-diff should be a bit more graceful with its results when errors are encountered, or at the very least should be consistent. I'll work on a fix for that as well.
I'll keep you posted when all the fixes are merged, so I can get a release out and have you try and make sure everything is good :)
I've noticed container-diff inconsistently handles the diff operation between
apt
andpip
analyzers. Example below:The two packages (smproteus-1.0, smpipeline) are proprietary debs which are listed in the diff (with
Size: -1024
) , PyYAML is a pypi package and is not listed in the report.The corresponding line is:
container-diff/differs/pip_diff.go
Line 105 in 616e266
Expected behavior
IMO, it would be much more graceful to report the PIP package no matter what, just skipping the size (or reporting it as an obviously wrong value, e.g.
or
Actual behavior
The pip package where container-diff couldn't deduce the size is missing entirely from the diff:
Information
Steps to reproduce the behavior
The text was updated successfully, but these errors were encountered: