Skip to content

[Filestream] Always render boolean options with default true - #20876

Open
belimawr wants to merge 2 commits into
elastic:mainfrom
belimawr:fix-filestream-defaults
Open

[Filestream] Always render boolean options with default true#20876
belimawr wants to merge 2 commits into
elastic:mainfrom
belimawr:fix-filestream-defaults

Conversation

@belimawr

@belimawr belimawr commented Aug 24, 2026

Copy link
Copy Markdown
Member

Proposed commit message

Some options that have true as default were only rendered if set to true preventing uses from setting it to false, which effectively renders the UI toggle useless.

This commit fixes it by always rendering those options, no matter if they're set to true or false.

Assisted-by: gpt-5.6-terra-high

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

## Author's Checklist

How to test this PR locally

Run the tests

cd packages/filestream
elastic-package test policy

Manual test

1. Verify default values in Kibana

Create a Filestream package policy without overriding recursive_glob or clean_removed. In Kibana, use the agent policy's View policy option and locate the generated filestream input.

Expected: the rendered policy contains prospector.scanner.recursive_glob: true and clean_removed: true.

2. Verify disabled values are rendered

Disable the toggle for 'Recursive Glob' and 'Recursive Glob'.

Expected: the rendered policy contains prospector.scanner.recursive_glob: false and clean_removed: false.

## Related issues
## Screenshots

Some options that have true as default were only rendered if set to
true preventing uses from setting it to false, which effectively
renders the UI toggle useless.

This commit fixes it by always rendering those options, no matter if
they're set to true or false.

Assisted-by: gpt-5.6-terra-high
@belimawr
belimawr force-pushed the fix-filestream-defaults branch from b18e63c to 8defb63 Compare August 24, 2026 14:02
@github-actions

Copy link
Copy Markdown
Contributor

✅ Elastic Docs Style Checker (Vale)

No issues found on modified lines!


The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale.

Assisted-by: gpt-5.6-terra-high
@belimawr belimawr self-assigned this Aug 24, 2026
@belimawr belimawr added the Team:Elastic-Agent-Data-Plane Agent Data Plane team [elastic/elastic-agent-data-plane] label Aug 24, 2026
@belimawr
belimawr marked this pull request as ready for review August 24, 2026 14:29
@belimawr
belimawr requested a review from a team as a code owner August 24, 2026 14:29
@belimawr
belimawr requested review from AndersonQ and leehinman and a lite review from Copilot August 24, 2026 14:29
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates Filestream policy rendering so boolean options defaulting to true are explicitly rendered and can be set to false.

Changes:

  • Adds the clean_removed: true default and bumps the package version.
  • Always renders recursive_glob and clean_removed.
  • Adds changelog documentation and policy tests for defaults and false overrides.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Summary
packages/filestream/manifest.yml Adds the clean_removed default and updates the version.
packages/filestream/changelog.yml Documents the bug fix.
packages/filestream/agent/input/filestream.yml.hbs Always renders both boolean options.
packages/filestream/_dev/test/policy/test-true-defaults.yml Tests default values.
packages/filestream/_dev/test/policy/test-true-defaults.expected Verifies rendered true defaults.
packages/filestream/_dev/test/policy/test-false-overrides.yml Tests false overrides.
packages/filestream/_dev/test/policy/test-false-overrides.expected Verifies rendered false values.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

✅ All changelog entries have the correct PR link.

@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

💚 Build Succeeded

cc @belimawr

@mergify

mergify Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team:Elastic-Agent-Data-Plane Agent Data Plane team [elastic/elastic-agent-data-plane]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants