Skip to content

Conversation

@Zawadidone
Copy link
Contributor

get_data_path can return None in case the directory is not configured.

https://docs.docker.com/engine/daemon/#daemon-data-directory

Zawadi Done added 3 commits May 8, 2025 15:56
@JSCU-CNI
Copy link
Contributor

JSCU-CNI commented May 8, 2025

@Zawadidone
Copy link
Contributor Author

I stumbled on this while working on #1139.

The PR does not solve the issue because the default Docker daemon data directory (/var/lib/docker - https://github.com/fox-it/dissect.target/pull/1138/files#diff-592a62677741e44ccba1c0c8d78ad11118bb5cb1bb09f209d6b227ddd4975603R339-R344) that exists is not returned by the function find_installs: https://github.com/fox-it/dissect.target/pull/1096/files#diff-592a62677741e44ccba1c0c8d78ad11118bb5cb1bb09f209d6b227ddd4975603R330-R354. It is not required to configure the data directory in the daemon configuration therefore the two default values for Linux and Windows need to be checked.

@Schamper
Copy link
Member

I stumbled on this while working on #1139.

The PR does not solve the issue because the default Docker daemon data directory (/var/lib/docker - https://github.com/fox-it/dissect.target/pull/1138/files#diff-592a62677741e44ccba1c0c8d78ad11118bb5cb1bb09f209d6b227ddd4975603R339-R344) that exists is not returned by the function find_installs: https://github.com/fox-it/dissect.target/pull/1096/files#diff-592a62677741e44ccba1c0c8d78ad11118bb5cb1bb09f209d6b227ddd4975603R330-R354. It is not required to configure the data directory in the daemon configuration therefore the two default values for Linux and Windows need to be checked.

Doesn't line 330-337 in #1096 from JSCU do exactly that? Except that this PR has a value for Windows too (and comments, nice).

I personally fail to see how #1096 fails to address this, can you be more explicit in why it doesn't? It looks like almost the exact same code as this PR, except with some error logging.

I would like to see this PR be a combination of this and that portion of #1096. So keep the Windows directory and comments near the paths, have the body of find_installs from #1096, and the unit test from this PR.

@Zawadidone
Copy link
Contributor Author

Okay a misunderstanding from my side, I used to wrong version of the code because my uv environment was bricked.

@Zawadidone Zawadidone requested a review from Schamper May 12, 2025 14:48
@codecov
Copy link

codecov bot commented May 12, 2025

Codecov Report

Attention: Patch coverage is 87.50000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 77.90%. Comparing base (dbf97a0) to head (4711a1c).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
dissect/target/plugins/apps/container/docker.py 87.50% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1138   +/-   ##
=======================================
  Coverage   77.90%   77.90%           
=======================================
  Files         358      358           
  Lines       32622    32632   +10     
=======================================
+ Hits        25413    25421    +8     
- Misses       7209     7211    +2     
Flag Coverage Δ
unittests 77.90% <87.50%> (+<0.01%) ⬆️

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 May 12, 2025

CodSpeed Performance Report

Merging #1138 will not alter performance

Comparing Zawadidone:fix/docker_robustness (4711a1c) with main (dbf97a0)

Summary

✅ 3 untouched benchmarks

@Schamper
Copy link
Member

@JSCU-CNI unless I'm overlooking something I think this is pretty much the same as that particular piece of code in your PR. I propose to merge this one first (since it's a lot smaller) and then you can simply rebase your PR. I'll get to that soon, you know how it is 😉.

@Schamper Schamper merged commit c352ce2 into fox-it:main May 12, 2025
22 of 25 checks passed
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