-
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
Improve stereotypes support #26264
Improve stereotypes support #26264
Conversation
Creating as draft to let CI run in my fork, and to discuss the TODO items with @mkouba. |
57cadcd
to
26a5640
Compare
26a5640
to
8e6b569
Compare
Rebased. @mkouba could you please take a look? Thank you! |
...ndent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/StereotypeRegistrar.java
Show resolved
Hide resolved
independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanDeployment.java
Show resolved
Hide resolved
independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanConfigurator.java
Outdated
Show resolved
Hide resolved
.../deployment/src/main/java/io/quarkus/smallrye/health/deployment/SmallRyeHealthProcessor.java
Outdated
Show resolved
Hide resolved
extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/ArcProcessor.java
Show resolved
Hide resolved
8e6b569
to
5419afd
Compare
Removed all TODOs, so marking as ready. |
This comment has been minimized.
This comment has been minimized.
5419afd
to
a010610
Compare
Rebased to get rid of the RestClient test failures. |
This comment has been minimized.
This comment has been minimized.
The CI failure may be related? |
Yea I need to check why the SmallRye Health test failed in CI, it all passed locally. |
So what's the status of this PR? |
I'm just getting back to this. (I wanted to work on #27574 and figured it would be best to have this done first). |
I can also just get rid of the SmallRye Health changes, as they are not really relevant to the subject of this PR. I just stumbled upon that piece of code and found it's suboptimal, so I figured I could just fix it and squeeze it in. I'll investigate for a bit and if I don't manage to find the issue, I'll get rid of the changes here. |
So the test failure from CI is:
The health checks are: static class HealthCheckProducers {
static final AtomicInteger ALPHA_COUNTER = new AtomicInteger();
static final AtomicInteger BRAVO_COUNTER = new AtomicInteger();
// No scope - @Singleton is used by default
@Readiness
HealthCheck alpha() {
int idx = ALPHA_COUNTER.incrementAndGet();
return () -> HealthCheckResponse.builder().up().name("alpha" + idx).build();
}
@RequestScoped
@Readiness
HealthCheck bravo() {
int idx = BRAVO_COUNTER.incrementAndGet();
return () -> HealthCheckResponse.builder().up().name("bravo" + idx).build();
}
} So Gonna revert those changes, then. |
a010610
to
c13b017
Compare
Done. |
I believe that this would deserve a little investigation. Do you have a diff somewhere or a branch with a state before you reversed the change? |
I do: https://github.com/Ladicek/quarkus/commits/smallrye-health-default-scope The interesting thing is, the test didn't fail for me locally, and only failed in CI on Windows. I don't know what to take from it. |
That's superweird. |
This comment has been minimized.
This comment has been minimized.
This commit adds a better API for registering custom stereotypes, similar to existing APIs: `StereotypeRegistrar` and `StereotypeRegistrarBuildItem`. The existing `AdditionalStereotypeBuildItem` is very confusing to use, so it is deprecated and all its usages are replaced with the new API. Also, this commit allows defining stereotypes for synthetic beans. Scope, name, alternative status and priority are all applied to the synthetic bean, but interceptor bindings are not. We don't apply interceptors to synthetic beans in general, this case is not an exception.
c13b017
to
320681c
Compare
This commit adds a better API for registering custom stereotypes, similar
to existing APIs:
StereotypeRegistrar
andStereotypeRegistrarBuildItem
.The existing
AdditionalStereotypeBuildItem
is very confusing to use, soit is deprecated and all its usages are replaced with the new API.
Also, this commit allows defining stereotypes for synthetic beans. Scope,
name, alternative status and priority are all applied to the synthetic bean,
but interceptor bindings are not. We don't apply interceptors to synthetic
beans in general, this case is not an exception.