[Console] Set up a folder for manual definitions files#162652
Merged
yuliacech merged 13 commits intoelastic:mainfrom Aug 2, 2023
Merged
[Console] Set up a folder for manual definitions files#162652yuliacech merged 13 commits intoelastic:mainfrom
yuliacech merged 13 commits intoelastic:mainfrom
Conversation
…r, update readme files
Contributor
|
Pinging @elastic/platform-deployment-management (Team:Deployment Management) |
alisonelizabeth
approved these changes
Aug 1, 2023
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
Contributor
Author
|
Thanks a lot for the review and for the tip about tests, @alisonelizabeth! |
💚 Build Succeeded
Metrics [docs]Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
jeramysoucy
approved these changes
Aug 2, 2023
Contributor
jeramysoucy
left a comment
There was a problem hiding this comment.
Security-owned changes LGTM!
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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
manualfolder is empty because there were no definitions present in the foldergeneratedthat 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
generatedfolder. Several files in theoverridesfolder 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.