Skip to content

Make TargetServer a required field in the forwarding server#58700

Merged
Joerger merged 9 commits intomasterfrom
joerger/require-target-server
Sep 9, 2025
Merged

Make TargetServer a required field in the forwarding server#58700
Joerger merged 9 commits intomasterfrom
joerger/require-target-server

Conversation

@Joerger
Copy link
Copy Markdown
Contributor

@Joerger Joerger commented Sep 3, 2025

The forwarding server always requires a TargetServer, but this isn't explicitly covered by the code, resulting in unnecessary additional nil checks and fields.

Adapted from #52920

Comment thread lib/proxy/router.go Outdated
Comment thread lib/srv/forward/sshserver.go Outdated
Comment thread lib/proxy/router.go Outdated
@Joerger Joerger requested a review from rosstimothy September 9, 2025 00:32
@Joerger Joerger force-pushed the joerger/require-target-server branch from dff14c1 to 186dd57 Compare September 9, 2025 17:35
@Joerger Joerger enabled auto-merge September 9, 2025 23:12
@Joerger Joerger added this pull request to the merge queue Sep 9, 2025
Merged via the queue into master with commit 40cebb4 Sep 9, 2025
42 checks passed
@Joerger Joerger deleted the joerger/require-target-server branch September 9, 2025 23:58
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@Joerger See the table below for backport results.

Branch Result
branch/v16 Failed
branch/v17 Failed
branch/v18 Failed

Joerger added a commit that referenced this pull request Sep 10, 2025
* Make targetServer a required field in the forwarding server.

* Remove unused field.

* Update serverResolver to never return nil,nil.

* Cleanup variables in DialHost.

* Restore previous event metadata values; Update comments.

* Don't add serverID to principals if it's redundant.

* Update lib/proxy/router.go

Co-authored-by: Forrest <30576607+fspmarshall@users.noreply.github.com>

* Fix lint.

* Fix test.

---------

Co-authored-by: Forrest <30576607+fspmarshall@users.noreply.github.com>
Joerger added a commit that referenced this pull request Sep 10, 2025
* Make targetServer a required field in the forwarding server.

* Remove unused field.

* Update serverResolver to never return nil,nil.

* Cleanup variables in DialHost.

* Restore previous event metadata values; Update comments.

* Don't add serverID to principals if it's redundant.

* Update lib/proxy/router.go

Co-authored-by: Forrest <30576607+fspmarshall@users.noreply.github.com>

* Fix lint.

* Fix test.

---------

Co-authored-by: Forrest <30576607+fspmarshall@users.noreply.github.com>
Joerger added a commit that referenced this pull request Sep 10, 2025
* Make targetServer a required field in the forwarding server.

* Remove unused field.

* Update serverResolver to never return nil,nil.

* Cleanup variables in DialHost.

* Restore previous event metadata values; Update comments.

* Don't add serverID to principals if it's redundant.

* Update lib/proxy/router.go

Co-authored-by: Forrest <30576607+fspmarshall@users.noreply.github.com>

* Fix lint.

* Fix test.

---------

Co-authored-by: Forrest <30576607+fspmarshall@users.noreply.github.com>
github-merge-queue bot pushed a commit that referenced this pull request Sep 10, 2025
#58961)

* Make targetServer a required field in the forwarding server.

* Remove unused field.

* Update serverResolver to never return nil,nil.

* Cleanup variables in DialHost.

* Restore previous event metadata values; Update comments.

* Don't add serverID to principals if it's redundant.

* Update lib/proxy/router.go



* Fix lint.

* Fix test.

---------

Co-authored-by: Forrest <30576607+fspmarshall@users.noreply.github.com>
github-merge-queue bot pushed a commit that referenced this pull request Sep 10, 2025
#58960)

* Make targetServer a required field in the forwarding server.

* Remove unused field.

* Update serverResolver to never return nil,nil.

* Cleanup variables in DialHost.

* Restore previous event metadata values; Update comments.

* Don't add serverID to principals if it's redundant.

* Update lib/proxy/router.go



* Fix lint.

* Fix test.

---------

Co-authored-by: Forrest <30576607+fspmarshall@users.noreply.github.com>
github-merge-queue bot pushed a commit that referenced this pull request Sep 10, 2025
#58962)

* Make targetServer a required field in the forwarding server.

* Remove unused field.

* Update serverResolver to never return nil,nil.

* Cleanup variables in DialHost.

* Restore previous event metadata values; Update comments.

* Don't add serverID to principals if it's redundant.

* Update lib/proxy/router.go



* Fix lint.

* Fix test.

---------

Co-authored-by: Forrest <30576607+fspmarshall@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/branch/v17 backport/branch/v18 no-changelog Indicates that a PR does not require a changelog entry size/sm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants