Conversation
Run the aggregations tests v7 compat tests against the aggregations module and *not* the `rest-api-spec` module. This allows us to drop `rest-api-spec`'s dependency on the aggregations module and keep it "just the server" which is nice. There are a few side effects here that are ok: 1. We run all aggregations REST tests in the aggregations module. Even the ones in `rest-api-spec`. This means we run them twice. We plan to move all of the aggregations REST tests into the aggregations module anyway. 2. We now bundle the REST tests in the aggregations module into the tests that the clients run for their verification step. This should keep our clients from losing coverage.
|
Pinging @elastic/es-analytics-geo (Team:Analytics) |
| .toPath() | ||
| .resolve(RELATIVE_REST_CORE) | ||
| .resolve(RELATIVE_REST_PROJECT_RESOURCES) | ||
| .resolve(RELATIVE_TEST_PATH) |
There was a problem hiding this comment.
The old path didn't exist. I could have merged the paths some more but I don't feel particularly confident working on this code. I am a little worried what'll happen when I "fix" this. Will we start running tests we hadn't been running before? CI will tell me if any of them fail at least....
There was a problem hiding this comment.
Ah, so this was just wrong before I assume?
There was a problem hiding this comment.
I think so! The path didn't exist and nothing was ever copied.
There was a problem hiding this comment.
Indeed this is a bug. Fortunately it only impacts copying tests from core (includeCore) for modules that have the yaml-rest-compat-test plugin. It seems that this only impacts this aggs module.
However, while reviewing i see that we have 2 projects (enrich, watcher with security) attempting to copy some tests from xpack (includeXpack) that are not running the compat tests as they should be since the path to the x-pack tests is also wrong. I will followup on that in a different PR.
| task.skipTest("search.aggregation/210_top_hits_nested_metric/top_hits aggregation with sequence numbers", "#42809 the use nested path and filter sort throws an exception") | ||
| task.skipTest("search.aggregation/370_doc_count_field/Test filters agg with doc_count", "Uses profiler for assertions which is not backwards compatible") | ||
|
|
||
| task.addAllowedWarningRegex("\\[types removal\\].*") |
There was a problem hiding this comment.
These were all from the rest-api-spec module
| dependencies { | ||
| apis project(path: ':rest-api-spec', configuration: 'restSpecs') | ||
| freeTests project(path: ':rest-api-spec', configuration: 'restTests') | ||
| freeTests project(path: ':modules:aggregations', configuration: 'restTests') |
There was a problem hiding this comment.
The clients were going to lose tests every time we port things from rest-api-spec into the aggregations module without this.
martijnvg
left a comment
There was a problem hiding this comment.
I can't judge the change to YamlRestCompatTestPlugin, otherwise LGTM.
We run all aggregations REST tests in the aggregations module. Even the ones in rest-api-spec. This means we run them twice. We plan to move all of the aggregations REST tests into the aggregations module anyway.
This is a lesser concern to me, because it is temporary. Maybe we can move all core aggs yaml rest tests first in a followup change and then later move the actual aggs to the new module? I suspect most yaml tests will keep working without other changes, should just be a simple git move?
| // This dependency can be removed when aggregations and | ||
| // respective yaml test have been moved to aggregations module. | ||
| // See for the progress: https://github.com/elastic/elasticsearch/issues/90283 | ||
| module ':modules:aggregations' |
| .toPath() | ||
| .resolve(RELATIVE_REST_CORE) | ||
| .resolve(RELATIVE_REST_PROJECT_RESOURCES) | ||
| .resolve(RELATIVE_TEST_PATH) |
There was a problem hiding this comment.
Ah, so this was just wrong before I assume?
jakelandis
left a comment
There was a problem hiding this comment.
LGTM , thanks for fixing this.
Compatible REST tests (like normal REST tests) allow copying the tests from either `rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test` (includeCore) or `x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test` (includeXpack). Both are currently broken. #90851 fixes the former , and this commit fixes the later. The fix here is to ensure the correct path to the x-pack rest tests when pulling from the elder branch for compatible testing. This only impacts modules that have the compatibility plugin enabled and are configured to pull from the main x-pack set of tests. Currently, this should only impact `:x-pack:plugin:enrich:qa:rest` but will fix it for future projects with that configuration.
Run the aggregations tests v7 compat tests against the aggregations module and not the
rest-api-specmodule. This allows us to droprest-api-spec's dependency on the aggregations module and keep it "just the server" which is nice.There are a few side effects here that are ok:
rest-api-spec. This means we run them twice. We plan to move all of the aggregations REST tests into the aggregations module anyway.Relates to #90283