Skip to content
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

Unable to override composable templates settings #1203

Closed
faudebert opened this issue Dec 17, 2020 · 0 comments · Fixed by #1737
Closed

Unable to override composable templates settings #1203

faudebert opened this issue Dec 17, 2020 · 0 comments · Fixed by #1737
Assignees
Labels
bug Something isn't working ready Issues we'd like to address in the future.

Comments

@faudebert
Copy link

faudebert commented Dec 17, 2020

Description of the problem including expected versus actual behavior:

When running scripts/generator.py with --template-setting, generated/elasticsearch/template.json is partially overridden with provided custom values. That is, if specified, mappings are properly overridden but template settings part always remains to its default.

Steps to reproduce:

  1. Check template-settings.json content (only index_patterns here for brevity)
$ grep index_patterns usage-example/fields/template-settings.json
  "index_patterns": ["acme-weblogs-*"],
  1. Run generator.py:
$ python scripts/generator.py --ref v1.6.0 \
  --subset            usage-example/fields/subset.yml \
  --include           usage-example/fields/custom/ \
  --out               usage-example/ \
  --template-settings usage-example/fields/template-settings.json \
  --mapping-settings  usage-example/fields/mapping-settings.json
  1. Check template.json content (again, only index_patterns for brevity):
$ grep -A 2 index_patterns usage-example/generated/elasticsearch/template.json
  "index_patterns": [
    "try-ecs-*"
  ],

We are expecting "acme-weblogs-*".

Any additional context:

Reading the source, it looks defaults are hardcoded in save_composable_template() while its legacy equivalent is calling template_settings() which is reading the user-provided file.

@faudebert faudebert added the bug Something isn't working label Dec 17, 2020
@faudebert faudebert changed the title Unable to fully override composable templates Unable to override composable templates settings Dec 18, 2020
faudebert added a commit to opendatasoft/ecs that referenced this issue Dec 18, 2020
faudebert added a commit to opendatasoft/ecs that referenced this issue Dec 18, 2020
@kgeller kgeller added the ready Issues we'd like to address in the future. label Jun 29, 2021
@kgeller kgeller self-assigned this Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready Issues we'd like to address in the future.
Projects
None yet
2 participants