-
Notifications
You must be signed in to change notification settings - Fork 458
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
Add system tests to logstash package #4443
Add system tests to logstash package #4443
Conversation
(cherry picked from commit 4df6b991a6db0cb851598c34063363d90f1c0749)
🌐 Coverage report
|
/test |
🚀 Benchmarks reportPackage
|
Data stream | Previous EPS | New EPS | Diff (%) | Result |
---|---|---|---|---|
slowlog |
4098.36 | 3344.48 | -753.88 (-18.39%) | 💔 |
To see the full report comment with /test benchmark fullreport
7d91acc
to
f050889
Compare
f050889
to
8bb0994
Compare
services: | ||
logstash: | ||
image: "docker.elastic.co/logstash/logstash:${ELASTIC_VERSION}" | ||
user: root |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The container needs to be accessed by root
user to have permission to write in the ${SERVICE_LOGS_DIR}
folder
services: | ||
logstash: | ||
image: "docker.elastic.co/logstash/logstash:${ELASTIC_VERSION}" | ||
user: root | ||
image: "docker.elastic.co/logstash/logstash:${ELASTIC_VERSION:-8.5.0-SNAPSHOT}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.env
file doesn't work in the CI, 8.5.0-SNAPSHOT
is the default value, in case the var is null. We need to figure out how to make this a dynamic value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we can create a variants.yml
file that defines all the versions we want to run the test suite against. The variable defined in the variants file are then available in the docker compose - see #4013 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah. nice! I'll try this
@@ -55,7 +55,7 @@ | |||
type: group | |||
fields: | |||
- name: stat | |||
type: group | |||
type: object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any difference between object and group types ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only difference here is that the static tests won't fail in case stat
receives a null
value. It will act as a json object too https://www.elastic.co/guide/en/elasticsearch/reference/current/object.html. In practice, I didn't see any difference
- name: load_average | ||
type: group | ||
fields: | ||
- name: 15m | ||
type: long | ||
type: half_float |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The agent mappings will become the source of truth and we should eventually align the metricbeat mappings (in ES and in metricbeat repo) on this version once we're confident. We could potentially improve the existing mappings tooling to be smarter so it can interpret the diffs and patch the repos accordingly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. This change was actually from a PR @matschaffer worked on, which I happen to have reviewed and remembered about. We need to be careful now when updating metricbeat mappings. Do we have any tooling to keep them aligned?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a script here but it only detects the deltas and we'd need something to act on them. With .monitoring-*
being source of truth it's difficult to automatically apply deltas to agent or metricbeat mappings because the latter have one definition per metricset while the former is just one json object, so we don't know the target metricset to patch unless we have a manual step in between. With the agent mappings being source of truth we could do the following:
- update agent mapping
- detect delta with
.monitoring-*
mapping and add/update/delete the entry. We can simply patch the json blob here - detect delta with the metricset's mappings in the metricbeat module. We have 1:1 relationship with data stream/metricset so we know which fields to update in the metricbeat module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking we should open a follow up issue to sweep mappings for other mis-alignments. We've had a number of recent tweaks to fix bugs that were ultimately rooted in things not being in sync between metricbeat and the ES-shipped templates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, @miltonhultgren beat me to it elastic/kibana#143439 :)
What does this PR do?
This PR adds system tests to the Logstash package
Checklist
I have added an entry to my package'schangelog.yml
file.How to test this PR locally
cd packages/logstash && elastic-package test system
Related issues