-
Notifications
You must be signed in to change notification settings - Fork 25.2k
LogsDB host
and timestamp
mappings tests
#114001
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
LogsDB host
and timestamp
mappings tests
#114001
Conversation
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
Adding such tests is done to capture issues observed by Kibana. See #113600. |
composed_of: ["logsdb-mappings"] | ||
|
||
- match: { error.type: "illegal_argument_exception" } | ||
- match: { error.reason: "composable template [logsdb-index-template] template after composition with component templates [logsdb-mappings] is invalid" } |
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.
This is not that informative.. any chance we can catch this and complain about @timestamp?
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 is just the top level exception message. There is another one saying
The timestamp field [@timestamp] does not exist in the data stream
I prefer not to change this as part of this PR...this tests just captures whatever the status is now.
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.
This PR is about adding tests for what current expected behavior is. We can consider improving the error message in a follow up PR. I suspect this error is data stream related and not logsdb related. There is data stream logic in place around @timestamp
.
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 think we should move this new yaml file to logsdb project. I don't think these very specific tests need to be part of yaml spec rest tests.
LGTM otherwise.
composed_of: ["logsdb-mappings"] | ||
|
||
- match: { error.type: "illegal_argument_exception" } | ||
- match: { error.reason: "composable template [logsdb-index-template] template after composition with component templates [logsdb-mappings] is invalid" } |
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.
This PR is about adding tests for what current expected behavior is. We can consider improving the error message in a follow up PR. I suspect this error is data stream related and not logsdb related. There is data stream logic in place around @timestamp
.
Ok I will move these tests there. |
@martijnvg I moved yaml rest tests to the losgdb xpack plugin. |
|
||
import static org.elasticsearch.test.cluster.FeatureFlag.FAILURE_STORE_ENABLED; | ||
|
||
public class LogsDBClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase { |
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.
Why not reuse LogsdbTestSuiteIT
class?
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 didn't see it was there...I had to merge main
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.
LGTM
@elasticmachine update branch |
I think this should also be back ported to 8.x? |
Yes |
@elasticmachine update branch |
💔 Backport failedThe backport operation could not be completed due to the following error:
You can use sqren/backport to manually backport by running |
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
Here we are testing mappings of `host` and `timestamp` fields as they are used as default fields to sort on when using LogsDB. LogsDB uses a `host.name` field mapped as a `keyword` and a `@timestamp` field, required by data streams. Some mappings throw errors as a result of incompatibilities when trying to merge object fields. Such errors are expected. (cherry picked from commit c4815b3)
Here we are testing mappings of `host` and `timestamp` fields as they are used as default fields to sort on when using LogsDB. LogsDB uses a `host.name` field mapped as a `keyword` and a `@timestamp` field, required by data streams. Some mappings throw errors as a result of incompatibilities when trying to merge object fields. Such errors are expected.
Here we are testing mappings of `host` and `timestamp` fields as they are used as default fields to sort on when using LogsDB. LogsDB uses a `host.name` field mapped as a `keyword` and a `@timestamp` field, required by data streams. Some mappings throw errors as a result of incompatibilities when trying to merge object fields. Such errors are expected. (cherry picked from commit c4815b3)
Here we are testing mappings of `host` and `timestamp` fields as they are used as default fields to sort on when using LogsDB. LogsDB uses a `host.name` field mapped as a `keyword` and a `@timestamp` field, required by data streams. Some mappings throw errors as a result of incompatibilities when trying to merge object fields. Such errors are expected.
Here we are testing mappings of
host
andtimestamp
fields as they areused as default fields to sort on when using LogsDB. LogsDB uses a
host.name
field mapped as akeyword
and a@timestamp
field, requiredby data streams. Some mappings throw errors as a result of incompatibilities
when trying to merge object fields. Such errors are expected.
See also #113600.