-
Notifications
You must be signed in to change notification settings - Fork 87
Adding var_groups spec #1059
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Adding var_groups spec #1059
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
test/packages/good_var_groups/data_stream/findings/manifest.yml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, please update branch with conflicts
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 |
| link: https://github.com/elastic/package-spec/pull/1053 | ||
| - description: Add var_groups schema to support conditional variable groups for Cloud Connector integration. | ||
| type: enhancement | ||
| link: https://github.com/elastic/package-spec/issues/1054 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit. Could it be added the kibana issue that adds the support in Kibana as a comment ? As in the other changelog entries. Is this one ? elastic/kibana#249449
|
|
||
| // ValidateVarGroups validates var_groups definitions in manifests. | ||
| // It checks that: | ||
| // - vars referenced in options[].vars exist in the manifest vars array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
💚 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