-
Notifications
You must be signed in to change notification settings - Fork 49
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
Add target-diff #664
base: main
Are you sure you want to change the base?
Add target-diff #664
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not review the whole PR, just added some small flow.record
quality of life suggestions since the merge of fox-it/flow.record#115
Available in flow.record==3.15
.
131e6b5
to
aac31af
Compare
Thanks for your suggestions on the |
We understand this PR will take some time to review, but we do think it might be worthwhile to incorporate the changes to What we could do is move the Do you agree with this approach? |
I am working slowly through the backlog of long outstanding PRs but had not gotten to this yet. Your proposal of splitting it up sounds like a good idea though, it's always nice if we can split of large PRs into separate smaller ones. I won't complain either if you pick up some of the mentioned improvements along the way 😄. I've just merged #716 for your convenience so feel free to do with that as you please 😉. |
* `--hex` can be used to diff binary files in a readable way. * `--only-changed` can be used to omit unchanged records when comparing plugin outputs
7f1b27d
to
8a0c6af
Compare
Fix a test and update ls and completedefault to how target-shell does it.
I will check if someone from the dissect team can review this. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #664 +/- ##
==========================================
- Coverage 77.90% 77.73% -0.17%
==========================================
Files 324 325 +1
Lines 27852 28424 +572
==========================================
+ Hits 21697 22095 +398
- Misses 6155 6329 +174
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
Thanks for the review @cecinestpasunepipe, I've applied your suggestions in 0a522e9. |
@JSCU-CNI looks good to me, can you just fix the remaining tests? Apart from that, I have no further comments. I also want to add that we really appreciate this feature, nice work! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only fix the test please.
Thanks @cecinestpasunepipe! The tests should be fixed in c3266b9. |
LGTM, I have no further requests. |
The linked issue #795 was closed but the PR is still open. Did something go wrong there? |
What is the status of this PR? |
This PR adds the command
target-diff
, which can be used to compare two or more targets against one another:fs
mode outputs records denoting filesystem changes from one target to the other:Using
query
mode, you can compare plugin outputs from one target to the other:In
shell
mode, you can browse the target filesystems like intarget-shell
, where directory listings will show which files / directories have been changed, added or deleted. Using theplugin
command, plugin outputs can be compared from within the shell context.target-diff
depends on fox-it/flow.record#107. To allow tests to run for this PR we've temporarily bumped flow.record to3.15.dev10
inpyproject.toml
When three or more targets are provided, you can choose between treating every target as a 'delta' or compare every target against one 'absolute' target. Treating targets as 'deltas' is useful if you have multiple snapshots of the same target from different points in time. Treating targets as 'absolutes' can be useful in situations where you have a 'golden image' that you want to compare different targets against.
To keep code duplication low between
tools/diff.py
andtools/shell.py
, this PR adds a superclassExtendedCmd
toshell.py
that contains most of the functionality that is shared between the two. BothTargetCmd
andDifferentialCli
inherit from this class.