Repository navigation
[Fix #14807] Clean legacy nacos-ai-prompt mirror on prompt deletion - #14828
Merged
KomachiSion merged 1 commit intoApr 2, 2026
Merged
Conversation
- Add deleteLegacyLatestMirror to deletePrompt flow
- Delete {promptKey}.json from nacos-ai-prompt group when prompt is removed
- Failure to delete legacy mirror does not block main deletion
- Add unit tests for legacy mirror cleanup and error tolerance
|
Thanks for your this PR. 🙏 感谢您提交的PR。 🙏 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
KomachiSion
approved these changes
Apr 2, 2026
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.
Related #14807
What is the purpose of the change
When a prompt is deleted through the new lifecycle governance API, the legacy latest mirror config (
{promptKey}.jsoninnacos-ai-promptgroup) is not cleaned up. This leaves orphan configs in the legacy storage location.Brief changelog
deleteLegacyLatestMirrorto thedeletePromptflow inPromptOperationServiceImpl{promptKey}.jsonfromnacos-ai-promptgroup when a prompt is removedVerifying this change
This change includes unit tests:
testDeletePromptShouldCleanLegacyLatestMirror— verifiesconfigOperationService.deleteConfigis called with the correct dataId/grouptestDeletePromptShouldNotFailWhenLegacyMirrorDeleteThrows— verifies deletion completes even when legacy mirror cleanup throws an exceptionFollow this checklist to help us incorporate your contribution quickly and easily:
[ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.mvn -B clean package apache-rat:check spotbugs:check -DskipTeststo make sure basic checks pass. Runmvn clean install -DskipITsto make sure unit-test pass. Runmvn clean test-compile failsafe:integration-testto make sure integration-test pass.