Skip to content
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

ContextFunctionCatalogAutoConfiguration is doing component scan at the wrong phase #1149

Closed
snicoll opened this issue Jun 11, 2024 · 2 comments
Milestone

Comments

@snicoll
Copy link

snicoll commented Jun 11, 2024

Describe the bug
org.springframework.cloud.function.context.config.ContextFunctionCatalogAutoConfiguration is an auto-configuration that should back off if a FunctionCatalog bean is present. PlainFunctionScanConfiguration is doing component scan, which is a PARSE_CONFIGURATION business. You can't scan for additional beans that should happen early and prevent that from happening if a bean is present.

Sample
This will fail in Spring Framework 6.2.0-M1 onwards as we've tighten up that rule, see spring-projects/spring-framework#23206. As such, I am expecting the tests of this project to fail when building against Spring Framework 6.2.

@olegz
Copy link
Contributor

olegz commented Jun 11, 2024

I am not sure I fully understand the issue. The FunctionCatalog is created by ContextFunctionCatalogAutoConfiguration, so it will always be present. So I am not sure what do you mean when you say back off if a FunctionCatalog bean is present.

What am I missing?

@snicoll
Copy link
Author

snicoll commented Jun 11, 2024

This

@olegz olegz added this to the 4.1.3 milestone Jul 3, 2024
@olegz olegz closed this as completed in d8e67c8 Jul 9, 2024
onobc added a commit to onobc/spring-pulsar that referenced this issue Aug 10, 2024
NOTE: Also had to update to SCSt 4.2.0-SNAPSHOT to workaround
spring-cloud/spring-cloud-function#1149

Resolves spring-projects#758
onobc added a commit to spring-projects/spring-pulsar that referenced this issue Aug 10, 2024
NOTE: Also had to update to SCSt 4.2.0-SNAPSHOT to workaround
spring-cloud/spring-cloud-function#1149

Resolves #758
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants