Skip to content

Fix the SQL docs for SHOW TABLES have misaligned examples #115285

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jackpan123
Copy link
Contributor

Fix the SQL docs for SHOW TABLES have misaligned examples (Closes #102565 )

@elasticsearchmachine elasticsearchmachine added needs:triage Requires assignment of a team area label external-contributor Pull request authored by a developer outside the Elasticsearch team v9.0.0 labels Oct 22, 2024
@gbanasiak gbanasiak added the :Analytics/SQL SQL querying label Oct 23, 2024
@elasticsearchmachine elasticsearchmachine added Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) and removed needs:triage Requires assignment of a team area label labels Oct 23, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@gbanasiak gbanasiak added the Team:Docs Meta label for docs team label Oct 23, 2024
@luigidellaquila luigidellaquila added the >docs General docs changes label Oct 23, 2024
@elasticsearchmachine
Copy link
Collaborator

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

@leemthompo
Copy link
Contributor

run docs-build

@leemthompo
Copy link
Contributor

@elasticmachine test this

Copy link
Contributor

@alex-spies alex-spies left a comment

Choose a reason for hiding this comment

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

Thank you @jackpan123 , that's certainly an improvement!

However, I think we should also update all .csv-spec files inside the following directories (offending tests can be found by looking for javaRestTest):

  • x-pack/plugin/sql/qa/server/src/main/resources/docs/
  • x-pack/plugin/sql/qa/server/src/main/resources/multi-cluster-with-security

This should cover all the csv-spec files that are used in docs. (I ran $ rgrep 'tag::' . to find csv tests that are tagged and can thus be included in docs.)

Would you mind taking care of that? Then I think we'll be able to merge this.

By the way: we have hundreds of other misaligned tests - all of them have in common that they use javaRestTest as cluster name instead of testCluster. A quick $ rgrep javaRestTest . inside x-pack/plugin/sql/qa/server/src/main/resources shows all potential relevant places.

@leemthompo , if you think javaRestTest being used as cluster name is too unfitting for the docs, we need to solve this differently. The cause for javaRestTest being used seems to be #86626 . A nicer solution would be to go and update our integration tests to manually set the cluster name to testCluster. But that would be much more effort.

@leemthompo
Copy link
Contributor

Thanks for the additional context @alex-spies

@leemthompo
Copy link
Contributor

Important

Elastic documentation is migrating to Markdown for version 9.0+. See the migration guide for details.

ℹ️ What's happening?

  • Starting January 29, we will start closing all unmerged documentation PRs targeting main/master
  • We're migrating from AsciiDoc to Markdown for 9.0+
  • 9.0 docs will be frozen from January 29 until February 20 2024
  • NOTE: PRs that include both code and documentation changes will remain open

What do I need to do?

For <=8.x docs:

  1. Rebase your PR to target the relevant 8.x branch instead
  2. The content can remain in AsciiDoc format

For 9.0+ docs:

Option 1:

  • Draft docs in Markdown
  • Once migration freeze ends, find the relevant page in the new docs system and use the edit options to submit your changes

Option 2:

💡 Need help?

  1. For Elasticians: Ask in #docs Slack channel
  2. For external contributors: Open an issue in elastic/docs-content

@jackpan123
Copy link
Contributor Author

@alex-spies I have already fixed all the .csv-spec files related to the name javaRestTest.

@jackpan123 jackpan123 requested a review from alex-spies February 5, 2025 08:38
Copy link
Contributor Author

@jackpan123 jackpan123 left a comment

Choose a reason for hiding this comment

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

I’ve fixed all the .csv-spec files for javaRestTest.

Copy link
Contributor

@alex-spies alex-spies left a comment

Choose a reason for hiding this comment

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

Sorry to keep you waiting @jackpan123 . Now that our docs migration is done, I think we can move forward.

While I can still see some tests with javaRestTest being misaligned, these aren't tagged and thus aren't used in any docs. This PR helps align the tests that are being used in docs and is thus a good addition to our 8.19/8.18/8.17 docs.

As @leemthompo mentioned, unfortunately, this PR cannot go into our main branch as that's using a different doc format now altogether.

@jackpan123 , rebasing this onto the 8.19 branch may be tricky, but if you're still up for it, you could create another PR that branches off from the 8.19 branch and cherry-picks the 2 commits that contain changes here?

The changes themselves LGTM - we only need to target the correct branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/SQL SQL querying >docs General docs changes external-contributor Pull request authored by a developer outside the Elasticsearch team Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) Team:Docs Meta label for docs team v8.17.7 v8.18.2 v8.19.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SQL: improve examples of SHOW TABLES in the docs
6 participants