Skip to content
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 compatibility tests to rest resources artifact #78534

Merged

Conversation

mark-vieira
Copy link
Contributor

@mark-vieira mark-vieira commented Sep 30, 2021

Include transformed compatibility tests in our rest-resources-zip artifact so that client testing can verify REST compatibility as well.

Core and x-pack tests will live in rest-api-spec/compatTest/free and rest-api-spec/compatTest/platinum respectively.

cc @philkra

@mark-vieira mark-vieira added >non-issue :Delivery/Build Build or test infrastructure labels Sep 30, 2021
@elasticmachine elasticmachine added the Team:Delivery Meta label for Delivery team label Sep 30, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-delivery (Team:Delivery)

Copy link
Contributor

@jakelandis jakelandis left a comment

Choose a reason for hiding this comment

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

compatibleApi will also need to be included. We don't transform the API, but we do have 2 different sets of API's on the classpath for compatiblitly testing. One directly from 7.x , and another from the yamlRestCompatTest sourceset (soon to be renamed) . For example, https://github.com/elastic/elasticsearch/tree/master/rest-api-spec/src/yamlRestCompatTest/resources/rest-api-spec/api is only found in master.

@mark-vieira
Copy link
Contributor Author

mark-vieira commented Oct 4, 2021

Good catch, Jake! I've added the compatibility specs into a separate subfolder rest-api-spec/compatApi.

@mark-vieira
Copy link
Contributor Author

@elasticmachine update branch

Copy link
Contributor

@jakelandis jakelandis left a comment

Choose a reason for hiding this comment

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

LGTM

@mark-vieira mark-vieira merged commit 2607693 into elastic:master Oct 5, 2021
@mark-vieira mark-vieira deleted the compatibility_rest_test_artifact branch October 5, 2021 19:02
jakelandis added a commit that referenced this pull request Oct 25, 2021
… qa module (#79501)

This commit moves where we the _xpack/* REST compatible tests are executed.
The _xpack/* prefix was deprecated in 7x and removed in 8.x via #35958.
However, when deprecated the paths were also removed from the API spec in 7x.
This means that these paths are not available to test with the YAML test framework.

As part of the work to support REST API compatibility for 8.x these _xpack prefix paths
were re-introduced when using compatibility. These paths were tested via the primary
x-pack YAML rest tests using custom specs and transformations. These custom specs are
needed to allow the testing framing work to use the _xpack/* paths and the transformations
tell the tests to use the _xpack prefix. To avoid re-introducing these prefix paths in the 7.x spec,
custom specs for the tests are used.

This worked well for testing on the server, but after introducing the compatibility
tests via the rest-resources-zip (#78534) the transformed tests in that zip
requires those custom specs to execute properly. Since these are re-introduced just
for testing we do not want to add these to the zip file of specs.

To allow the xpack prefix to continue to be tested AND allow the tests to execute
as-is via the specs/tests in the rest-resource-zip BUT do not expose the need for
custom specs in the zip file ; these tests have been moved to their own qa module.

As an implementation detail, the tests in the new qa module are transformed twice. Once
as determined by the main x-pack transforms for things like compatible type support, and
then once again solely for the purpose for testing the xpack prefix.
lockewritesdocs pushed a commit to lockewritesdocs/elasticsearch that referenced this pull request Oct 28, 2021
… qa module (elastic#79501)

This commit moves where we the _xpack/* REST compatible tests are executed.
The _xpack/* prefix was deprecated in 7x and removed in 8.x via elastic#35958.
However, when deprecated the paths were also removed from the API spec in 7x.
This means that these paths are not available to test with the YAML test framework.

As part of the work to support REST API compatibility for 8.x these _xpack prefix paths
were re-introduced when using compatibility. These paths were tested via the primary
x-pack YAML rest tests using custom specs and transformations. These custom specs are
needed to allow the testing framing work to use the _xpack/* paths and the transformations
tell the tests to use the _xpack prefix. To avoid re-introducing these prefix paths in the 7.x spec,
custom specs for the tests are used.

This worked well for testing on the server, but after introducing the compatibility
tests via the rest-resources-zip (elastic#78534) the transformed tests in that zip
requires those custom specs to execute properly. Since these are re-introduced just
for testing we do not want to add these to the zip file of specs.

To allow the xpack prefix to continue to be tested AND allow the tests to execute
as-is via the specs/tests in the rest-resource-zip BUT do not expose the need for
custom specs in the zip file ; these tests have been moved to their own qa module.

As an implementation detail, the tests in the new qa module are transformed twice. Once
as determined by the main x-pack transforms for things like compatible type support, and
then once again solely for the purpose for testing the xpack prefix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Build Build or test infrastructure >non-issue Team:Delivery Meta label for Delivery team v8.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants