fix: set XIsResourceName for immutable rule API calls during force project delete#990
Open
rakshityadav1868 wants to merge 1 commit into
Open
Conversation
dd96da7 to
95cf589
Compare
…ames resolve correctly during force delete Signed-off-by: Rakshit Yadav <yadavrakshit60@gmail.com>
95cf589 to
5f0a40d
Compare
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.
Fixes #981
When deleting a project with a numeric name using force, the immutable rule APIs were not telling Harbor to treat the value as a project name. Harbor interpreted it as an ID instead, so the CLI failed to find and remove the immutable rules. This caused repository deletion to fail with an HTTP 412 error and blocked the entire project deletion.
The fix sets XIsResourceName true on ListImmutable and DeleteImmutable API calls so Harbor correctly resolves the value as a project name, allowing projects with numeric names to be force deleted successfully.
BEFORE:
Screen.Recording.2026-06-13.at.6.31.05.PM.mp4
AFTER:
Screen.Recording.2026-06-13.at.6.35.46.PM.mp4