Skip to content

Config UI: raise device test timeout to 15s - #33118

Merged
andig merged 4 commits into
masterfrom
device-test-timeout
Sep 1, 2026
Merged

andig merged 4 commits into
masterfrom
device-test-timeout

Conversation

@andig

@andig andig commented Aug 23, 2026 •

Copy link
Copy Markdown
Member

follows #33384

The device configuration test cancels its context after 10s. For EEBus devices that is not enough: ship-go delays each connection attempt by a randomized backoff, and only then dials, with the SHIP handshake on top.

From a Wolf CHA trace in #25058 the delays were 14.2s, 12.9s, 10.2s and 5.2s, with 3-9s for dial plus handshake. Every test aborted exactly 10s after registering ski, so the connection never had a chance to complete and the UI reported cannot create charger type 'eebus-ohpcf': context canceled.

The backoff reset that made up the second half of this PR landed separately in #33384, so what remains here is the headroom: with the reset a test starts from the 0-3s range, and 15s covers the dial and handshake on top.

  • raise the device test timeout to 15s

🤖 Generated with Claude Code

EEBus connections need headroom for ship-go's connection backoff plus the
SHIP handshake, which regularly exceeds the previous 10s.
@andig andig added the enhancement New feature or request label Aug 23, 2026
@github-actions github-actions Bot added bug Something isn't working devices Specific device support labels Aug 23, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="server/http_config_helper.go" line_range="208" />
<code_context>

+// deviceTestTimeout limits the device configuration test. EEBus devices need
+// headroom for ship-go's connection backoff plus the SHIP handshake.
+const deviceTestTimeout = 15 * time.Second
+
 func startDeviceTimeout() (context.Context, context.CancelFunc, chan struct{}) {
</code_context>
<issue_to_address>
**issue (bug_risk):** The 15-second timeout still cancels the configuration context before a device with a saturated ship-go backoff can connect: the backoff alone can take up to 20 seconds, and the dial plus SHIP handshake occurs afterward. The UI therefore continues to report `context canceled` for those devices.

**Triggers:** When ship-go's per-SKI attempt counter is in the saturated 10-20 second backoff range.

**Suggested fix:** Reset the per-SKI attempt counter when registering a test, or set the timeout to exceed the maximum backoff plus the expected dial and handshake duration.
</issue_to_address>

Sourcery assessment

Approval pending. 1 finding to address first.

Blocking findings: server/http_config_helper.go:208


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread server/http_config_helper.go Resolved
Bumps ship-go to andig/ship-go@3331556, which cancels the accumulated retry
backoff and any pending delay timer when a remote service is registered. A
device test no longer inherits a 10-20s connection delay from earlier failed
attempts.
@andig andig changed the title Config UI: raise device test timeout to 15s EEBus: fix device test timing out on connection backoff Aug 23, 2026
@andig andig removed the bug Something isn't working label Aug 23, 2026
@andig
andig marked this pull request as draft August 23, 2026 12:38
@github-actions github-actions Bot added the stale Outdated and ready to close label Aug 30, 2026
@andig
andig marked this pull request as ready for review September 1, 2026 14:25

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry @andig, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 1 day and 21 hours by commenting @sourcery-ai review. Upgrade to get a review now.

# Conflicts:
#	go.mod
#	go.sum
@github-actions github-actions Bot removed the stale Outdated and ready to close label Sep 1, 2026
@andig andig changed the title EEBus: fix device test timing out on connection backoff Config UI: raise device test timeout to 15s Sep 1, 2026
@andig
andig merged commit 212dd03 into master Sep 1, 2026
11 checks passed
@andig
andig deleted the device-test-timeout branch September 1, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devices Specific device support enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant