conductor-oss / conductor-oss/go-sdk
HttpInput struct has wrong JSON field names for connectionTimeOut and readTimeOut — timeouts silently ignored
- Dominant language
- Go
- Stars
- 66
- Forks
- 25
- Avg merge
- 3h 44m
- Merged PRs (30d)
- 2
Description
## Summary
`sdk/workflow/http.go` — the `HttpInput` struct has incorrect JSON field name tags for both timeout fields. When users set timeouts via the Go SDK, those values are silently discarded by the server, which falls back to its 3000ms default.
Tested against: **Conductor OSS 3.32.0-rc.9**
## Root Cause
```go
// sdk/workflow/http.go
type HttpInput struct {
...
ConnectionTimeOut int16 `json:"ConnectionTimeOut,omitempty"` // ← capital C; server reads "connectionTimeOut"
ReadTimeout int16 `json:"readTimeout,omitempty"` // ← lowercase t in "out"; server reads "readTimeOut"
}
```
The server (`HttpTask.java:274-275`) declares both fields with `private Integer connectionTimeOut = 3000` and `private Integer readTimeOut = 3000`. Jackson serializes these as `"connectionTimeOut"` (lowercase c) and `"readTimeOut"` (capital T in "Out").
The Go SDK sends:
- `"ConnectionTimeOut"` — capital C, **not matched**
- `"readTimeout"` — lowercase t in "out", **not matched**
Both fields are silently dropped; the server uses 3000ms for both.
## Secondary Issue: int16 overflow
Both fields are typed as `int16`, which has a max value of **32,767**. Any timeout above ~32 seconds (e.g., a 60-second read timeout) overflows to a negative value. The server field is `Integer` — there is no 32-second cap on the server side.
## Live Test Evidence
Confirmed on Conductor OSS 3.32.0-rc.9 (`http://loki.local:8080`): the server accepts `connectionTimeOut` and `readTimeOut` with the correct casing. The Go SDK's wrong-cased fields are silently ignored.
## Fix
```go
type HttpInput struct {
...
ConnectionTimeOut int `json:"connectionTimeOut,omitempty"` // lowercase c; int not int16
ReadTimeout int `json:"readTimeOut,omitempty"` // capital T in Out; int not int16
}
```
Note: renaming the Go struct field `ReadTimeout` → `ReadTimeOut` (to match the JSON key) would be a breaking change to existing Go code that sets this field directly. The JSON tag is the important fix; the field name is a secondary cosmetic issue.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in sdk/workflow/http.go by inspecting the HttpInput timeout fields and their JSON tags and types. Verify the serialized request uses connectionTimeOut and readTimeOut and supports values above the int16 range; the issue is done when both timeout values reach the server without overflow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100