Adding var_groups spec#1059
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new var_groups schema to the package manifest specification, enabling conditional variable groups that control which authentication variables are visible based on user selection. This addresses the limitation where Fleet's generic UI currently displays all integration variables in a flat list regardless of their context.
Changes:
- Introduces
var_groupsfield with mutually exclusive options for organizing related variables - Adds validation rules to ensure var_groups reference valid variables and maintain naming uniqueness
- Supports deployment mode filtering and input-level option hiding for advanced use cases
Reviewed changes
Copilot reviewed 30 out of 40 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/integration/manifest.spec.yml | Adds var_groups schema definition with options, deployment mode filtering, and hide_in_var_group_options for inputs |
| spec/integration/data_stream/manifest.spec.yml | Adds var_groups support at stream level with version patch to remove from pre-3.6.0 |
| spec/changelog.yml | Documents the var_groups enhancement for Cloud Connector integration |
| code/go/internal/validator/spec.go | Registers ValidateVarGroups semantic validation rule for format_version >= 3.6.0 |
| code/go/internal/validator/semantic/validate_var_groups.go | Implements validation logic for var_groups including duplicate detection and required field checking |
| code/go/internal/validator/semantic/validate_var_groups_test.go | Adds comprehensive test coverage for var_groups validation scenarios |
| code/go/pkg/validator/validator_test.go | Registers test packages for good and bad var_groups validation cases |
| test/packages/good_var_groups/* | Complete test package demonstrating valid var_groups usage with Cloud Connector extensions |
| test/packages/bad_var_groups_/ | Test packages for invalid scenarios (missing vars, duplicate names, required conflicts) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
6f68753 to
ea13144
Compare
|
/test |
|
|
||
| // ValidateVarGroups validates var_groups definitions in manifests. | ||
| // It checks that: | ||
| // - vars referenced in options[].vars exist in the manifest vars array |
|
The Azure Logs integration is adding new authentication options (connection string, client credentials, workload identity, and managed identity, etc) so this will be really handy! |
|
@zmoog |
Looking forward to the 9.4 release! 🚀 |
|
@seanrathier could you resolve changelog conflicts? thanks! |
|
@teresaromero merged conflicts. Thanks for the heads up. Are we merging the package spec 3.6.0 soon? |
💚 Build Succeeded
History
cc @seanrathier |
What does this PR do?
Add a new var_groups field to the package manifest schema that:
Why is it important?
Current Limitation
Fleet's generic UI renders all integration variables in a flat list, regardless of authentication method or configuration context. Users see fields that don't apply to their chosen setup (e.g., showing access_key_id when using Assume Role authentication), creating confusion and a poor user experience.
Specific Use Cases
Checklist
test/packagesthat prove my change is effective.spec/changelog.yml.Related issues