Skip to content

[Console] Set up a folder for manual definitions files#162652

Merged
yuliacech merged 13 commits intoelastic:mainfrom
yuliacech:console/manual_definitions_folder
Aug 2, 2023
Merged

[Console] Set up a folder for manual definitions files#162652
yuliacech merged 13 commits intoelastic:mainfrom
yuliacech:console/manual_definitions_folder

Conversation

@yuliacech
Copy link
Copy Markdown
Contributor

@yuliacech yuliacech commented Jul 27, 2023

Summary

Fixes #162564

This PR adds a new folder to Console server side where manually created definitions for endpoint will be stored. This is important before we switch to the new script. The logic in the new script is to clear the folder with generated definitions before re-generating them. That is not the case in the current script. The downside of that is when an endpoint is removed from the specifications, it won't be removed from autocomplete definitions automatically. Displaying autocomplete suggestions for unavailable endpoints might be confusing for users.

Currently, the manual folder is empty because there were no definitions present in the folder generated that would not be re-generated if the script would clear the folder and create all endpoints defined in ES json specs. I first suspected that endpoints from these 2 PRs (#162503, #158674) would need to be moved to the manual folder, but the definitions added there manually can be re-generated using the script.

I also removed several deprecated/deleted/renamed endpoints from the generated folder. Several files in the overrides folder needed renaming and one was deleted as deprecated.

There are also smaller renaming changes in this PR because I think the code is more difficult to understand when it's using "spec/specification" and "definition" interchangeably or even together as "SpecDefinitions". I believe we should use "specification" for the ES specifications (i.e. the source) and "definitions" or even better "autocomplete definitions" for the files that are used for Console autocomplete engine. The renaming is to be continued in follow up PRs.

I also added a unit test file for the SpecDefinitionsService since it contains a lot of important logic for endpoints such as loading generated definitions, overrides and manual ones and filtering out endpoints not available in the current context.

@yuliacech yuliacech added Feature:Console Dev Tools Console Feature Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// release_note:skip Skip the PR/issue when compiling release notes labels Jul 28, 2023
@yuliacech yuliacech marked this pull request as ready for review July 28, 2023 16:55
@yuliacech yuliacech requested a review from a team as a code owner July 28, 2023 16:55
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@yuliacech yuliacech added the ci:cloud-deploy Create or update a Cloud deployment label Jul 28, 2023
@kibanamachine kibanamachine requested a review from a team as a code owner July 31, 2023 18:27
@yuliacech yuliacech removed the request for review from a team August 1, 2023 14:25
Copy link
Copy Markdown
Contributor

@alisonelizabeth alisonelizabeth left a comment

Choose a reason for hiding this comment

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

Code LGTM. Thanks for adding tests!

Looks like a test may need to be updated to get CI green. I'm OK to merge once this is fixed.

Screenshot 2023-08-01 at 3 26 39 PM

Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
@yuliacech
Copy link
Copy Markdown
Contributor Author

Thanks a lot for the review and for the tip about tests, @alisonelizabeth!

@yuliacech yuliacech requested a review from a team as a code owner August 2, 2023 09:11
@yuliacech yuliacech enabled auto-merge (squash) August 2, 2023 09:12
@kibana-ci
Copy link
Copy Markdown

kibana-ci commented Aug 2, 2023

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
console 418.8KB 418.8KB +2.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
console 37 38 +1

Total ESLint disabled count

id before after diff
console 40 41 +1

History

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

Copy link
Copy Markdown
Contributor

@jeramysoucy jeramysoucy left a comment

Choose a reason for hiding this comment

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

Security-owned changes LGTM!

@yuliacech yuliacech merged commit fbfd3ed into elastic:main Aug 2, 2023
@kibanamachine kibanamachine added the backport:skip This PR does not require backporting label Aug 2, 2023
@yuliacech yuliacech deleted the console/manual_definitions_folder branch February 15, 2024 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting ci:cloud-deploy Create or update a Cloud deployment 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 t// v8.10.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Console] Set up a folder for manually created definitions

6 participants