Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 19, 2025

Adds infrastructure to annotate parameters as runtime-configurable, enabling introspection of which parameters can be reloaded without restart.

Changes

  • docs/parameters.yaml: Added optional runtime_configurable boolean field (defaults to false)

    • Example: Logging.Level marked as runtime_configurable: true
  • generate/param_generator.go: Extended generator to read and emit runtime configurability metadata

    • Generates package-level runtimeConfigurableMap variable for O(1) lookups
    • Emits GetRuntimeConfigurable() map[string]bool function
    • Emits IsRuntimeConfigurable(paramName string) bool function
    • Adds IsRuntimeConfigurable() bool method to all param types
  • param/parameters.go: Generated code with new introspection capabilities

  • docs/parameters.json: Includes runtime_configurable field for documentation/web UI consumption

Usage

// Check by parameter name
if param.IsRuntimeConfigurable("Logging.Level") {
    // reload without restart
}

// Check via typed parameter
if param.Logging_Level.IsRuntimeConfigurable() {
    // reload without restart
}

// Enumerate all runtime-configurable parameters
for name, configurable := range param.GetRuntimeConfigurable() {
    if configurable {
        // handle runtime-configurable parameter
    }
}
Original prompt

This section details on the original issue you should resolve

<issue_title>Add annotations for runtime-configurable parameters</issue_title>
<issue_description>We would like to expose a few attributes as being runtime-configurable without needing a restart.

This effort starts with adding a new boolean field to docs/parameters.yaml indicating whether the attribute can be reloaded at runtime (i.e., without restart).

This annotation should be used by the generator in generate so we can introspect whether a given attribute is configurable at runtime. This should be both a function in the interface and something where, given a string with a parameter name, whether it is configurable is returned.</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 changed the title [WIP] Add annotations for runtime-configurable parameters Add runtime-configurable annotations for parameters Dec 19, 2025
Copilot AI requested a review from bbockelm December 19, 2025 18:49
@bbockelm bbockelm requested a review from h2zh December 19, 2025 20:23
@bbockelm bbockelm force-pushed the copilot/add-runtime-config-annotations branch from 0767f31 to d49b035 Compare December 21, 2025 03:26
@bbockelm bbockelm added enhancement New feature or request configuration labels Dec 21, 2025
- Added runtime_configurable boolean field support in parameters.yaml
- Updated param_generator.go to read and track runtime_configurable status
- Generated GetRuntimeConfigurable() function to return map of all parameters
- Added IsRuntimeConfigurable(paramName string) package-level function
- Added IsRuntimeConfigurable() method to all param types (StringParam, IntParam, BoolParam, DurationParam, ObjectParam, StringSliceParam)
- Added comprehensive tests for runtime_configurable functionality
- Added example annotations: Logging.Level (runtime_configurable: true) and TLSSkipVerify (runtime_configurable: false)
@bbockelm bbockelm force-pushed the copilot/add-runtime-config-annotations branch from d49b035 to ac76b68 Compare December 21, 2025 03:28
@bbockelm bbockelm marked this pull request as ready for review December 21, 2025 03:40
@bbockelm bbockelm merged commit 6240ad4 into main Dec 21, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

configuration enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add annotations for runtime-configurable parameters

2 participants