Skip to content

Synchronize license used for testing all documentation pages #51566

@lcawl

Description

@lcawl

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:

  1. We no longer publish OSS-only documentation
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions