Conversation
The null pointers finally bit me, so they are now fixed. Signed-off-by: Jim Fitzpatrick <jimfity@gmail.com>
Do a refactor that adds the basic set up for a diff command. Signed-off-by: Jim Fitzpatrick <jimfity@gmail.com>
The logging configuration has being refactor to allow setting the --log-level at any point in a command call. Signed-off-by: Jim Fitzpatrick <jimfity@gmail.com>
Signed-off-by: Jim Fitzpatrick <jimfity@gmail.com>
Signed-off-by: Jim Fitzpatrick <jimfity@gmail.com>
Signed-off-by: Jim Fitzpatrick <jimfity@gmail.com>
This is the first attempt at the diff function. It currently only supports printing to tty. Signed-off-by: Jim Fitzpatrick <jimfity@gmail.com>
Signed-off-by: Jim Fitzpatrick <jimfity@gmail.com>
In the adding of the exclude flag to the diff command, the exclude function on the get command was also improved. Signed-off-by: Jim Fitzpatrick <jimfity@gmail.com>
A number of comments added in the pre-review process. Signed-off-by: Jim Fitzpatrick <jimfity@gmail.com>
Boomatang
marked this pull request as ready for review
June 27, 2026 01:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #31
Summary
diffsubcommand that compares two labeled snapshots stored in a SQLite database and categorises resources as added, updated, or removed between labelsgetanddiff)log.zig), argument definitions (args.zig), and exclude matching (utils.zig)--excludeflag to use case-insensitive full-string matching against both CRD resource name and resolved Kind namekindandapiVersionfields, and properly quotesresourceVersionresourceVersionis absentAcceptance Criteria
The issue asks for the ability to compare database results when two labels are passed, showing resources that are in one label but not the other, and printing the table of added or removed resources.
diffsubcommand accepts two positionalLABELarguments and a--databaseflag, querying the SQLite database for differences between the two snapshots.added_sqlanddeleted_sqlqueries usingNOT EXISTSsubqueries to find resources present in one label but missing from the other.resourceVersionorgeneration) and supports JSON output via--output=json.Test Plan
diffwith a database containing two labels and verify added, updated, and removed resources appear in the correct sectionsdiff --output=jsonand verify the JSON blob containsadded,updated, anddeletedarraysdiffwith--excludeand verify case-insensitive Kind filtering worksgetsubcommand and verify existing functionality is unchangedzig build testto confirm unit tests pass (table width and exclude matching)--helpoutput at the top level showsgetanddiffsubcommandsdiff --helpshows diff-specific flags