Repository navigation
fix(sdk/go): accept CLI-compatible gateway names - #4767
Conversation
Signed-off-by: Sunil Kumar Vadlamani <25136458+sunilteja93@users.noreply.github.com>
|
All contributors have signed the DCO ✍️ ✅ |
|
I have read the DCO document and I hereby sign the DCO. |
|
Hi @rhuss, #4509 has been accepted, and my contributor vouch was approved. I've opened this PR with the fix and regression tests. The full go sdk test suite passes locally. Appreciate your earlier offer to review. Would you mind taking a look when you get a chance? Also, thanks @TaylorMutch for accepting the issue and approving my vouch request. Really appreciate your help in getting this moving! Thanks! |
|
/ok to test 9b71277 |
TaylorMutch
left a comment
There was a problem hiding this comment.
No actionable findings.
The change aligns the Go SDK with the CLI's safe single-component gateway-name behavior while preserving rejection of empty names, dot components, path separators, and NUL. The regression coverage exercises named loading, active-gateway resolution, and gateway listing for host-derived names.
Validation:
- Reviewed commit
9b71277832d68994a7b5eb8b8e3c389c92d69f60. - Full
mise run go:cipassed locally on the exact PR commit, including formatting, build, lint, proto/docs checks, and all Go tests. - GitHub Branch Checks, Go SDK, Helm, issue acceptance, DCO, E2E, and GPU E2E checks passed.
|
Thanks @TaylorMutch! Really appreciate the thorough review and running the full CI suite. Thanks again for helping get this contribution through the process! |
TaylorMutch
left a comment
There was a problem hiding this comment.
I’m withdrawing my earlier approval. I apologize—the first review missed a Windows path-normalization edge case in the broadened validator.
Please keep this change narrowly scoped: allow host-derived FQDN and IPv4 names while retaining a cross-platform-safe component grammar. Validation needs to ensure every accepted name remains a distinct path component under Windows filesystem rules, with regression coverage for the Windows-specific cases. Raw IPv6 names also need an explicit portable encoding rather than accepting filename characters that Windows reserves.
The Unix separator and dot-component checks look sound, and the FQDN/IPv4 regression coverage is useful. This should be a small change to the validator and its tests, followed by a straightforward re-review.
I’m keeping the detailed security analysis out of the public review.
Signed-off-by: Sunil Kumar Vadlamani <25136458+sunilteja93@users.noreply.github.com>
|
Hi @TaylorMutch, Thanks for catching the windows path-normalization issue. I've pushed a new follow-up commit narrowing the validator to support FQDN and IPv4 names while enforcing portable filename rules. The changes should now reject windows reserved device names, invalid dot placement, reserved filename characters, and raw IPv6 names. I've also added Windows-specific regression tests and preserved the existing gateway loading, active resolution, and listing coverage. The full go sdk test suite and targeted regression tests pass locally. Windows/amd64 test cross-compilation also passes. I've updated the PR description to reflect the narrower scope. Would appreciate another review when you have a chance. Thanks! |
|
/ok to test 8542676 |
Compatibility review (advisory)New or updated breaking changes; see the full report for all findings. 1. go-sdk — No explicit risk acceptance found
Review details
Advisory review; publication gates are unchanged. |
|
@TaylorMutch The Rust aarch64-darwin job failed because a crates.io dependency download timed out. Could you rerun it when you get a chance? Thanks! |
|
Acceptable risk given the gateway names are likely uncommon. |
Summary
Fix the Go SDK gateway-name validation to support CLI-generated FQDN and IPv4 gateway names while maintaining portable filesystem naming rules across operating systems.
Related Issue
Closes #4509
Changes
Release Notes
The Go SDK now supports FQDN and IPv4-derived gateway names while enforcing Windows-safe filename validation.
Testing
Validation performed:
Windows-specific validation cases execute on macOS. Windows-target tests were cross-compiled but not executed on Windows.
Checklist