-
Notifications
You must be signed in to change notification settings - Fork 137
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
Added Support for YAML Configuration #110
base: master
Are you sure you want to change the base?
Conversation
@struberg could also review this one? |
I've rebased with |
5da434e
to
dbe6949
Compare
Similarly to before, rebased with Hoping both my PRs can be reviewed soon? ^-^' |
Any hope to drop snakeyaml dep? It has, as jackson, some cve open and a hard time to fix them so it is a nightmare for projects consuming it. Rest looks ok to me. |
We could drop it if that's desirable, but we'd need to either replace or DIY it. I thought SnakeYAML was a solid choice for two reasons:
There are other libraries endorsed on the YAML website that we could consider, excluding potential use of JNI:
Or alternatively, we could make something from scratch, though that'd be a lot of work. ^-^' |
Well just the parsing side is not a lot of work, in particular cause we don't care about the perf enhancements a lib like that can bring (thinking to memory optimization/buffer/cache). That said a very valid option for me would be to not do a yaml module but a generic The main issue with libs like that is the fact it enables mapping as well as generic deserialization - the only we care, right. Can it be a compromise? Else +1 to implement our own light parser. |
dbe6949
to
a2dd49a
Compare
Finally catching up with personal projects again, and reviewing old PRs related to them. For now, I've just rebased the changes with I'll have to look back at this and see what's the best approach. 🤔
@rmannibucau Do you think implementing a lightweight/read-only YAML parser that only loads properties into a |
@SethFalco I think it makes sense but while snakeyaml is extracted I'm also ok - btw v2 is out and fixes 1.33 CVE ;). A yaml-light support - a bit better than https://github.com/yupiik/fusion/blob/master/fusion-httpclient-parent/fusion-kubernetes-client/src/main/java/io/yupiik/fusion/kubernetes/client/internal/LightYamlParser.java which is limited to one kind of file - would make sense but due to the EE path I'm not sure it is worth the investment so I'll let you judge now. |
Ahh nice, I tried to check Maven Central before, but it was down when I was working on this.
If we're willing to use SnakeYAML, I would much prefer that, over the intricacies of writing the parser myself, even if derived from another project. But if other maintainers have any problem with this, do raise it, and I'll be willing to evaluate other options. I'm on the side of reducing maintenance by using the library, but I do appreciate the benefit of reducing code surface and dependency by going DIY. For now, I've updated this PR to the latest SnakeYAML version. For the APIs this project uses, there were no breaking changes, so all code remains the same and tests pass. |
eb4bb2d
to
1755645
Compare
1755645
to
e6cca92
Compare
Hey hey! Is there anything I can do to help get this merged soon? |
This adds a new module under
org.apache.deltaspike.modules:deltaspike-yaml-module-impl
, which includes an implementation ofConfigSource
for YAML support, and depends on snakeyaml.