Skip to content

Add support for VDI changes#1531

Merged
Schamper merged 4 commits intomainfrom
support-new-vdi
Feb 18, 2026
Merged

Add support for VDI changes#1531
Schamper merged 4 commits intomainfrom
support-new-vdi

Conversation

@Schamper
Copy link
Member

@Schamper Schamper commented Feb 6, 2026

self.vdi = vdi.VDI(f)
self.vdi = vdi.VDI(fh)

self._stream = self.vdi.open()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the lifecycle of the stream coincide in vdi in this usecase, and perhaps in most of the usecases, an alternative design would be to let VDI implement stream methods in terms of an internal VDISttream, and provide a factory method to get a fresh VDIStream,

self.vdi = vdi.VDI(f)
self.vdi = vdi.VDI(fh)

self._stream = self.vdi.open()
Copy link
Contributor

@twiggler twiggler Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API suggests a symmetry between vdi.open() and vdi.close() that doesn't actually exist. In reality, the code operates on different levels of abstraction.

The VDI acts as a manager that you shut down using vdi.close() (Level 1).
However, it also acts as a factory to generate results (streams) via vdi.open() (Level 2).

One option would be to rename vdi.open() to vdi.get_stream() or vdi.create_stream().

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of these things can be ironed out once we can seriously get into making #100 happen. Currently changes around this are mostly around having the ability to create separate streams from container formats within their implementation. Any changes in dissect.target are currently just bandaid to work with that new API.

@codecov
Copy link

codecov bot commented Feb 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.97%. Comparing base (c9212e7) to head (0ba05e7).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1531      +/-   ##
==========================================
+ Coverage   80.70%   80.97%   +0.26%     
==========================================
  Files         400      400              
  Lines       34969    34968       -1     
==========================================
+ Hits        28223    28316      +93     
+ Misses       6746     6652      -94     
Flag Coverage Δ
unittests 80.97% <100.00%> (+0.26%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 18, 2026

Merging this PR will not alter performance

✅ 12 untouched benchmarks
⏩ 1 skipped benchmark1


Comparing support-new-vdi (0ba05e7) with main (3580960)

Open in CodSpeed

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports.

@Schamper Schamper merged commit 78584db into main Feb 18, 2026
17 of 22 checks passed
@Schamper Schamper deleted the support-new-vdi branch February 18, 2026 16:54
Matthijsy pushed a commit to Matthijsy/dissect.target that referenced this pull request Mar 2, 2026
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.

3 participants