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 persistent objects to code snippet testing #31978

Closed
lcawl opened this issue Jul 11, 2018 · 4 comments
Closed

Add persistent objects to code snippet testing #31978

lcawl opened this issue Jul 11, 2018 · 4 comments
Labels
:Delivery/Build Build or test infrastructure >docs General docs changes Team:Delivery Meta label for Delivery team Team:Docs Meta label for docs team

Comments

@lcawl
Copy link
Contributor

lcawl commented Jul 11, 2018

There are some code snippets that we currently cannot test because they require time to run and generate data.

For example, see #31439, which describes why testing could not be enabled for a forecasting scenario. The same is true for several machine learning APIs that try to query results (e.g. https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html).

@nik9000 noted that some core tests work around this with stuff like using the health api to wait for green. For example:

> - do 


cluster.health:

wait_for_status: yellow


There do not seem to be similar wait options for the machine learning case, however, so this issue proposes that we perhaps add a setup section when code snippet testing begins (e.g. to create some indices, add some data, and launch a simple machine learning job) and then not clean up those resources until the end of all the code snippet tests. This should allow sufficient time for some results to be generated that we can subsequently query in various pages in the documentation. NOTE: This setup would need to be skipped if -Dtests.distribution=oss-zip per #31619

@lcawl lcawl added the :Docs label Jul 11, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs

@nik9000
Copy link
Member

nik9000 commented Jul 11, 2018

I think it might be more appropriate to work around it with some sleight of hand in the docs tests but I'm really not sure at this point.

@rjernst rjernst added the Team:Docs Meta label for docs team label May 4, 2020
@jrodewig jrodewig added :Delivery/Build Build or test infrastructure >docs General docs changes and removed :Docs labels Sep 16, 2021
@elasticmachine elasticmachine added the Team:Delivery Meta label for Delivery team label Sep 16, 2021
@elasticmachine
Copy link
Collaborator

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

@lockewritesdocs
Copy link
Contributor

This issue hasn’t been updated in 3+ years so I’m closing it. I don't think that we'll revisit it.

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 Team:Delivery Meta label for Delivery team Team:Docs Meta label for docs team
Projects
None yet
Development

No branches or pull requests

6 participants