-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Test export commands in all Beats #20016
Conversation
Pinging @elastic/siem (Team:SIEM) |
💔 Tests FailedExpand to view the summary
Build stats
Test stats 🧪
Test errorsExpand to view the tests failures
Steps errorsExpand to view the steps failures
Log outputExpand to view the last 100 lines of log output
|
Pinging @elastic/integrations (Team:Integrations) |
Merged with unrelated CI errors |
…ngs-archive * upstream/master: (274 commits) Test export commands in all Beats (elastic#20016) [Ingest Manager] Allow using drop path for agent build (elastic#20019) [DOCS] Remove include for deleted file in monitoring docs (elastic#20038) Removing xpack.monitoring.* settings (elastic#18608) [Heartbeat] Add service_name option for APM integration (elastic#19932) [Elastic Agent] Fix merging of fleet.yml. Add --staging to enroll cmd. (elastic#20026) Stricter stalebot configuration for PRs (elastic#20004) [ci] Favor direct mage invocation on CI (elastic#19960) Add cloudwatch input into Filebeat configure inputs documentation (elastic#19973) [Filebeat] remove delimiter \n from log line in s3 input (elastic#19972) [Metricbeat] Update MySQL dashboard (elastic#19913) Packetbeat process monitor: Ignore missing /proc/net/tcp6 (elastic#19945) [CI] fix MODULE variable cornercases (elastic#19985) Ignore timestamp in fortinet/clientendpoint and netscout/sightline (elastic#19998) add 7.9 to .backportrc.json (elastic#19952) Update internal links to external (elastic#19947) Remove Dynamic Script Compilations warning in Cisco module (elastic#19840) [Elastic Agent] Fix RPM and DEB packaging for Elastic Agent (elastic#19959) [Ingest Manager] Do not compare err with custom type (elastic#19980) Fix nanocore sum for non default intervals on Kubernetes Overview Dashboard (elastic#19675) ...
…nly-mod * upstream/master: (75 commits) Test export commands in all Beats (elastic#20016) [Ingest Manager] Allow using drop path for agent build (elastic#20019) [DOCS] Remove include for deleted file in monitoring docs (elastic#20038) Removing xpack.monitoring.* settings (elastic#18608) [Heartbeat] Add service_name option for APM integration (elastic#19932) [Elastic Agent] Fix merging of fleet.yml. Add --staging to enroll cmd. (elastic#20026) Stricter stalebot configuration for PRs (elastic#20004) [ci] Favor direct mage invocation on CI (elastic#19960) Add cloudwatch input into Filebeat configure inputs documentation (elastic#19973) [Filebeat] remove delimiter \n from log line in s3 input (elastic#19972) [Metricbeat] Update MySQL dashboard (elastic#19913) Packetbeat process monitor: Ignore missing /proc/net/tcp6 (elastic#19945) [CI] fix MODULE variable cornercases (elastic#19985) Ignore timestamp in fortinet/clientendpoint and netscout/sightline (elastic#19998) add 7.9 to .backportrc.json (elastic#19952) Update internal links to external (elastic#19947) Remove Dynamic Script Compilations warning in Cisco module (elastic#19840) [Elastic Agent] Fix RPM and DEB packaging for Elastic Agent (elastic#19959) [Ingest Manager] Do not compare err with custom type (elastic#19980) Fix nanocore sum for non default intervals on Kubernetes Overview Dashboard (elastic#19675) ...
This adds 4 new integration tests to all Beats that test export commands: > beatname export ilm-policy > beatname export template > beatname export index-pattern > beatname export config
…igration.6_to_7.enabled (#20574) * Test export commands in all Beats (#20016) This adds 4 new integration tests to all Beats that test export commands: > beatname export ilm-policy > beatname export template > beatname export index-pattern > beatname export config * [Filebeat] Add export tests to x-pack/filebeat (#20156) * Add export tests to x-pack/filebeat Add export sub-command tests to x-pack/filebeat and add an assertion for the size the Kibana index-pattern due to the Kibana API limiting payloads to 1 MiB. * Assert size of index pattern document is less than 1 MiB * Fix Winlogbeat export index-pattern with migration.6_to_7.enabled (#20540) - Test export index-pattern with migration.6_to_7.enabled=true - Always run these tests, not only when integration testing - Remove conflicting Winlogbeat alias * Changelog entry Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
… with migration.6_to_7.enabled (elastic#20574) * Test export commands in all Beats (elastic#20016) This adds 4 new integration tests to all Beats that test export commands: > beatname export ilm-policy > beatname export template > beatname export index-pattern > beatname export config * [Filebeat] Add export tests to x-pack/filebeat (elastic#20156) * Add export tests to x-pack/filebeat Add export sub-command tests to x-pack/filebeat and add an assertion for the size the Kibana index-pattern due to the Kibana API limiting payloads to 1 MiB. * Assert size of index pattern document is less than 1 MiB * Fix Winlogbeat export index-pattern with migration.6_to_7.enabled (elastic#20540) - Test export index-pattern with migration.6_to_7.enabled=true - Always run these tests, not only when integration testing - Remove conflicting Winlogbeat alias * Changelog entry Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co> (cherry picked from commit 9ec7549)
…igration.6_to_7.enabled (#20628) * Cherry-pick #20540 to 7.x: Fix Winlogbeat export index-pattern with migration.6_to_7.enabled (#20574) * Test export commands in all Beats (#20016) This adds 4 new integration tests to all Beats that test export commands: > beatname export ilm-policy > beatname export template > beatname export index-pattern > beatname export config * [Filebeat] Add export tests to x-pack/filebeat (#20156) * Add export tests to x-pack/filebeat Add export sub-command tests to x-pack/filebeat and add an assertion for the size the Kibana index-pattern due to the Kibana API limiting payloads to 1 MiB. * Assert size of index pattern document is less than 1 MiB * Fix Winlogbeat export index-pattern with migration.6_to_7.enabled (#20540) - Test export index-pattern with migration.6_to_7.enabled=true - Always run these tests, not only when integration testing - Remove conflicting Winlogbeat alias Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co> (cherry picked from commit 9ec7549)
This adds 4 new integration tests to all Beats that test export commands: > beatname export ilm-policy > beatname export template > beatname export index-pattern > beatname export config
… with migration.6_to_7.enabled (elastic#20628) * Cherry-pick elastic#20540 to 7.x: Fix Winlogbeat export index-pattern with migration.6_to_7.enabled (elastic#20574) * Test export commands in all Beats (elastic#20016) This adds 4 new integration tests to all Beats that test export commands: > beatname export ilm-policy > beatname export template > beatname export index-pattern > beatname export config * [Filebeat] Add export tests to x-pack/filebeat (elastic#20156) * Add export tests to x-pack/filebeat Add export sub-command tests to x-pack/filebeat and add an assertion for the size the Kibana index-pattern due to the Kibana API limiting payloads to 1 MiB. * Assert size of index pattern document is less than 1 MiB * Fix Winlogbeat export index-pattern with migration.6_to_7.enabled (elastic#20540) - Test export index-pattern with migration.6_to_7.enabled=true - Always run these tests, not only when integration testing - Remove conflicting Winlogbeat alias Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co> (cherry picked from commit 66cfa25)
What does this PR do?
This adds 4 new integration tests to all Beats that test export commands:
Why is it important?
In the past we've been hit by some of the export commands failing and there was no test to check that. There's generic tests in libbeat using mockbeat, but in the case of fields definitions, the export command might fail due to problems with the fields built into a particular Beat.
For example, if a Filebeat module defines a field that duplicates a field defined in another place, this was silently accepted but it would cause
filebeat export index-pattern
to fail with:These new tests will validate that the export commands work for each individual Beat. Actual validation is limited to checking that the command succeeds and that it returns a valid JSON (ilm-policy, template, index-pattern) or YAML (config).
Ideally we would like to catch these kind of errors (esp. fields-definitions related errors) at an earlier stage, but it's worth having this last line of validation.
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files[ ] I have added an entry inCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.