Quarkus: Add support for YAML configuration files

Created on 6 Sep 2019  路  23Comments  路  Source: quarkusio/quarkus

Some people prefer yaml for the hierarchical configuration structure we have.
It would be useful I think to support it as an extra configsource https://github.com/eclipse/microprofile-config/blob/master/spec/src/main/asciidoc/configsources.asciidoc

application.yaml

and make sure we enlist that file for hot reload etc (everywhere application.properties is used really).

As for priority, we could decide it's the .properties priority + 1 (no strong preference).

Anyone against this?
CC @stuartwdouglas @kenfinnigan @dmlloyd

I don't think it needs to be documented beyond the configuration guide.

I was wondering if it could/should be an optional extension. Not sure how tied to core it is.

areconfig aresmallrye kinenhancement pinned

Most helpful comment

The PR smallrye/smallrye-config#197 has been merged. There are a couple of things blocking the SmallRye Config 1.5 release that I'll try to work out.

All 23 comments

Should be easy to do as an extension, if not then we should make sure we have good SPI's to make it easy.

I'd like to contribute on this one.

Yaml support makes sense, seeing things in a structured way can be beneficial

There is https://github.com/microprofile-extensions/config-ext/tree/master/configsource-yaml and it seems that there are plans to move that to Smallrye-Config. Maybe it would be nice to consider that when developing this solution ;)

Yeah that'd be the right way to do it. Making the priority be one higher than the properties is fine too.

Would we also want a microprofile-config.yaml to be supported?

@dmlloyd yeah, I think that would be nice too

So @gwenneg you can start from https://github.com/microprofile-extensions/config-ext/tree/master/configsource-yaml, see if that fits our need and when it's in SmallRye, we can decide to rely on it. In the mean time we can just copy it over. I don't think I'm fan of all the options they have but we don't have to expose them.

And try and do it as an extension.

Let us know if you see things unclear.

@emmanuelbernard is there a timeframe for application.yaml support in Quarkus? It'll have a significant impact on our Quarkus tooling, so we need to plan accordingly. cc @angelozerr

Nothing that I am aware of. When someone start that work, please ping fred and angelo.

Are you still working on it @gwenneg ? Otherwise I may have a look

@gastaldi Yes, I am. I was away for a week so it didn't progress much, but this is now on top of my priority list.

@fbricon @angelozerr I'll submit a PR shortly, so the YAML configuration should be part of 0.25.0 hopefully.

@gwenneg thank a lot for your feedback, I create the issue https://github.com/redhat-developer/quarkus-ls/issues/112 to try to support YAML configuration.

I created https://github.com/smallrye/smallrye-config/issues/171 in the smallrye-config side

@angelozerr There's an opened discsussion in #4525 about the integration SmallRye Config into the YAML configuration extension. The extension availibility might be delayed depending on the conclusion of this discussion.

Thank's again @gwenneg for ping me. We will see with @fbricon when and how we could support yaml config file with our Quarkus Language Server.

This issue/pullrequest has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Let's keep it open!

any updates of ETA on this?

@hguerrero For now, we're waiting for an upstream PR merge into smallrye-config (https://github.com/smallrye/smallrye-config/pull/174).

I think I'll work on getting this through today.

The PR smallrye/smallrye-config#197 has been merged. There are a couple of things blocking the SmallRye Config 1.5 release that I'll try to work out.

Was this page helpful?
0 / 5 - 0 ratings