Skip to content

Support feature flags#50

Merged
valner merged 11 commits intomainfrom
support-feature-flags
Mar 5, 2026
Merged

Support feature flags#50
valner merged 11 commits intomainfrom
support-feature-flags

Conversation

@valner
Copy link
Copy Markdown
Collaborator

@valner valner commented Mar 2, 2026

No description provided.

@valner valner marked this pull request as ready for review March 2, 2026 14:33
Copilot AI review requested due to automatic review settings March 2, 2026 14:33
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds end-to-end support for server-provided feature flags by persisting them into a systemd EnvironmentFile and triggering agent restarts when flags change, plus a Docker-based integration test harness to validate the behavior.

Changes:

  • Implement feature-flag validation, environment file generation, and restart gating logic in the updater application.
  • Add OS/systemd helper support for restarting services and extend the agent interface to expose an environment file path.
  • Introduce Docker Compose–based integration tests with a mock gRPC server and a fake agent, and wire these into CI.

Reviewed changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
internal/application/application.go Adds feature flag validation, env file writing, and restart decision logic.
internal/application/application_test.go Adds unit tests for env file generation/validation and restart gating behaviors.
internal/agents/interface.go Extends AgentData with GetEnvironmentFilePath().
internal/agents/o11y-agent.go Implements env file path + real restart via systemd for O11y agent.
internal/osutils/oshelper.go Adds RestartService() helper used by agent restart.
internal/client/client.go Supports insecure gRPC credentials when configured.
internal/client/client_test.go Updates mocks to satisfy the extended agent interface.
tests/integration/* (multiple files) Adds mock server, fake agent, docker images/compose, and integration test suite covering feature flags + restarts.
Makefile Separates unit tests from integration tests and adds integration-test target.
.github/workflows/check.yaml Runs integration tests in CI.
go.mod / go.sum Adds Docker client dependencies and updates module versions required by new tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@valner valner merged commit 9e264a9 into main Mar 5, 2026
2 checks passed
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.

3 participants