Skip to content

Add syntax highlighting and validation to Yaml Authoring#13357

Closed
KyleMit wants to merge 1 commit intoelastic:masterfrom
KyleMit:master
Closed

Add syntax highlighting and validation to Yaml Authoring#13357
KyleMit wants to merge 1 commit intoelastic:masterfrom
KyleMit:master

Conversation

@KyleMit
Copy link

@KyleMit KyleMit commented Aug 27, 2019

This PR is probably in a pretty immature state and should probably get pulled into a feature branch and iterated on,, but just as a vehicle for sharing the code & idea.

It would be awesome to get some syntax highlighting, inline documentation, and immediate validation help by creating and maintaining a schema definition file for any yaml config files.

The most well supported way to do this seems to be using a json schema definition file and integrating with the YAML - Red Hat extension. This may perhaps be a subset of users, but would help a non trivial number of people to provide a standardized approach to updating configs with confidence.

Here's the authoring experience after a schema has been applied:

image

image

image

image

This schema should be a pretty good start on the yaml config for monitors, but there are some other options and other configs to document as well.

@KyleMit KyleMit requested a review from a team as a code owner August 27, 2019 13:55
@elasticmachine
Copy link
Contributor

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

1 similar comment
@elasticmachine
Copy link
Contributor

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@KyleMit
Copy link
Author

KyleMit commented Feb 20, 2020

FYI - Redhat recently updated their yaml extension to take advantage of conditional subschemas #222, so it should offer a really powerful way to compose yaml and provide insightful autocompletion for all elastic beats config properties

@ph ph added discuss Issue needs further discussion. Team:obs-ds-hosted-services Label for the Observability Hosted Services team labels Feb 28, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (:uptime)

@andrewvc
Copy link
Contributor

Super cool idea, we could possibly use it for validating configs as well (@urso thoughts?).

I'd like this to be part of a comprehensive schema validation definition so it doesn't get out of sync with the app however. I think we need this since today if you add a yaml key that doesn't exist there's no error.

@botelastic
Copy link

botelastic bot commented Jul 17, 2020

Hi!
We just realized that we haven't looked into this PR in a while. We're sorry!

We're labeling this issue as Stale to make it hit our filters and make sure we get back to it in as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1.
Thank you for your contribution!

@botelastic botelastic bot added the Stalled label Jul 17, 2020
@KyleMit
Copy link
Author

KyleMit commented Jul 20, 2020

👍

@botelastic botelastic bot removed the Stalled label Jul 20, 2020
@botelastic
Copy link

botelastic bot commented Aug 19, 2020

Hi!
We just realized that we haven't looked into this PR in a while. We're sorry!

We're labeling this issue as Stale to make it hit our filters and make sure we get back to it in as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1.
Thank you for your contribution!

@botelastic botelastic bot added the Stalled label Aug 19, 2020
@botelastic
Copy link

botelastic bot commented Sep 18, 2020

Hi!
This PR has been stale for a while and we're going to close it as part of our cleanup procedure.
We appreciate your contribution and would like to apologize if we have not been able to review it, due to the current heavy load of the team.
Feel free to re-open this PR if you think it should stay open and is worth rebasing.
Thank you for your contribution!

@botelastic botelastic bot closed this Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

discuss Issue needs further discussion. Stalled Team:obs-ds-hosted-services Label for the Observability Hosted Services team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants