fix: align timeout budget with wsman client for slow devices - #1153
Open
amarnath-ac wants to merge 1 commit into
Open
fix: align timeout budget with wsman client for slow devices#1153amarnath-ac wants to merge 1 commit into
amarnath-ac wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1153 +/- ##
=======================================
Coverage 44.45% 44.45%
=======================================
Files 144 144
Lines 13732 13732
=======================================
Hits 6105 6105
Misses 7054 7054
Partials 573 573 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
amarnath-ac
force-pushed
the
1082_device_details_en_off_fix
branch
from
July 28, 2026 15:49
30dcd5a to
acbd654
Compare
1. httpserver read/write timeout 15s to 40s so the wsman client (30s) times out first with a clean 504. 2. waitForAuth 3s to 30s so concurrent handlers share one Target instead of forking, preserving the library concurrency cap. 3. expireAfter 30s to 60s to keep the authenticated Target cached across rapid page refreshes.
amarnath-ac
marked this pull request as ready for review
July 28, 2026 15:58
amarnath-ac
requested review from
Copilot,
graikhel-intel,
madhavilosetty-intel and
sudhir-intc
July 28, 2026 15:59
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts timeout and caching budgets so slow WSMAN operations are more likely to fail via the WSMAN client timeout (clean 504) rather than being cut off by the HTTP server or by duplicate concurrent authentication attempts.
Changes:
- Increase default HTTP server timeouts to allow longer-running handlers.
- Increase WSMAN connection-cache expiry to keep authenticated targets cached longer.
- Increase the “wait for auth” window to reduce concurrent handlers forking multiple WSMAN clients for the same device.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pkg/httpserver/server.go | Updates default HTTP server timeouts to a larger budget. |
| internal/usecase/devices/wsman/message.go | Extends WSMAN connection cache TTL and auth-wait window to reduce duplicate client creation and keep targets warm longer. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.