Skip to content

Conversation

@edh-oss
Copy link
Contributor

@edh-oss edh-oss commented Oct 17, 2021

Changes:

  • Removes several [testenv="gold+"] attributes from the docs. gold+ is not a valid subscription level or testenv value.
  • Moves two [testenv="basic"] attributes to the file header. This makes the testenv placement consistent and fixes the yml file generated from docs/reference/snapshot-restore/register-repository.asciidoc.

Original text

This PR is doing three things:

  • It allows for the testenv attribute to be set to "gold+"
  • It makes the placement of testenv attribute settings consistent, always in doc headers (as 328 out of 332 currently do)
  • It fixes the yml file generated from docs/reference/snapshot-restore/register-repository.asciidoc

Current code in RestTestsFromSnippetsTask allows for testenv to have one of four values: basic, gold, platinum or enterprise. In the asciidoc files, five are in use. The fifth is "gold+", which appears in eight files under "docs/reference/commands". None of those eight files contains a test snippet, so the value of testenv is never checked and never used. If any of them were to contain a test snippet, an exception would result. This PR assumes that "gold+" actually is a valid value for testenv, and updates RestTestsFromSnippetsTask accordingly.

There are 332 asciidoc files that set the testenv attribute. 328 of them put that statement in the doc header. I've updated the other four. For three of the four, the generated yaml is unchanged. The fourth of those files is register-repository.asciidoc.

In register-repository.asciidoc, the testenv attribute is set between the first test snippet and a series of corresponding "TEST[continued]" snippets. This placement means that, at least for the purposes of yaml generation, setting the attribute does nothing. If it's set at the top of the file, in the document header, then "xpack" is added to each snippets' list of skipped features. I believe the latter to be the expected behavior, and this CR makes the corresponding update.

@elasticsearchmachine elasticsearchmachine added v8.0.0 external-contributor Pull request authored by a developer outside the Elasticsearch team labels Oct 17, 2021
@jrodewig jrodewig added :Delivery/Build Build or test infrastructure >docs General docs changes labels Oct 26, 2021
@elasticmachine elasticmachine added Team:Delivery Meta label for Delivery team Team:Docs Meta label for docs team labels Oct 26, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

@elasticmachine
Copy link
Collaborator

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

@jrodewig jrodewig self-requested a review October 26, 2021 22:23
@jrodewig
Copy link
Contributor

Thanks @edh-oss. This looks great!

The fifth is "gold+", which appears in eight files under "docs/reference/commands". None of those eight files contains a test snippet, so the value of testenv is never checked and never used.

I pushed a commit to remove the gold+ value. The testenv values align with our subscription levels, and there isn't a gold+ or equivalent level.

I also removed [role="xpack"] attributes from any edited files. With elastic/docs#2213, these attributes no longer do anything in 7.11+ branches. There are other [role="xpack"] instances throughout the docs, but we can remove those as a separate effort.

@jrodewig
Copy link
Contributor

@elasticmachine ok to test

@jrodewig
Copy link
Contributor

jrodewig commented Oct 27, 2021

Apologies for the extra commits and noise. I initially removed some [testenv="basic"] instances too. We now run our snippet tests in a basic env by default so I don't think these serve much purpose aside from annotating the yml. However, I could be wrong, and it's worth discussing this more in another issue/PR.

Thanks again @edh-oss.

@jrodewig
Copy link
Contributor

@elasticmachine update branch

@jrodewig
Copy link
Contributor

@elasticmachine update branch

@jrodewig
Copy link
Contributor

@elasticmachine update branch

@jrodewig
Copy link
Contributor

@elasticmachine run elasticsearch-ci/part-2

@jrodewig jrodewig changed the title Updates related to testenv attributes in asciidoc files [DOCS] Remove [testenv="gold+"] Oct 27, 2021
@jrodewig jrodewig changed the title [DOCS] Remove [testenv="gold+"] [DOCS] Remove [testenv="gold+"] attributes Oct 27, 2021
@jrodewig jrodewig merged commit 3c23a9e into elastic:master Oct 27, 2021
elasticsearchmachine pushed a commit that referenced this pull request Oct 27, 2021
Changes:

* Removes several `[testenv="gold+"]` attributes from the docs. `gold+` is not a valid [subscription level](https://www.elastic.co/subscriptions) or testenv value.
* Moves two `[testenv="basic"]` attributes to the file header. This makes the `testenv` placement consistent and fixes the yml file generated from `docs/reference/snapshot-restore/register-repository.asciidoc`.

Co-authored-by: James Rodewig <[email protected]>

Co-authored-by: edh-oss <[email protected]>
elasticsearchmachine pushed a commit that referenced this pull request Oct 27, 2021
Changes:

* Removes several `[testenv="gold+"]` attributes from the docs. `gold+` is not a valid [subscription level](https://www.elastic.co/subscriptions) or testenv value.
* Moves two `[testenv="basic"]` attributes to the file header. This makes the `testenv` placement consistent and fixes the yml file generated from `docs/reference/snapshot-restore/register-repository.asciidoc`.

Co-authored-by: James Rodewig <[email protected]>

Co-authored-by: edh-oss <[email protected]>
elasticsearchmachine pushed a commit that referenced this pull request Oct 27, 2021
Changes:

* Removes several `[testenv="gold+"]` attributes from the docs. `gold+` is not a valid [subscription level](https://www.elastic.co/subscriptions) or testenv value.
* Moves two `[testenv="basic"]` attributes to the file header. This makes the `testenv` placement consistent and fixes the yml file generated from `docs/reference/snapshot-restore/register-repository.asciidoc`.

Co-authored-by: James Rodewig <[email protected]>

Co-authored-by: edh-oss <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
jrodewig added a commit that referenced this pull request Nov 5, 2021
Removes `testenv` annotations and related code. These annotations originally let you skip x-pack snippet tests in the docs. However, that's no longer possible.

Relates to #79309, #31619
elasticsearchmachine pushed a commit that referenced this pull request Nov 5, 2021
…80457)

Removes `testenv` annotations and related code. These annotations originally let you skip x-pack snippet tests in the docs. However, that's no longer possible.

Relates to #79309, #31619
elasticsearchmachine pushed a commit that referenced this pull request Nov 5, 2021
…80459)

Removes `testenv` annotations and related code. These annotations originally let you skip x-pack snippet tests in the docs. However, that's no longer possible.

Relates to #79309, #31619
# Conflicts:
#	docs/reference/ingest/range-enrich-policy-type-ex.asciidoc
#	docs/reference/migration/apis/feature_upgrade.asciidoc
#	docs/reference/ml/df-analytics/apis/get-trained-model-deployment-stats.asciidoc
#	docs/reference/ml/df-analytics/apis/infer-trained-model-deployment.asciidoc
#	docs/reference/ml/df-analytics/apis/put-trained-model-definition-part.asciidoc
#	docs/reference/ml/df-analytics/apis/put-trained-model-vocabulary.asciidoc
#	docs/reference/ml/df-analytics/apis/start-trained-model-deployment.asciidoc
#	docs/reference/ml/df-analytics/apis/stop-trained-model-deployment.asciidoc
#	docs/reference/slm/apis/slm-delete.asciidoc
#	docs/reference/slm/apis/slm-execute-retention.asciidoc
#	docs/reference/slm/apis/slm-execute.asciidoc
#	docs/reference/slm/apis/slm-get-status.asciidoc
#	docs/reference/slm/apis/slm-get.asciidoc
#	docs/reference/slm/apis/slm-start.asciidoc
#	docs/reference/slm/apis/slm-stats.asciidoc
#	docs/reference/slm/apis/slm-stop.asciidoc
#	docs/reference/sql/endpoints/client-apps/tableau-desktop.asciidoc
#	docs/reference/sql/endpoints/client-apps/tableau-server.asciidoc
#	docs/reference/transform/apis/upgrade-transforms.asciidoc
elasticsearchmachine pushed a commit that referenced this pull request Nov 5, 2021
…80458)

Removes `testenv` annotations and related code. These annotations originally let you skip x-pack snippet tests in the docs. However, that's no longer possible.

Relates to #79309, #31619
# Conflicts:
#	docs/reference/ml/df-analytics/apis/get-trained-model-deployment-stats.asciidoc
#	docs/reference/ml/df-analytics/apis/infer-trained-model-deployment.asciidoc
#	docs/reference/ml/df-analytics/apis/put-trained-model-definition-part.asciidoc
#	docs/reference/ml/df-analytics/apis/put-trained-model-vocabulary.asciidoc
#	docs/reference/ml/df-analytics/apis/start-trained-model-deployment.asciidoc
#	docs/reference/ml/df-analytics/apis/stop-trained-model-deployment.asciidoc
#	docs/reference/slm/apis/slm-delete.asciidoc
#	docs/reference/slm/apis/slm-execute-retention.asciidoc
#	docs/reference/slm/apis/slm-execute.asciidoc
#	docs/reference/slm/apis/slm-get-status.asciidoc
#	docs/reference/slm/apis/slm-get.asciidoc
#	docs/reference/slm/apis/slm-start.asciidoc
#	docs/reference/slm/apis/slm-stats.asciidoc
#	docs/reference/slm/apis/slm-stop.asciidoc
#	docs/reference/sql/endpoints/client-apps/tableau-desktop.asciidoc
#	docs/reference/sql/endpoints/client-apps/tableau-server.asciidoc
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 >docs General docs changes external-contributor Pull request authored by a developer outside the Elasticsearch team Team:Delivery Meta label for Delivery team Team:Docs Meta label for docs team v7.15.2 v7.16.0 v8.0.0-beta1 v8.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants