Skip to content

Add pre-configured restart with Info/Restart gRPC methods and CLI flags#41

Merged
dkrizic merged 4 commits intomainfrom
copilot/extend-restart-feature
Jan 25, 2026
Merged

Add pre-configured restart with Info/Restart gRPC methods and CLI flags#41
dkrizic merged 4 commits intomainfrom
copilot/extend-restart-feature

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 25, 2026

Enables restart feature to be pre-configured at deployment time rather than requiring runtime parameters. Service configuration is now queryable via gRPC, simplifying UI/CLI interaction.

gRPC API

  • Info() - Returns restart configuration (enabled, type, name)
  • Restart() - Executes restart using pre-configured values
message ServiceInfo {
  bool enabled = 1;
  WorkloadType type = 2;
  string name = 3;
}

service Workload {
  rpc Info(InfoRequest) returns (ServiceInfo);
  rpc Restart(SimpleRestartRequest) returns (RestartResponse);
}

Service

  • CLI flags: --restart-enabled, --restart-type, --restart-name
  • Environment variables: RESTART_ENABLED, RESTART_TYPE, RESTART_NAME
  • WorkloadService stores configuration at initialization

Helm Chart

service:
  restart:
    enabled: true
    type: deployment
    name: yasm-frontend

CLI

  • feature-cli info - Display restart configuration
  • feature-cli restart - Execute configured restart

UI

  • Fetches Info() on startup
  • Conditionally renders single-button restart UI: "Restart {service-name}"
  • Removes parameter form, calls Restart() with zero arguments

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https /usr/lib/apt/methods/https (dns block)
  • invalid
    • Triggering command: /tmp/go-build295058399/b433/get.test /tmp/go-build295058399/b433/get.test -test.testlogfile=/tmp/go-build295058399/b433/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true -c=4 -nolocalimports -importcfg /tmp/go-build1477414030/b785/importcfg -pack /home/REDACTED/work/feature/feature/service/service/feature/feature.go /home/REDACTED/work/feature/feature/service/service/feature/feature_test.go 2108�� g_.a lient-go@v0.35.0-ifaceassert ux-amd64/pkg/tool/linux_amd64/vet experiment/json//home/REDACTED/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.25.6.linux-amd64/pkg/too-v /gofeaturespb mpile ux-amd64/pkg/too-trimpath (dns block)
    • Triggering command: /tmp/go-build295058399/b430/delete.test /tmp/go-build295058399/b430/delete.test -test.testlogfile=/tmp/go-build295058399/b430/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true -c=4 -nolocalimports -importcfg /tmp/go-build1477414030/b786/importcfg -pack /home/REDACTED/go/pkg/mod/github.com/stretchr/testify@v1.11.1/assert/assertion_compare.go /home/REDACTED/go/pkg/mod/github.com/stretchr/testify@v1.11.1/assert/assertion_format.go 2108�� g_.a lient-go@v0.35.0-ifaceassert ux-amd64/pkg/tool/linux_amd64/vet --gdwarf-5 nal/editionssupp-o mpile ux-amd64/pkg/too-trimpath (dns block)
    • Triggering command: /tmp/go-build295058399/b436/getall.test /tmp/go-build295058399/b436/getall.test -test.testlogfile=/tmp/go-build295058399/b436/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true uf@v1.36.11/refl-errorsas uf@v1.36.11/refl-ifaceassert ux-amd64/pkg/tool/linux_amd64/vet . ions/batch/v1bet-atomic --64 ux-amd64/pkg/too-buildtags 2108�� ypuB4blBS -I ux-amd64/pkg/tool/linux_amd64/vet --gdwarf-5 v2 mpile ux-amd64/pkg/too-buildtags (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Extend restart feature</issue_title>
<issue_description>We need to extend the restart feature. The goal is, that the deployment type and name is preconfigured using environment variables:

  • RESTART_ENABLED=true/false
  • RESTART_TYPE=deployment/statefulset/daemonset
  • RESTART_NAME=name_of_deployment

In the helm chart the values should be

service:
  restart:
    enabled: true
    type: deployment
    name: yasm-frontend

The gRPC interface should be extended with the following methods:

  • restart: Run the restart in the service
  • info: Get info about the service including the information if it is enabled and the name of the service, e.g. "yasm-frontend"

The ui should only display a single button named after the service.name and clicking this button simply calls the restart grpc method.

Also the CLI should have two new commands

  • info: Getting service info
  • restart: Restart the service (if enabled)
    </issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits January 25, 2026 00:35
- Extended workload.proto with Info and Restart methods
- Added ServiceInfo message with enabled, type, and name fields
- Updated service to support restart configuration via CLI flags (RESTART_ENABLED, RESTART_TYPE, RESTART_NAME)
- Implemented Info and Restart gRPC methods in workload service
- Updated Helm chart with service.restart configuration
- Added CLI commands: info and restart
- Updated UI to show simplified restart button based on service configuration
- Regenerated all proto files

Co-authored-by: dkrizic <1181349+dkrizic@users.noreply.github.com>
Co-authored-by: dkrizic <1181349+dkrizic@users.noreply.github.com>
- Extract magic timeout value to constant in UI service
- Improve comment clarity about namespace usage in workload service
- Add validation for restart enabled in UI handleRestart method

Co-authored-by: dkrizic <1181349+dkrizic@users.noreply.github.com>
Copilot AI changed the title [WIP] Extend restart feature with environment variables Add pre-configured restart with Info/Restart gRPC methods and CLI flags Jan 25, 2026
Copilot AI requested a review from dkrizic January 25, 2026 00:42
@dkrizic dkrizic marked this pull request as ready for review January 25, 2026 00:45
@dkrizic dkrizic merged commit 966090c into main Jan 25, 2026
3 checks passed
@dkrizic dkrizic deleted the copilot/extend-restart-feature branch January 25, 2026 00:45
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.

Extend restart feature

2 participants