-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Use @ConfigMapping in SmallRye extensions #45757
Conversation
/cc @ebullient (metrics), @jmartisk (metrics) |
public Optional<Boolean> openapiIncluded; | ||
@WithName("openapi.included") | ||
@WithDefault("false") | ||
boolean openapiIncluded(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a weird reason, the config was split in two classes. I centralized everything in one class.
@ConfigRoot(phase = ConfigPhase.BUILD_TIME) | ||
@ConfigMapping(prefix = "quarkus.rabbitmq") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ozangunalp @cescoffier the config for the Messaging extensions is rather inconsistent. Some of them have quarkus.messaging.whatever
and some of them quarkus.whatever
. I would have expected the consistent quarkus.messaging
prefix.
It's out of the scope of this PR though and I will let you handle it once this is in if you want to adjust.
58316ea
to
dccdf78
Compare
🎊 PR Preview 7bf5b30 has been successfully built and deployed to https://quarkus-pr-main-45757-preview.surge.sh/version/main/guides/
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've seen a few places using @ConfigGroup
which shouldn't be required anymore.
|
||
/** | ||
* Abort a query if the total depth of the query exceeds the defined limit. Default to no limit | ||
*/ | ||
@ConfigItem | ||
public Optional<Integer> instrumentationQueryDepth; | ||
Optional<Integer> instrumentationQueryDepth(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional<Integer> instrumentationQueryDepth(); | |
OptionalInt instrumentationQueryDepth(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I addressed all of them.
|
||
/** | ||
* Abort a query if the total number of data fields queried exceeds the defined limit. Default to no limit | ||
*/ | ||
@ConfigItem | ||
public Optional<Integer> instrumentationQueryComplexity; | ||
Optional<Integer> instrumentationQueryComplexity(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional<Integer> instrumentationQueryComplexity(); | |
OptionalInt instrumentationQueryComplexity(); |
|
||
/** | ||
* The maximum number of raw whitespace tokens the parser will accept, after which an exception will be thrown. Default to | ||
* 200000 | ||
*/ | ||
@ConfigItem | ||
public Optional<Integer> parserMaxWhitespaceTokens; | ||
Optional<Integer> parserMaxWhitespaceTokens(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional<Integer> parserMaxWhitespaceTokens(); | |
OptionalInt parserMaxWhitespaceTokens(); |
|
||
/** | ||
* The maximum number of raw tokens the parser will accept, after which an exception will be thrown. Default to 15000 | ||
*/ | ||
@ConfigItem | ||
public Optional<Integer> parserMaxTokens; | ||
Optional<Integer> parserMaxTokens(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional<Integer> parserMaxTokens(); | |
OptionalInt parserMaxTokens(); |
@radcortez yeah I know we have a disagreement on it :). I personally prefer being explicit, both for documentation sake (you know it's a config group when you see it and because I'm not a big fan of magic - I have been hit by the bus too many times later). |
dccdf78
to
b64aef0
Compare
Also drop the deprecated configuration (it's present in at least one LTS as it has been deprecated in 3.14) and rationalize the config classes (we had two config classes with the exact same scope).
Also extract the config to a proper file.
b64aef0
to
b329543
Compare
This is now ready for review. |
Status for workflow
|
Ok :) |
Status for workflow
|
Created as draft to do a last review with the diff and check the whole CI.
Probably better reviewed commit per commit.
Part of #45446