Skip to content

Make Windows Service setup reusable#63132

Merged
gzdunek merged 8 commits intomasterfrom
gzdunek/refactor-windows-service
Jan 28, 2026
Merged

Make Windows Service setup reusable#63132
gzdunek merged 8 commits intomasterfrom
gzdunek/refactor-windows-service

Conversation

@gzdunek
Copy link
Copy Markdown
Contributor

@gzdunek gzdunek commented Jan 26, 2026

Contributes to #59295
RFD #62545

This PR extracts the installation and running of the VNet service to make it more reusable. It will be used in the upcoming privileged update service.

@gzdunek gzdunek added no-changelog Indicates that a PR does not require a changelog entry backport/branch/v17 backport/branch/v18 labels Jan 26, 2026
@github-actions github-actions Bot requested review from Joerger and nklaassen January 26, 2026 12:00
@gzdunek gzdunek requested review from ravicious and removed request for Joerger January 26, 2026 19:22
Copy link
Copy Markdown
Member

@ravicious ravicious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Installing and uninstalling a service appears to be working correctly.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The files could be named install_windows.go and run_windows.go.

Comment thread lib/vnet/service_windows.go Outdated
Handler: &handler{},
Logger: logger,
})
return trace.NewAggregate(closeLogger(), err)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit but I feel like it'd be best to put err first as it's arguably more important.

@gzdunek gzdunek enabled auto-merge January 28, 2026 09:20
@gzdunek gzdunek added this pull request to the merge queue Jan 28, 2026
Merged via the queue into master with commit 845caf9 Jan 28, 2026
42 checks passed
@gzdunek gzdunek deleted the gzdunek/refactor-windows-service branch January 28, 2026 09:59
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@gzdunek See the table below for backport results.

Branch Result
branch/v17 Failed
branch/v18 Create PR

cthach pushed a commit that referenced this pull request Jan 29, 2026
* Extract reusable function for service installation

* Move `install_service_windows.go` to `lib/windowsservice`

* Reintroduce `vnet/install_service_windows.go`

* Make service runner reusable

* Add missing service description and returns on error

* Log service name when installing/uninstalling

* Rename files

* Put `err` first
gzdunek added a commit that referenced this pull request Mar 27, 2026
* Extract reusable function for service installation

* Move `install_service_windows.go` to `lib/windowsservice`

* Reintroduce `vnet/install_service_windows.go`

* Make service runner reusable

* Add missing service description and returns on error

* Log service name when installing/uninstalling

* Rename files

* Put `err` first

(cherry picked from commit 845caf9)
gzdunek added a commit that referenced this pull request Mar 30, 2026
* Extract reusable function for service installation

* Move `install_service_windows.go` to `lib/windowsservice`

* Reintroduce `vnet/install_service_windows.go`

* Make service runner reusable

* Add missing service description and returns on error

* Log service name when installing/uninstalling

* Rename files

* Put `err` first

(cherry picked from commit 845caf9)
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/md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants