-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
Currently, if a page in the documentation contains code that requires a license, it must specify the appropriate license in the "testenv" attribute at the top of the page so that the code is skipped from OSS tests. For example:
https://github.com/elastic/elasticsearch/blob/master/docs/reference/ilm/set-up-lifecycle-policy.asciidoc
https://github.com/elastic/elasticsearch/edit/master/docs/reference/ccr/getting-started.asciidoc
https://github.com/elastic/elasticsearch/blob/master/docs/reference/rollup/rollup-getting-started.asciidoc
This functionality was added when X-Pack was merged per #31619 and
https://github.com/elastic/elasticsearch/blob/master/buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/RestTestsFromSnippetsTask.groovy#L264-L274
However, I think we should stop using testenv attributes and instead assume a trial or platinum license level for all documentation tests because:
- We no longer publish OSS-only documentation
- The https://www.elastic.co/subscriptions website is supposed to be the source of truth for figuring out which features are in a particular license. We should not have to specify it on a page-by-page basis.
NOTE: This limitation does not apply to documentation in the x-pack/docs/ folder, where I believe it already assumes the tests are running with a platinum license. I think this type of problem with testing code snippets was one of the major factors in not moving that content into the docs/reference folder.