docs(settings-gen): add applies_to and nested settings to schema#253746
docs(settings-gen): add applies_to and nested settings to schema#253746theletterf merged 8 commits intoelastic:mainfrom
Conversation
Add schema guidance for applies_to tags (mapping and inline list forms) and allow nested settings with inheritance semantics. Co-authored-by: OpenAI GPT-5.2 <noreply@openai.com> Co-authored-by: Cursor <cursoragent@cursor.com>
🔍 Preview links for changed docs |
|
Thanks @theletterf! This looks great! One question: Do we have examples of nested settings in the docs currently? I'm aware of nested groups of settings, but I think perhaps that's a separate problem. Taking the Kibana Security settings as an example, we currently have nested groups of settings:
I'm not sure how we'd support this case, or perhaps we should limit our yaml so that we don't support nesting groups in this way. |
|
I really like the applies_to support! |
|
As I think about it, the nested settings could be useful for documenting the yaml config files used in the various ingest tools! |
|
Nice one @theletterf. The main thing that comes to mind right now is the redundancy between keys:
If we add applies_to, then the 2 others become irrelevant. I think we should keep either applies_to, or status + platforms The second point is that they should be mandatory. For example, maybe we want to force the "platforms" (or applies_to > deployments) to be clearly defined as available or unavailable, so that there's no surprise or doubt when something is not specified. Happy to help brainstorm. |
Co-authored-by: David Kilfoyle <41695641+kilfoyle@users.noreply.github.com>
Co-authored-by: David Kilfoyle <41695641+kilfoyle@users.noreply.github.com>
|
@florent-leborgne Following @kilfoyle 's suggestions, I've removed platform and status from the schema —- agree that they're redundant. @kilfoyle As per your last comment, are you happy with the proposed nesting mechanisms then? Would you also like to have support for nested groups? |
| # example: | | ||
| OPTIONAL | ||
| Multiline string. Can include tables, lists, code examples, etc. | ||
| ``` |
There was a problem hiding this comment.
We also talked about being able to specify default values, that can potentially be different per deployment/project type (maybe that's a different issue?)
There was a problem hiding this comment.
It's a good idea, but perhaps we could wait till we try apply the schema?
There was a problem hiding this comment.
LGTM! 🚀 Thank you.
I agree with Florent that the applies_to should be mandatory.
Are you happy with the proposed nesting mechanisms then? Would you also like to have support for nested groups?
Yes! I was thinking that the intent was to solve the nested groups issue, but I think probably this was intended for the "yaml config file" settings use case. No harm in supporting that. :-) For now I don't think nested groups is a requirement because it would add a lot of unwanted complexity to the yaml.
Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
florent-leborgne
left a comment
There was a problem hiding this comment.
LGTM, just commenting because I have some final comments to simplify
Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
|
@florent-leborgne Applied, thanks!! |
florent-leborgne
left a comment
There was a problem hiding this comment.
LGTM thanks! Let's see later for defaults handling
…stic#253746) ## Summary - Document `applies_to` support in the settings-gen YAML schema, including both mapping and inline list forms. - Document nested `settings` support for hierarchical settings, including inheritance and overrides. - Add a fully worked example showing multiple `applies_to` statements. Closes elastic#250871. ## LLM usage This PR was drafted with assistance from an LLM (OpenAI GPT-5.2). Made with [Cursor](https://cursor.com) --------- Co-authored-by: OpenAI GPT-5.2 <noreply@openai.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: David Kilfoyle <41695641+kilfoyle@users.noreply.github.com> Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
This updates the readme defining the schema for planned YAML-sourced configuration settings in the docs. Specifically: - Removes "Serverless" from the example since, at least as far as I'm aware, the config settings aren't supported on Serverless. - Remove `Replace "ga" with` since I think that's a bit unclear if someone is adding in a new section for a new setting. @theletterf - Sorry I didn't catch these things in your previous PR: #253746
This updates the readme defining the schema for planned YAML-sourced configuration settings in the docs. Specifically: - Removes "Serverless" from the example since, at least as far as I'm aware, the config settings aren't supported on Serverless. - Remove `Replace "ga" with` since I think that's a bit unclear if someone is adding in a new section for a new setting. @theletterf - Sorry I didn't catch these things in your previous PR: elastic#253746
This updates the readme defining the schema for planned YAML-sourced configuration settings in the docs. Specifically: - Removes "Serverless" from the example since, at least as far as I'm aware, the config settings aren't supported on Serverless. - Remove `Replace "ga" with` since I think that's a bit unclear if someone is adding in a new section for a new setting. @theletterf - Sorry I didn't catch these things in your previous PR: elastic#253746
This updates the readme defining the schema for planned YAML-sourced configuration settings in the docs. Specifically: - Removes "Serverless" from the example since, at least as far as I'm aware, the config settings aren't supported on Serverless. - Remove `Replace "ga" with` since I think that's a bit unclear if someone is adding in a new section for a new setting. @theletterf - Sorry I didn't catch these things in your previous PR: elastic#253746
Summary
applies_tosupport in the settings-gen YAML schema, including both mapping and inline list forms.settingssupport for hierarchical settings, including inheritance and overrides.applies_tostatements.Closes #250871.
LLM usage
This PR was drafted with assistance from an LLM (OpenAI GPT-5.2).
Made with Cursor