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

Merged
merged 5 commits into from
Mar 3, 2025

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

Verified

This commit was signed with the committer’s verified signature. The key has expired.
dustymabe Dusty Mabe
Since python has propoer boolean types we should be using that here.
@dustymabe dustymabe force-pushed the dusty-cmd-diff branch 2 times, most recently from 6b0a237 to 1af3949 Compare February 26, 2025 21:36
@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)

Verified

This commit was signed with the committer’s verified signature. The key has expired.
dustymabe Dusty Mabe
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.

Verified

This commit was signed with the committer’s verified signature. The key has expired.
dustymabe Dusty Mabe
```
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).
```

Verified

This commit was signed with the committer’s verified signature. The key has expired.
dustymabe Dusty Mabe
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.

Verified

This commit was signed with the committer’s verified signature. The key has expired.
dustymabe Dusty Mabe
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
```
@dustymabe dustymabe enabled auto-merge (rebase) February 28, 2025 19:07
@dustymabe dustymabe merged commit 512db92 into coreos:main Mar 3, 2025
5 checks passed
@dustymabe dustymabe deleted the dusty-cmd-diff branch March 3, 2025 14:03
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.

None yet

3 participants