Skip to content

Honor request headers and preconditions in the Go SDK  - #676

Merged
Arun G (ArunGopinathan) merged 1 commit into
mainfrom
agopinathan/go-request-option-headers
Sep 3, 2026
Merged

Honor request headers and preconditions in the Go SDK #676
Arun G (ArunGopinathan) merged 1 commit into
mainfrom
agopinathan/go-request-option-headers

Conversation

@ArunGopinathan

Copy link
Copy Markdown
Contributor

Changes proposed:

  • Forward TunnelRequestOptions.AdditionalHeaders with Go SDK management requests.
  • Use standard HTTP preconditions so create operations return a conflict when the resource already exists, while update operations require an existing resource and preserve explicit ETags.
  • Preserve upsert behavior in the CreateOrUpdate* methods, avoid mutating reusable request options, and add regression tests.

Other Tasks:

  • If you updated the Go SDK did you update the PackageVersion in tunnels.go
  • If you updated the TS SDK did you update the dependencies in package.json for connections and management to require a dependency that is > the current published version(Found using npm view @microsoft/dev-tunnels-contracts). This will fix issues where yarn will pull the old version of packages and will cause mismatched dependencies. See example PR — Not applicable; this PR does not update the TS SDK.

Propagate per-request headers while protecting SDK-owned values, use standard create and update preconditions, and preserve explicit update ETags. Add regression coverage for header precedence, caller immutability, retries, deletes, and upserts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 1c4ee497-a9b3-481b-860b-541eef9e9fba
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@ArunGopinathan

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
2 pipeline(s) were filtered out due to trigger conditions.

@ArunGopinathan
Arun G (ArunGopinathan) merged commit eb4556c into main Sep 3, 2026
11 checks passed
@ArunGopinathan
Arun G (ArunGopinathan) deleted the agopinathan/go-request-option-headers branch September 3, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants