Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.

ridesx: improve error for ridesx flashing#790

Merged
bkhizgiy merged 1 commit intojumpstarter-dev:mainfrom
bennyz:ridesx-error
Jan 1, 2026
Merged

ridesx: improve error for ridesx flashing#790
bkhizgiy merged 1 commit intojumpstarter-dev:mainfrom
bennyz:ridesx-error

Conversation

@bennyz
Copy link
Member

@bennyz bennyz commented Dec 31, 2025

Error will now look like:

ValueError: This driver requires a target partition.
Usage: j storage flash --target <partition>:<file>
Example: j storage flash -t boot_a:aboot.img -t system_a:rootfs.simg -t system_b:qm_var.simg

Summary by CodeRabbit

  • Documentation

    • Updated RideSX flash examples to use "target" instead of "partition" for single-partition and compressed-image usage.
  • Refactor

    • Flash API parameter renamed to "target"; string-path flashes now require an explicit target and give clearer usage guidance when omitted. Multi-path behavior is unchanged.

✏️ Tip: You can customize this high-level summary in your review settings.

@netlify
Copy link

netlify bot commented Dec 31, 2025

Deploy Preview for jumpstarter-docs ready!

Name Link
🔨 Latest commit d893c14
🔍 Latest deploy log https://app.netlify.com/projects/jumpstarter-docs/deploys/695676018e64420008dd60ed
😎 Deploy Preview https://deploy-preview-790--jumpstarter-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 31, 2025

📝 Walkthrough

Walkthrough

The RideSXClient.flash API was updated: the partition parameter was renamed to target, README examples were adjusted, and non-dict path handling now requires target or raises a usage error.

Changes

Cohort / File(s) Summary
API Parameter Rename
packages/jumpstarter-driver-ridesx/jumpstarter_driver_ridesx/client.py
flash() signature changed: partitiontarget. Non-dict path branch now requires a non-null target, constructs partitions from {target: path}, maps operator accordingly, and raises a multi-line usage error if target is missing.
Documentation Updates
packages/jumpstarter-driver-ridesx/README.md
Usage examples updated from partition="boot" to target="boot" for single-partition and compressed-image flash examples.

Sequence Diagram(s)

(omitted — changes are a parameter rename and local control-flow adjustment, not a multi-component interaction)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • jumpstarter-dev/jumpstarter#511: Adjusts RideSXClient.flash API (partition → target) and initial implementation — directly related.
  • jumpstarter-dev/jumpstarter#536: Renames the RideSX flash parameter from partition to target and updates client handling — strongly related.

Suggested reviewers

  • raballew
  • mangelajo

Poem

🐰 I hopped through code to make the call more right,
Swapped partition for target in the soft moonlight.
A gentle nudge, a clearer way to flash,
I twitched my whiskers and avoided a clash.
🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: improving the error message for ridesx flashing when target partition is required.
✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@bennyz bennyz requested a review from bkhizgiy December 31, 2025 12:15
Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/jumpstarter-driver-ridesx/README.md (1)

101-129: Consider documenting the required target parameter and improved error messaging.

According to the PR objective and AI summary, the API now requires a target parameter for non-dict path handling, with improved error messaging when it's missing. While the examples show correct usage, the documentation doesn't explain:

  1. Why target is required for single-partition flashing
  2. What error message users will see if they omit it (the PR improvement)
  3. How dict-based flashing differs in its requirements

A brief note distinguishing between string-path mode (requires target) and dict mode (doesn't require it) would improve clarity.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4cb5cc6 and d893c14.

📒 Files selected for processing (2)
  • packages/jumpstarter-driver-ridesx/README.md
  • packages/jumpstarter-driver-ridesx/jumpstarter_driver_ridesx/client.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/jumpstarter-driver-ridesx/jumpstarter_driver_ridesx/client.py
🧰 Additional context used
🧠 Learnings (5)
📚 Learning: 2025-11-27T09:58:41.875Z
Learnt from: CR
Repo: jumpstarter-dev/jumpstarter PR: 0
File: .cursor/rules/creating-new-drivers.mdc:0-0
Timestamp: 2025-11-27T09:58:41.875Z
Learning: Applies to packages/jumpstarter-driver-**/jumpstarter_driver_**/*.py : Driver implementations should follow existing code style validated with `make lint` (fix with `make lint-fix`), perform static type checking with `make ty-pkg-${package_name}`, add comprehensive tests, and verify all tests pass with `make test-pkg-${package_name}` or `make test`

Applied to files:

  • packages/jumpstarter-driver-ridesx/README.md
📚 Learning: 2025-11-27T09:58:55.346Z
Learnt from: CR
Repo: jumpstarter-dev/jumpstarter PR: 0
File: .cursor/rules/project-structure.mdc:0-0
Timestamp: 2025-11-27T09:58:55.346Z
Learning: Applies to packages/jumpstarter-driver-*/pyproject.toml : Driver packages must follow the naming pattern `jumpstarter-driver-<name>`

Applied to files:

  • packages/jumpstarter-driver-ridesx/README.md
📚 Learning: 2025-11-27T09:58:55.346Z
Learnt from: CR
Repo: jumpstarter-dev/jumpstarter PR: 0
File: .cursor/rules/project-structure.mdc:0-0
Timestamp: 2025-11-27T09:58:55.346Z
Learning: Applies to packages/jumpstarter-driver-*/jumpstarter_driver_*/ : Driver packages must implement a `driver.py` file containing the driver implementation

Applied to files:

  • packages/jumpstarter-driver-ridesx/README.md
📚 Learning: 2025-11-27T09:58:55.346Z
Learnt from: CR
Repo: jumpstarter-dev/jumpstarter PR: 0
File: .cursor/rules/project-structure.mdc:0-0
Timestamp: 2025-11-27T09:58:55.346Z
Learning: Applies to packages/jumpstarter-driver-*/pyproject.toml : Driver packages must depend on `jumpstarter` and specific hardware libraries in their `pyproject.toml`

Applied to files:

  • packages/jumpstarter-driver-ridesx/README.md
📚 Learning: 2025-11-27T09:58:55.346Z
Learnt from: CR
Repo: jumpstarter-dev/jumpstarter PR: 0
File: .cursor/rules/project-structure.mdc:0-0
Timestamp: 2025-11-27T09:58:55.346Z
Learning: Applies to packages/jumpstarter-driver-*/pyproject.toml : Driver packages must register via the `jumpstarter.drivers` entry point in `pyproject.toml`

Applied to files:

  • packages/jumpstarter-driver-ridesx/README.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: Redirect rules - jumpstarter-docs
  • GitHub Check: Header rules - jumpstarter-docs
  • GitHub Check: Pages changed - jumpstarter-docs
  • GitHub Check: build
  • GitHub Check: pytest-matrix (macos-15, 3.11)
  • GitHub Check: pytest-matrix (ubuntu-24.04, 3.13)
  • GitHub Check: pytest-matrix (macos-15, 3.12)
  • GitHub Check: pytest-matrix (macos-15, 3.13)
  • GitHub Check: pytest-matrix (ubuntu-24.04, 3.11)
  • GitHub Check: pytest-matrix (ubuntu-24.04, 3.12)
  • GitHub Check: e2e
🔇 Additional comments (2)
packages/jumpstarter-driver-ridesx/README.md (2)

105-108: ✓ Parameter rename correctly reflected in single-partition example.

The example now properly uses target="boot" parameter, aligning with the API changes described in the PR.


127-129: ✓ Compressed image example updated consistently.

The example correctly demonstrates the target="boot" parameter for compressed image flashing, consistent with other single-partition examples.

@bkhizgiy bkhizgiy merged commit 8dd161a into jumpstarter-dev:main Jan 1, 2026
18 checks passed
@bennyz bennyz deleted the ridesx-error branch January 1, 2026 13:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants