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

Commit 4007374

Browse files
authored
Merge pull request #752 from jumpstarter-dev/backport-751-to-release-0.7
[Backport release-0.7] ridesx: add timeouts and boot-to-fastboot
2 parents db953ec + 92f8898 commit 4007374

5 files changed

Lines changed: 482 additions & 10 deletions

File tree

packages/jumpstarter-driver-ridesx/jumpstarter_driver_ridesx/client.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,19 @@ def cli(self):
111111
generic_cli = FlasherClient.cli(self)
112112

113113
@driver_click_group(self)
114-
def storage():
114+
def base():
115115
"""RideSX storage operations"""
116116
pass
117117

118118
for name, cmd in generic_cli.commands.items():
119-
storage.add_command(cmd, name=name)
119+
base.add_command(cmd, name=name)
120120

121-
return storage
121+
@base.command()
122+
def boot_to_fastboot():
123+
"""Boot to fastboot"""
124+
self.boot_to_fastboot()
125+
126+
return base
122127

123128

124129
@dataclass(kw_only=True)

packages/jumpstarter-driver-ridesx/jumpstarter_driver_ridesx/driver.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
@dataclass(kw_only=True)
1515
class RideSXDriver(Driver):
1616
"""RideSX Driver"""
17-
17+
decompression_timeout: int = field(default=15 * 60) # 15 minutes
18+
flash_timeout: int = field(default=30 * 60) # 30 minutes
19+
continue_timeout: int = field(default=20 * 60) # 20 minutes
1820
storage_dir: str = field(default="/var/lib/jumpstarter/ridesx")
1921

2022
def __post_init__(self):
@@ -74,7 +76,7 @@ def _decompress_file(self, compressed_file: Path) -> Path:
7476
stderr=subprocess.PIPE,
7577
text=False,
7678
check=True,
77-
timeout=600,
79+
timeout=self.decompression_timeout,
7880
)
7981

8082
if result.stderr:
@@ -168,7 +170,7 @@ def flash_with_fastboot(self, device_id: str, partitions: Dict[str, str]):
168170
self.logger.debug(f"Running command: {' '.join(cmd)}")
169171

170172
try:
171-
result = subprocess.run(cmd, capture_output=True, text=True, check=True, timeout=800)
173+
result = subprocess.run(cmd, capture_output=True, text=True, check=True, timeout=self.flash_timeout)
172174
self.logger.info(f"Successfully flashed {partition_name}")
173175
self.logger.debug(f"Flash stdout: {result.stdout}")
174176
if result.stderr:
@@ -186,7 +188,7 @@ def flash_with_fastboot(self, device_id: str, partitions: Dict[str, str]):
186188
cmd = ["fastboot", "-s", device_id, "continue"]
187189
self.logger.debug(f"Running command: {' '.join(cmd)}")
188190
try:
189-
result = subprocess.run(cmd, capture_output=True, text=True, check=True, timeout=300)
191+
result = subprocess.run(cmd, capture_output=True, text=True, check=True, timeout=self.continue_timeout)
190192
self.logger.debug(f"Fastboot continue stdout: {result.stdout}")
191193
self.logger.debug(f"Fastboot continue stderr: {result.stderr}")
192194
self.logger.info("Fastboot continue completed successfully")

0 commit comments

Comments
 (0)