efegokdemir opened a new pull request, #2894:
URL: https://github.com/apache/apisix-ingress-controller/pull/2894

   ### Type of change:
   
   - [x] Bugfix
   - [x] CI/CD or Tests
   
   ### What this PR does / why we need it:
   
   Fixes #2879.
   
   Timeout values are represented as durations in the Kubernetes resources but 
were truncated to integers before being sent to ADC. A 500ms timeout became 0 
and was rejected by APISIX, blocking synchronization. The ADC timeout model now 
preserves fractional seconds, while zero-valued policy fields continue to use 
the documented 60-second default.
   
   ### Changes
   
   - Represent ADC timeout seconds as `float64`.
   - Preserve fractional seconds in ApisixUpstream, ApisixRoute, 
BackendTrafficPolicy and ingress translation.
   - Add regression coverage for fractional values and zero-policy defaults.
   
   ### Pre-submission checklist:
   
   - [x] Explained the problem and solution.
   - [x] Added corresponding test cases.
   - [x] Backward-compatible wire representation: JSON remains numeric seconds, 
now retaining decimals.
   
   ### Testing
   
   - `go test ./internal/adc/translator -run Test... -count=1` — PASS; fails 
before the fix and passes after it.
   - `go test ./internal/adc/translator -count=1` — PASS.
   - `go vet ./internal/adc/translator` — PASS.
   - `go test ./api/... ./internal/... ./pkg/...` — PASS.
   - `gofmt` and `git diff --check` — PASS.
   - `golangci-lint run ./internal/adc/translator/...` — reports existing 
unrelated `goconst`/`prealloc` findings outside this change.
   - `go test ./...` was not completed because it began expanding into 
heavyweight e2e/AWS dependency downloads; the relevant API, internal and 
package suites passed.
   
   No overlapping open PR was found for #2879 or sub-second timeout 
translation. AI assistance was used to inspect the issue, draft the focused 
implementation and tests, and prepare this description; the submitting human is 
responsible for reviewing the changed lines and validation results.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to