New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not alter json in docker save #6461
Conversation
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
ping @vbatts what about this ? |
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Do you know of a good way to test this? Maybe validate the json structure by parsing? |
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
@crosbymichael test added, look at commit 614c57c it's much more readable. |
As for a way to unit test it, that may be a little more tricky.
Close, but they aren't the same. I'm thinking that there be a be a interface in image.Image like https://github.com/vbatts/docker/compare/vbatts-gh6385 |
LGTM |
@crosbymichael but the json is still not the same. It should just do a copy of the file from the image graph. |
@vbatts the only change is the create/mod/access time of the json file, not the content. So I don't see the issue. |
@vieux I can test this PR again, but #6461 (comment) has the output of the json on disk and the one from |
@vbatts can you provide me a failing test ? |
@vieux i will work on getting a test. Your test's look good, but there are other use-cases in the life of an image to account for, and not affecting the layer's TarSum calculation (for the docker client or registry) |
@vieux here is a branch that uses this branch of yours, and expressly does a raw json for |
Fix #6455
Fix #6340
Close #6385