Skip to content

Conversation

@teresaromero
Copy link
Contributor

@teresaromero teresaromero commented Oct 17, 2025

What does this PR do?

  • Adds validation rule for input type packages regarding the template_path at the policy_template
  • Changes the input spec to have the field template_path required

Why is it important?

When an input package does not define its template_path at the policy_templates objects, fleet throws an error
here

This is caused because, the stream created from the input here has an undefined template_path. For inputs, there is no default value.

When a value is defined at template_path, fleet looks for the asset taking into account it ends with the given value here so it might be under the agents/input folder, or any other as long as it ends with the value.

Checklist

  • Added unit tests for the validation rule

  • I have added test packages to test/packages that prove my change is effective.

  • I have added an entry in spec/changelog.yml.

Related issues

Resolves partially #703

@teresaromero teresaromero requested a review from a team as a code owner October 17, 2025 12:45
@teresaromero teresaromero changed the title Add validation for ´template_path´ at input packages Add validation for template_path at input packages Oct 17, 2025
@teresaromero
Copy link
Contributor Author

test integrations

@elastic-vault-github-plugin-prod

Created or updated PR in integrations repository to test this version. Check elastic/integrations#15689

Copy link
Contributor

@mrodm mrodm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Just a doubt about the type used for Type field.-

@elasticmachine
Copy link

💚 Build Succeeded

History

Copy link
Contributor

@mrodm mrodm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@teresaromero teresaromero merged commit d6a02c1 into elastic:main Oct 22, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants