Repository navigation
Conversation
Keep the prompt condition scoped to prompt beans and cover switch combinations, context isolation, and custom beans. Document the migration from the previous global side effect. Fixes agentic-ai-java#68
Contributor
|
I’m not entirely clear on the context here; I’ll need to look into it. As the comment explains, this fixes an issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe what this PR does / why we need it
Disabling Nacos Prompt, including leaving it disabled by default, currently sets the JVM system property
spring.nacos.config.enabledtofalse. This overwrites an explicitly enabled Nacos Config setting and affects other application contexts in the same JVM.This PR keeps the Prompt condition scoped to its own auto-configuration without changing the application's global Nacos Config setting.
Does this pull request fix one issue?
Fixes #68
Describe how you did it
PromptTemplateNacosConfigCondition; retain the default-disabled behavior and existing bean backoff conditions.true,false, unset), concurrent application contexts, context recreation, and application-provided beans.Describe how to verify it
mvn -B -ntp -pl auto-configurations/prompt/argi-autoconfigure-nacos-prompt -am -Dcheckstyle.skip=false testVerified locally with JDK 21:
trueor unset tofalse.Special notes for reviews
Only three files change: the condition, its auto-configuration tests, and a module README with migration notes.
Applications that depended on disabling Prompt to disable Nacos Config must now explicitly configure
spring.nacos.config.enabled=false. Applications using Nacos Config retain responsibility for their connection configuration; disabling Prompt should not suppress genuine Nacos Config errors.These are offline auto-configuration and unit tests, not a live Nacos-server connectivity verification.