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

[Console] Filter autocomplete endpoints by availability #161781

Merged

Conversation

ElenaStoeva
Copy link
Contributor

@ElenaStoeva ElenaStoeva commented Jul 12, 2023

Closes #160160

Summary

This PR adds functionality to the new autocomplete generation script for creating an availability property in the spec files that is used for filtering out endpoints that are not available in the current environment (e.g. serverless or stack). It also adds a config setting in the console plugin that specifies the current environment. This setting is also configured accordingly for serverless.

How to test

  1. Checkout the ES specification repo
  2. Run the command with node scripts/generate_console_definitions.js --source <ES_SPECIFICATION_REPO> --emptyDest where <ES_SPECIFICATION_REPO> is the absolute path to the root of the ES specification repo
  3. Start the classic Kibana and verify that Console suggests only endpoints that are available in the stack environment.
  4. Start Kibana in any of the serverless modes and verify that Console suggests only endpoints that are available in the serverless environment.

Here are some example endpoints that can be used for testing:

Endpoint Available in Stack Available in Serverless
POST _bulk Yes Yes
DELETE _security/oauth2/token Yes No

@ElenaStoeva ElenaStoeva added Feature:Console Dev Tools Console Feature Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more release_note:skip Skip the PR/issue when compiling release notes labels Jul 12, 2023
@ElenaStoeva ElenaStoeva self-assigned this Jul 12, 2023
Copy link
Contributor

@yuliacech yuliacech left a comment

Choose a reason for hiding this comment

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

Hi @ElenaStoeva, thanks a lot for working on this feature! I did an initial code review and changes LGTM. Also tested locally and the endpoints are correctly filtered out.

@ElenaStoeva
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

merge conflict between base and head

@ElenaStoeva ElenaStoeva marked this pull request as ready for review July 13, 2023 15:23
@ElenaStoeva ElenaStoeva requested review from a team as code owners July 13, 2023 15:23
@elasticmachine
Copy link
Contributor

Pinging @elastic/platform-deployment-management (Team:Deployment Management)

Copy link
Contributor

@yuliacech yuliacech left a comment

Choose a reason for hiding this comment

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

Thanks a lot for adding the tests, @ElenaStoeva!
Tested locally and everything works as expected 👍

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 14 16 +2
securitySolution 411 415 +4
total +6

Total ESLint disabled count

id before after diff
enterpriseSearch 15 17 +2
securitySolution 490 494 +4
total +6

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @ElenaStoeva

Copy link
Contributor

@thomheymann thomheymann left a comment

Choose a reason for hiding this comment

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

security changes LGTM

@ElenaStoeva ElenaStoeva merged commit 6bc2ee2 into elastic:main Jul 14, 2023
@ElenaStoeva ElenaStoeva deleted the serverless-console-autocomplete-endpoints branch July 14, 2023 09:29
@kibanamachine kibanamachine added v8.10.0 backport:skip This commit does not require backporting labels Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Console Dev Tools Console Feature release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v8.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Console] Filter autocomplete suggestions for unavailable endpoints in Serverless
7 participants