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

cmd-diff: support lightweight ostree import for RPM diff #4030

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

dustymabe
Copy link
Member

@dustymabe dustymabe commented Feb 26, 2025

Being able to diff two builds is now a very lightweight:

cosa buildfetch --build=A
cosa buildfetch --build=B
cosa diff --rpms --from=A --to=B

Previously this was hundreds of MiB and now it's in the KiB range.

EDIT: Added another commit:

cmd-diff: support showing source-control diffs for two builds

Useful for trying to determine the changes that occured for two builds
that were outside of RPM changes. Example:

$ cosa diff --source-control --from=42.20240919.91.0 --to=42.20240920.91.0
https://github.com/coreos/fedora-coreos-config: 80f646d..051fb67
    --> https://github.com/coreos/fedora-coreos-config/compare/80f646d...051fb67
https://github.com/coreos/coreos-assembler.git: d3302e0..d3302e0
    --> https://github.com/coreos/coreos-assembler/compare/d3302e0...d3302e0

Since python has propoer boolean types we should be using that here.
Being able to diff two builds is now a very lightweight:

```
cosa buildfetch --build=A
cosa buildfetch --build=B
cosa diff --rpms --from=A --to=B
```

Previously this was hundreds of MiB and now it's in the KiB range.
```
DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for
removal in a future version. Use timezone-aware objects to represent datetimes
in UTC: datetime.datetime.now(datetime.UTC).
```
I think it's of limited use that we arbitrarily hit some threshold
and then are urged to write more tests by a percentage metric here.
Let's just drop it.
@dustymabe
Copy link
Member Author

If you want to see these commands in action you can check out the few comments starting at containers/podman#25121 (comment)

Useful for trying to determine the changes that occured for two builds
that were outside of RPM changes. Example:

```
$ cosa diff --source-control --from=42.20240919.91.0 --to=42.20240920.91.0
https://github.com/coreos/fedora-coreos-config: 80f646d..051fb67
    --> coreos/fedora-coreos-config@80f646d...051fb67
https://github.com/coreos/coreos-assembler.git: d3302e0..d3302e0
    --> coreos/coreos-assembler@d3302e0...d3302e0
```
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.

1 participant