Skip to content
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

Allow diffing of two OCI artifacts #3839

Open
hiddeco opened this issue May 2, 2023 · 8 comments · May be fixed by #4138 or #4916
Open

Allow diffing of two OCI artifacts #3839

hiddeco opened this issue May 2, 2023 · 8 comments · May be fixed by #4138 or #4916
Assignees
Labels
area/oci OCI related issues and pull requests enhancement New feature or request help wanted Extra attention is needed

Comments

@hiddeco
Copy link
Member

hiddeco commented May 2, 2023

To help people to gather an idea about the difference between two artifacts, we could introduce a flux diff artifact <URL1> <URL2> command which provides a (Git like) diff of the differences within the compressed tar+gzip layers of the Artifact images.

To build this functionality, we need to decide on the diff library that should be used. Theoretically, we could piggy back on the diff utility library from go-git in combination with DiffPrettyText. However, there are discussions at present to replace this due to certain issues.

An additional thing to take into account is that full decompression of <URL1> and/or <URL2> to disk may not be required, but that we rather iterate over the contents using tar#NewReader in combination with reading the file contents from the current tar#Header using io.Copy(out, reader).

@hiddeco hiddeco added enhancement New feature or request area/oci OCI related issues and pull requests labels May 2, 2023
@stefanprodan stefanprodan added the help wanted Extra attention is needed label May 2, 2023
@sbdtu5498
Copy link

/assign

@makkes
Copy link
Member

makkes commented Jun 6, 2023

@sbdtu5498 we don't have automation for assignments in place here. The issue is assigned to @somtochiama so if you'd like to work on it it'd be best to discuss next steps with her. I'd also encourage you to join the next regular meeting.

@sbdtu5498
Copy link

sbdtu5498 commented Jun 6, 2023

Sure, @somtochiama if you aren't working on it, I can pick it up. Thanks for the invitation @makkes! I will make sure to do that.

@somtochiama
Copy link
Member

somtochiama commented Jun 6, 2023

@sbdtu5498 You can have a go at it.

Something to note is that there is an existing diff artifact command that checks if there's a diff between a remote OCI URL and a local directory (it doesn't show a diff, just says if there have been any changes).

So diff artifact command should be updated to show the actual diff between either another URL or a local directory.

@sbdtu5498
Copy link

@somtochiama thanks a lot for the information. I will keep that in mind.

@somtochiama somtochiama assigned sbdtu5498 and unassigned somtochiama Jun 7, 2023
@somtochiama
Copy link
Member

Hey @sbdtu5498 ,
are you still working on this?

@sbdtu5498
Copy link

@somtochiama sorry for the delays. I was a bit busy. I need to do testing and add the test cases as well so it is still a WIP. I have left some comments in PR let me know on that as well.

@calerogers
Copy link

Hello I just wanted to see if there is any more movement on this? I’d be interested to see this functionality added.

cc @sbdtu5498

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/oci OCI related issues and pull requests enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
6 participants