Remove opendal dependency from QEMU driver#535
Conversation
❌ Deploy Preview for jumpstarter-docs failed. Why did it fail? →
|
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Fixed the CI failures by adding The new The version requirement |
|
Added unit tests for The new tests in
This ensures the URL download logic is exercised in CI without needing to download a full Fedora image. |
|
Fixed the
The netlify deploy preview failure is unrelated to this PR's changes. |
|
Rebase the pr please. |
6c8eee9 to
bffbd65
Compare
|
Rebased onto main (d7a65e0). The branch now has a clean history on top of the latest main. |
|
Rebase complete. The branch |
|
Addressed @raballew's review feedback in Fixed in this commit:
Tracked for follow-up in #441:
|
0c2d55c to
69cbb0e
Compare
|
Addressed @raballew's latest review feedback in Fixed in this commit:
Deferred to #441 (follow-up):
|
Thanks, I will bring the topic up on today's meeting. |
Review Comment Summary & Fix PlanReviewed all outstanding comments from org members. Here is the plan: Changes to make in this PR:
Deferred to #441:
No change needed:
Additional issue:
Generated with Claude Code |
Review Comment Summary & Fix PlanReviewed all outstanding comments from org members. Here is the plan: Changes to make in this PR:
Deferred to #441:
No change needed:
Additional issue:
Generated with Claude Code |
da11134 to
177a915
Compare
|
Rebased onto latest main to resolve merge conflicts. The conflict was in All previously implemented review feedback (aclose propagation, compression warnings, stream tests, multi-target tests, dump local path test) is preserved in the rebased commits. |
|
Fixed a CI failure in Root cause: Fix:
Other CI failures are pre-existing (not caused by this PR):
Generated with Claude Code |
|
Fixed the Generated with Claude Code |
|
@ambient-code rebase onto main |
Move FlasherInterface to core jumpstarter package (jumpstarter.driver.flasher) and create a simplified FlasherClient (jumpstarter.client.flasher) that streams local files via resource_async and passes HTTP URLs as PresignedRequestResource for exporter-side download, eliminating the need for the opendal library. Update QEMU driver to import from the new core location and remove jumpstarter-driver-opendal from its dependencies. Update tests to use direct HTTP URLs instead of opendal Operator. Closes #441 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The new FlasherClient in jumpstarter/client/flasher.py imports click but it was not listed in the dependencies, causing import errors in tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Ensures the HTTP URL code path in FlasherClient is covered by tests, since the integration test only exercises this path when no cached image is available. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove unused `pathlib.Path` and `PresignedRequestResource` imports that were flagged by ruff (F401). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…l test - Remove module-level docstrings from flasher.py, driver/flasher.py, and flasher_test.py to match project conventions (per raballew review) - Fix _AsyncIteratorStream.aclose() to propagate close to wrapped async generator, ensuring file handles are cleaned up on error paths - Add test_dump_routes_local_path to cover dump routing for local file paths Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ssion warning - Add unit tests for _AsyncIteratorStream and _FileWriteObjectStream (receive/send/aclose lifecycle, error propagation, empty iterator) - Add tests for dict-based multi-target flash (happy path + ArgumentError) - Warn when compression parameter is used with HTTP URLs instead of silently ignoring it - Add tests for the compression warning behavior Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The client.py file was missed during the opendal removal: it still imported FlasherClient from jumpstarter_driver_opendal.client, which breaks type-check-python CI since jumpstarter-driver-opendal is no longer a dependency. Updated to import from jumpstarter.client and removed the unused operator parameter. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Separate the local-folder jumpstarter import from third-party jumpstarter_driver_* imports with a blank line, per ruff I001. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
c1d9f44 to
c359a91
Compare
|
Rebased onto latest main (33ad352). The branch now has a clean history with all 8 PR commits on top of the current main tip. No conflicts were encountered. Generated with Claude Code |
…QemuFlasherClient Address review feedback: add return type annotations and parameter types to FlasherInterface ABC methods, narrow _parse_path return type to a discriminated union, use Literal["rb", "wb"] for mode parameters in adapter functions, and add full type annotations to QemuFlasherClient.flash. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Review feedback responseAddressed the latest review comments from @raballew (7 comments posted 2026-05-28): Accepted and implemented (pushed in a7d0975):
Declined:
|
Addressing latest review feedbackThank you @raballew for the detailed review. Here is my plan to address the 7 comments from your latest review: Will fix in this PR:
Will not change (with rationale):
I'll push the fixes shortly. Generated with Claude Code |
| from __future__ import annotations | ||
|
|
||
| from abc import ABCMeta, abstractmethod | ||
| from typing import Any | ||
|
|
||
|
|
||
| class FlasherInterface(metaclass=ABCMeta): | ||
| @classmethod | ||
| def client(cls) -> str: | ||
| return "jumpstarter.client.flasher.FlasherClient" | ||
|
|
||
| @abstractmethod | ||
| def flash(self, source: Any, target: str | None = None) -> None: ... | ||
|
|
||
| @abstractmethod | ||
| def dump(self, target: Any, partition: str | None = None) -> None: ... |
There was a problem hiding this comment.
[MEDIUM] The FlasherInterface ABC is a new 16-line file with zero test coverage. There is no test verifying that client() returns the expected string "jumpstarter.client.flasher.FlasherClient", and no test confirming that instantiating a subclass without implementing the abstract methods raises TypeError.
Adding a small test for these two behaviors would close the coverage gap.
AI-generated, human reviewed
There was a problem hiding this comment.
This was discussed in the previous review round (comment r3316704543) where you acknowledged my pushback with "ack". The position remains the same: testing Python's ABCMeta enforcement and a single-line client() classmethod returning a string literal would be testing language guarantees rather than our code. The FlasherInterface ABC is exercised through the existing driver and client tests that subclass it.
…type - Add return type annotations to FlasherClientInterface.flash(), FlasherClientInterface.dump(), FlasherClientInterface.cli(), FlasherClient.flash(), FlasherClient.dump(), and FlasherClient._flash_single() - Narrow _AsyncIteratorStream.iterator from Any to AsyncGenerator[bytes, None] for better static analysis Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Review feedback responseAddressed the latest review comments from @raballew (6 comments in review 4381893748, posted 2026-05-29): Accepted and implemented (pushed in 357f37e):
Declined (with rationale):
Acknowledged for follow-up (#441):
Generated with Claude Code |
Summary
FlasherInterfaceABC to corejumpstarterpackage (jumpstarter.driver.flasher) — it's a pure abstract class with no opendal importsFlasherClientin core (jumpstarter.client.flasher) that handles local files viaresource_asyncand HTTP URLs viaPresignedRequestResource, without requiring the opendal libraryFlasherInterfacefromjumpstarter.driverinstead ofjumpstarter_driver_opendal.driverjumpstarter-driver-opendalfrom QEMU'spyproject.tomldependenciesopendal.OperatorBackward Compatibility
FlasherInterfaceis unchanged — drivers that depend on opendal (esp32, pi-pico, dutlink, sdwire) continue to work without modificationFlasherInterface.client()points tojumpstarter.client.flasher.FlasherClient(simplified, no opendal)FlasherInterface.client()continues pointing tojumpstarter_driver_opendal.client.FlasherClient(full opendal support)Test plan
test_driver_qemu) fails only due to missingqemu-imgbinary in CI environment (pre-existing)Related #441
🤖 Generated with Claude Code