chore(DATAGO-126647): Align feature flag schema with Solace release stages#1215
chore(DATAGO-126647): Align feature flag schema with Solace release stages#1215bwiebe-solace wants to merge 1 commit intomainfrom
Conversation
|
|
…tages - Rename jira_epic -> jira and default_enabled -> default in FeatureDefinition and all features.yaml files for conciseness - Expand ReleasePhase enum to match Solace Cloud lifecycle stages: experimental, early_access, beta, controlled_availability, general_availability, deprecated (replaces the previous ga shorthand) - Update all tests, DTOs, and fixtures accordingly Reference: https://docs.solace.com/Cloud/stages_concept.htm Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
e7bbc7a to
8e0e3d0
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the feature-flag definition schema to use shorter field names and aligns ReleasePhase with Solace Cloud’s official release stages, then propagates those changes through the registry/parser, checker, API DTOs/router, and tests.
Changes:
- Renamed
FeatureDefinitionfields (default_enabled→default,jira_epic→jira) and updated all references. - Expanded
ReleasePhaseto the full Solace Cloud stage set (includingcontrolled_availability,general_availability,deprecated) and updated serialization expectations. - Updated the annotated
features.yamlschema/example and adjusted unit/integration tests accordingly.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/solace_agent_mesh/common/features/registry.py |
Renames schema fields, expands ReleasePhase, updates YAML parsing/validation and docstrings. |
src/solace_agent_mesh/common/features/checker.py |
Switches evaluation from definition.default_enabled to definition.default. |
src/solace_agent_mesh/common/features/features.yaml |
Updates schema comments and example flag to new keys + general_availability. |
src/solace_agent_mesh/gateway/http_sse/routers/feature_flags.py |
Maps registry definitions to DTO using defn.default. |
src/solace_agent_mesh/gateway/http_sse/routers/dto/responses/feature_flag_responses.py |
Updates release-phase description text to include the expanded enum values. |
tests/unit/common/test_feature_registry.py |
Updates YAML fixtures/assertions for renamed keys and expanded release phases. |
tests/unit/common/test_feature_checker.py |
Updates helper flag definitions to use default/jira and new GA enum member. |
tests/unit/common/test_feature_provider.py |
Updates provider tests/fixtures to new schema field names and phase strings. |
tests/unit/gateway/http_sse/routers/test_feature_flags_router.py |
Updates DTO mapping tests and adds coverage for all new phase string values. |
tests/integration/apis/test_feature_flags_router.py |
Updates integration assertion from ga to general_availability. |
Comments suppressed due to low confidence (1)
src/solace_agent_mesh/common/features/registry.py:135
- FeatureRegistry no longer accepts the legacy YAML keys (
default_enabled,jira_epic). Given this loader is used at startup, any downstream/enterprise/customfeatures.yamlthat hasn’t been migrated will now hard-fail with a ValueError. The codebase already supports deprecated config-key aliases elsewhere (e.g., gateway config), so consider accepting the legacy keys as fallbacks (with a deprecation warning) and preferring the new keys when both are present to avoid startup outages during rollout.
required = ("key", "name", "release_phase", "default", "jira")
missing = [f for f in required if f not in raw]
if missing:
missing_str = ", ".join(missing)
raise ValueError(
f"Feature definition in {source} is missing required "
f"field(s): {missing_str}. Entry: {raw!r}"
)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
dylanwalsh-solace
left a comment
There was a problem hiding this comment.
Looks good to me, will you update the doc to align with these definitions too?
https://sol-jira.atlassian.net/wiki/spaces/AIAML/pages/6065815703/SAM+Feature+Flags+Guide#Release-Phases
Yes, I am updating it now |
…l flag access Schema cleanup (PR #1215 rolled in): - Rename FeatureDefinition fields: default_enabled -> default, jira_epic -> jira - Expand ReleasePhase enum to match Solace Cloud lifecycle stages: experimental, early_access, beta, controlled_availability, general_availability, deprecated (replaces ga shorthand) - Update all affected tests, DTOs, and fixtures FeatureService singleton: - Add FeatureService: thread-safe lazily-initialised singleton that loads community features.yaml, constructs FeatureChecker as provider backend, and registers SamFeatureProvider with OpenFeature on first use - All flag evaluation (is_enabled, all_flags) routes through the OpenFeature client so hooks fire on every call; FeatureChecker is never called directly from application code - is_known_flag, has_env_override, and registry property are introspection methods that access the checker directly (no OpenFeature equivalent) - Expose module-level feature_service singleton and is_feature_enabled() convenience function from solace_agent_mesh.common.features - Add feature_checker = feature_service to SamComponentBase.__init__ so all component types (agents, gateways, platform service) gain flag access without any per-component wiring - Simplify WebUIBackendComponent._init_feature_checker() to call feature_service.initialize() and remove now-unused imports - Add 24-test suite (test_feature_service.py) using only synthetic flag keys; community yaml loading verified structurally, never by specific flag names - Update test_init_feature_checker.py to reset via feature_service and assert singleton state after call Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Need to make some other changes to the framework, so rolling these changes into that PR |




What is the purpose of this change?
Cleans up the
FeatureDefinitionschema to use shorter, more intuitive field names, and aligns theReleasePhaseenum with the official Solace Cloud release stages.default_enabled→defaultjira_epic→jiraReleasePhaseexpanded from 4 values (early_access,beta,experimental,ga) to the full Solace Cloud set:experimental,early_access,beta,controlled_availability,general_availability,deprecatedHow was this change implemented?
Pure rename/expansion — no behaviour changes. Updated in the following order:
registry.py—FeatureDefinitiondataclass fields renamed;ReleasePhaseenum expanded with Solace docs link;_parse_definitionrequired-field list and validation messages updated; module docstring updatedchecker.py—definition.defaultreference updatedfeature_flags.py/feature_flag_responses.py—defn.defaultand DTO description string updatedfeatures.yaml— schema comment block updated;background_tasksexample flag updated to new field names andgeneral_availabilityphaseKey Design Decisions
The
gashorthand was replaced by the fullgeneral_availabilitystring to match the Solace Cloud terminology exactly. While this is a longer string, it removes ambiguity and makes the phase values self-describing. All existing flags in the communityfeatures.yamlusedbetaorearly_access, so no flag entries needed a phase value change — only thebackground_tasksexample flag (which usedga) was updated.How was this change tested?
test_feature_registry,test_feature_checker,test_feature_provider,test_feature_flags_router)test_feature_flags_routerintegration test updated and passing against SQLiteIs there anything the reviewers should focus on/be aware of?
default/jirain itsfeatures.yamlentries.features.yaml) is a separate PR inSolaceDev/solace-agent-mesh-enterprise.features.yaml(e.g. enterprise repo, custom deployments) must update todefault/jirafield names — the parser will raise aValueErroron load if old field names are present.Generated by Claude Code