Skip to content

[#4726] Fail fast when Configuration is queried before promotion - #5062

Open
wadhwaroh-lang wants to merge 1 commit into
AxonIQ:mainfrom
wadhwaroh-lang:enhancement/4726/fail-fast-before-promotion
Open

wadhwaroh-lang wants to merge 1 commit into
AxonIQ:mainfrom
wadhwaroh-lang:enhancement/4726/fail-fast-before-promotion

Conversation

@wadhwaroh-lang

Copy link
Copy Markdown
Contributor

Summary

  • Reject Configuration lookups on SpringComponentRegistry while enhancers are still running and local components have not been promoted to Spring bean definitions
  • Keep lookups before initialize() unchanged so optional probes still return empty
  • Point the exception at @Bean construction that injects Configuration and calls getComponent(...) too early

Fixes #4726

Lookups during the enhancer phase only see the Spring context, so a
locally registered Axon component looks missing. Reject those calls
with a message that points at the @bean construction mistake.
@wadhwaroh-lang
wadhwaroh-lang requested a review from a team as a code owner September 14, 2026 01:29
@wadhwaroh-lang
wadhwaroh-lang requested review from MateuszNaKodach, hjohn and smcvb and removed request for a team September 14, 2026 01:29
@hatzlj

hatzlj commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

thx @wadhwaroh-lang for tackling this issue with a PR, we'll have a look on it and make sure to assign it to one of our upcoming milestone if it aligns

@hatzlj hatzlj added Priority 3: Could Low priority. Issues that are nice to have but have a straightforward workaround. Type: Enhancement Use to signal an issue enhances an already existing feature of the project. labels Sep 14, 2026
@hatzlj hatzlj added this to the Release 5.4.0 milestone Sep 14, 2026
@hatzlj
hatzlj self-requested a review September 14, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority 3: Could Low priority. Issues that are nice to have but have a straightforward workaround. Type: Enhancement Use to signal an issue enhances an already existing feature of the project.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fail fast when SpringComponentRegistry components are queried before promotion

2 participants