-
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
Update MicroProfile Config to 3.1 #39233
Conversation
This comment has been minimized.
This comment has been minimized.
Hi @radcortez, which specific events do you have in mind? Could you be more specific pls? Also note that this validation applies to all |
Something like this: @ApplicationScoped
public class ConfigObserver {
public void onStartup(@Observes @Initialized(ApplicationScoped.class) final Object event,
@ConfigProperty(name = "this.property.does.not.exist") final String nonExistentConfigurationPropertyValue) {
}
}
It would only fail if there is no value for a non Optional / Instance / Supplier injection point, which would fail anyway in quarkus/extensions/arc/runtime/src/main/java/io/quarkus/arc/runtime/ConfigRecorder.java Line 32 in ac4354d
The issue here is that a regular injection point in an |
If I read the code correctly it's the other way around? For example, if
The goal of the |
Let me take a step back. The goal here is that What we did until now is to record the properties to validate in quarkus/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/ConfigBuildStep.java Lines 195 to 196 in 60c24cb
quarkus/extensions/arc/runtime/src/main/java/io/quarkus/arc/runtime/ConfigRecorder.java Line 32 in ac4354d
DeploymentException .
In this particular case, with the event and observer, it does not work. I know that the interceptor is not supposed to be used like that, but I couldn't find any other way to validate the injection point at runtime because the injection point for the event calls the producer on
Yes, For these cases, is there a way we can validate the injection point runtime value without using the interceptor? |
Do I understand it correctly that the exception type is the actual problem? Because
I see.
Directly in the |
Correct.
I guess it may work. We validate the values in |
72c87ef
to
2e4e2f1
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I've ended up following a different approach. Match the injection points required at static init and have two validation phases, one for static and another for runtime. |
I'd like to better understand our strategy regarding MicroProfile updates. Is this update part of a broader set of updates of the whole spec? |
extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/ConfigBuildStep.java
Outdated
Show resolved
Hide resolved
No, this is an update only for MP Config, still for MP 6.x
This can be merged separately. All other specs are already at their correct version for MP 6.x. |
This comment has been minimized.
This comment has been minimized.
@mkouba all good for you? |
I need to look again ;-) |
@mkouba let's try to get this merged this week? |
extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/ConfigBuildStep.java
Show resolved
Hide resolved
extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/ConfigBuildStep.java
Outdated
Show resolved
Hide resolved
extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/ConfigBuildStep.java
Show resolved
Hide resolved
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.
Looks good. I've added a few minor comments.
92d8e3e
to
6625d56
Compare
Comments addressed! |
Status for workflow
|
commit 4bfd3cc Merge: 76744d6 cfcd5a3 Author: Daniel Fiala <danfiala23@gmail.com> Date: Wed Apr 24 14:31:22 2024 +0200 Merge branch 'quarkusio:main' into grpc-transcoding commit 76744d6 Author: Daniel Fiala <danfiala23@gmail.com> Date: Wed Apr 24 14:17:07 2024 +0200 chore(transcoding): moved some generic methods to util classes commit cfcd5a3 Merge: 4945eaa 288a54d Author: Guillaume Smet <guillaume.smet@gmail.com> Date: Wed Apr 24 13:31:10 2024 +0200 Merge pull request quarkusio#40218 from gastaldi/bump_http Bump Quarkus HTTP to 5.2.2.Final commit 4945eaa Merge: ea41b08 7d56d5d Author: Sergey Beryozkin <sberyozkin@gmail.com> Date: Wed Apr 24 12:28:39 2024 +0100 Merge pull request quarkusio#40211 from sberyozkin/bc_fips_test Add another BouncyCastle FIPS test commit ea41b08 Merge: fae267b d3db508 Author: Yoann Rodière <yoann@hibernate.org> Date: Wed Apr 24 13:13:49 2024 +0200 Merge pull request quarkusio#40238 from gsmet/run-if-wip Run CI when title starts with WIP commit 82bde60 Author: Daniel Fiala <danfiala23@gmail.com> Date: Wed Apr 24 12:47:33 2024 +0200 feat(transcoding): added http method check and code refactor commit 44ac07c Author: Daniel Fiala <danfiala23@gmail.com> Date: Wed Apr 24 12:01:25 2024 +0200 feat(transcoding): added support for path parameter and query parameters commit fae267b Merge: 20ed823 618fbbd Author: Yoann Rodière <yoann@hibernate.org> Date: Wed Apr 24 11:49:06 2024 +0200 Merge pull request quarkusio#40235 from yrodiere/image-metrics-return When verifying image metrics, return all failures instead of just the first one commit 3fe1e11 Author: Daniel Fiala <danfiala23@gmail.com> Date: Wed Apr 24 11:48:34 2024 +0200 feat(transcoding): added support for path parameter and query parameters commit 20ed823 Merge: fb4963a 6625d56 Author: Martin Kouba <mkouba@redhat.com> Date: Wed Apr 24 10:04:40 2024 +0200 Merge pull request quarkusio#39233 from radcortez/mp-config-3.1 Update MicroProfile Config to 3.1 commit d3db508 Author: Guillaume Smet <guillaume.smet@gmail.com> Date: Tue Apr 23 16:26:16 2024 +0200 Run CI when title starts with WIP We introduced this check when draft PRs weren't a thing but nowadays, it's nice to be able to convey the fact that we don't want the PR to get merged but still want main CI to run. commit 618fbbd Author: Yoann Rodière <yoann@hibernate.org> Date: Wed Apr 24 08:58:41 2024 +0200 When verifying image metrics, return all failures instead of just the first one Building a native image takes a lot of time, so it's quite frustrating to iterate on this and solve errors one by one. Better have all the information upfront. commit fb4963a Merge: eddc31b 4411438 Author: Yoann Rodière <yoann@hibernate.org> Date: Wed Apr 24 08:41:13 2024 +0200 Merge pull request quarkusio#40230 from quarkusio/dependabot/maven/hibernate-orm.version-6.4.5.Final Bump hibernate-orm.version from 6.4.4.Final to 6.4.5.Final commit eddc31b Merge: 648de87 2a2bb84 Author: Clement Escoffier <clement@apache.org> Date: Wed Apr 24 08:32:59 2024 +0200 Merge pull request quarkusio#40173 from cescoffier/grpc-concurrent-blocking-call Allow concurrent invocation of blocking gRPC services by removing global ordering commit 648de87 Merge: 0efd81a c97b545 Author: Phillip Krüger <phillip.kruger@gmail.com> Date: Wed Apr 24 11:34:33 2024 +1000 Merge pull request quarkusio#40228 from dgf/main Fixed order for default OpenAPI security responses commit 4411438 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue Apr 23 21:40:24 2024 +0000 Bump hibernate-orm.version from 6.4.4.Final to 6.4.5.Final Bumps `hibernate-orm.version` from 6.4.4.Final to 6.4.5.Final. Updates `org.hibernate.orm:hibernate-core` from 6.4.4.Final to 6.4.5.Final - [Release notes](https://github.com/hibernate/hibernate-orm/releases) - [Changelog](https://github.com/hibernate/hibernate-orm/blob/6.4.5/changelog.txt) - [Commits](hibernate/hibernate-orm@6.4.4...6.4.5) Updates `org.hibernate.orm:hibernate-graalvm` from 6.4.4.Final to 6.4.5.Final - [Release notes](https://github.com/hibernate/hibernate-orm/releases) - [Changelog](https://github.com/hibernate/hibernate-orm/blob/6.4.5/changelog.txt) - [Commits](hibernate/hibernate-orm@6.4.4...6.4.5) Updates `org.hibernate.orm:hibernate-envers` from 6.4.4.Final to 6.4.5.Final - [Release notes](https://github.com/hibernate/hibernate-orm/releases) - [Changelog](https://github.com/hibernate/hibernate-orm/blob/6.4.5/changelog.txt) - [Commits](hibernate/hibernate-orm@6.4.4...6.4.5) Updates `org.hibernate.orm:hibernate-jpamodelgen` from 6.4.4.Final to 6.4.5.Final - [Release notes](https://github.com/hibernate/hibernate-orm/releases) - [Changelog](https://github.com/hibernate/hibernate-orm/blob/6.4.5/changelog.txt) - [Commits](hibernate/hibernate-orm@6.4.4...6.4.5) Updates `org.hibernate:hibernate-jpamodelgen` from 6.4.4.Final to 6.4.5.Final - [Release notes](https://github.com/hibernate/hibernate-orm/releases) - [Changelog](https://github.com/hibernate/hibernate-orm/blob/6.4.5/changelog.txt) - [Commits](hibernate/hibernate-orm@6.4.4...6.4.5) Updates `org.hibernate.orm:hibernate-community-dialects` from 6.4.4.Final to 6.4.5.Final - [Release notes](https://github.com/hibernate/hibernate-orm/releases) - [Changelog](https://github.com/hibernate/hibernate-orm/blob/6.4.5/changelog.txt) - [Commits](hibernate/hibernate-orm@6.4.4...6.4.5) --- updated-dependencies: - dependency-name: org.hibernate.orm:hibernate-core dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.hibernate.orm:hibernate-graalvm dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.hibernate.orm:hibernate-envers dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.hibernate.orm:hibernate-jpamodelgen dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.hibernate:hibernate-jpamodelgen dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.hibernate.orm:hibernate-community-dialects dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> commit c97b545 Author: Danny Gräf <deep@dagnu.de> Date: Tue Apr 23 13:00:05 2024 +0100 Fixed order for default OpenAPI security responses commit 6625d56 Author: Roberto Cortez <radcortez@yahoo.com> Date: Wed Mar 6 16:53:16 2024 +0000 Update MicroProfile Config to 3.1 commit 7d56d5d Author: Sergey Beryozkin <sberyozkin@gmail.com> Date: Tue Apr 23 11:18:23 2024 +0100 Add another BouncyCastle FIPS test commit 288a54d Author: George Gastaldi <gegastaldi@gmail.com> Date: Tue Apr 23 11:06:25 2024 -0300 Bump Quarkus HTTP to 5.2.2.Final commit 0efd81a Merge: b09853f 8d8dc6e Author: Yoann Rodière <yoann@hibernate.org> Date: Tue Apr 23 18:27:22 2024 +0200 Merge pull request quarkusio#40214 from zakkak/2024-04-23-fix-webjar-locator-it Use new webjars-locator name in integration test commit b09853f Merge: af955bd 9e05bd9 Author: George Gastaldi <gegastaldi@gmail.com> Date: Tue Apr 23 12:48:55 2024 -0300 Merge pull request quarkusio#40157 from Dairdevil/feature/fabric8-split-package-resolved Remove explicitly ignored split packages commit 320a63f Author: Daniel Fiala <danfiala23@gmail.com> Date: Tue Apr 23 14:30:51 2024 +0200 feat(transcoding): initial version of complex paths commit af955bd Merge: a3d1568 469fd3a Author: Sanne Grinovero <sanne@hibernate.org> Date: Tue Apr 23 13:16:39 2024 +0100 Merge pull request quarkusio#40203 from stuartwdouglas/eager-classes Deprecate 'eager transformers' commit 8d8dc6e Author: Foivos Zakkak <fzakkak@redhat.com> Date: Tue Apr 23 14:33:39 2024 +0300 Use new webjars-locator name in integration test Closes quarkusio#40213 commit f77df97 Merge: 2af788d a3d1568 Author: Daniel Fiala <danfiala23@gmail.com> Date: Tue Apr 23 12:49:53 2024 +0200 Merge branch 'quarkusio:main' into grpc-transcoding commit 469fd3a Author: Stuart Douglas <stuart.w.douglas@gmail.com> Date: Tue Apr 23 17:29:37 2024 +1000 Deprecate 'eager transformers' They have not done anything for a while and no longer make sense. commit 2af788d Author: Daniel Fiala <danfiala23@gmail.com> Date: Sun Apr 21 22:42:11 2024 +0200 feat(transcoding): removed unnecessary code commit 2a2bb84 Author: Clement Escoffier <clement.escoffier@gmail.com> Date: Sun Apr 21 16:17:25 2024 +0200 Allow concurrent invocation of blocking gRPC services by removing global ordering Fix quarkusio#40155 Previously, the code utilized `executeBlocking` with `ordered=true` to maintain event order. However, this approach enforced global order instead of per-call order. This commit corrects the behavior, ensuring per-call order preservation using the BlockingExecutionHandler lock. commit 3e9ce41 Author: Daniel Fiala <danfiala23@gmail.com> Date: Sat Apr 20 12:56:40 2024 +0200 feat(transcoding): removed unnecessary encoding commit 817d9a0 Merge: 89fdbd5 914ae38 Author: Daniel Fiala <danfiala23@gmail.com> Date: Sat Apr 20 12:16:22 2024 +0200 Merge branch 'refs/heads/main' into grpc-transcoding commit 9e05bd9 Author: Alasdair Preston <apreston@redhat.com> Date: Fri Apr 19 14:35:59 2024 +0100 Remove split package ignored list as no entries remain commit 89fdbd5 Author: Daniel Fiala <danfiala23@gmail.com> Date: Fri Apr 19 09:48:15 2024 +0200 chore(transcoding): cleanup
@radcortez what's the rationale for backporting it to 3.8? It looks a bit of a stretch. |
It was to make it part of the LTS version. |
I can see that but it's a new minor so that seems odd to push in a micro. Maybe ping me tomorrow so that we discuss it (and we will have to convince @rsvoboda :)). |
@rsvoboda was asking for it :)) |
The version bump was to make the TCK compatible with CDI 4. There are no API changes. |
I remember now, there is QUARKUS-4213. Your "There are no API changes between both versions; the changes are in the TCK." comment implied to me there would be just component version update. @radcortez changes in the code are a bit concerning, but we can discuss here what the motivation for them. Especially changes in |
The changes were required to pass a change in one of the TCK tests: We validate config injection points at runtime, but in the case of I'm okay with it if we do not backport this one. |
Thanks for the details, I would be in favor of some bake time + include this in the round for 3.8.6. |
@mkouba I've added some validation code to theConfigStaticInitCheckInterceptor
. This was the only was I could find to be able to validate methods injection points for@Initialized
events.For what I could tell, events get injected on Arc initialize, which will throw the error, meaning that our validation with the Recorder comes too late.
Maybe there is a better way to do this?