Skip to content

fix: set XIsResourceName for immutable rule API calls during force project delete#990

Open
rakshityadav1868 wants to merge 1 commit into
goharbor:mainfrom
rakshityadav1868:fix-immutable-numeric-project-name
Open

fix: set XIsResourceName for immutable rule API calls during force project delete#990
rakshityadav1868 wants to merge 1 commit into
goharbor:mainfrom
rakshityadav1868:fix-immutable-numeric-project-name

Conversation

@rakshityadav1868

@rakshityadav1868 rakshityadav1868 commented Jun 13, 2026

Copy link
Copy Markdown

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

@rakshityadav1868 rakshityadav1868 marked this pull request as draft June 13, 2026 12:51
@rakshityadav1868 rakshityadav1868 force-pushed the fix-immutable-numeric-project-name branch from dd96da7 to 95cf589 Compare June 13, 2026 12:53
@rakshityadav1868 rakshityadav1868 marked this pull request as ready for review June 13, 2026 12:53
…ames resolve correctly during force delete

Signed-off-by: Rakshit Yadav <yadavrakshit60@gmail.com>
@rakshityadav1868 rakshityadav1868 force-pushed the fix-immutable-numeric-project-name branch from 95cf589 to 5f0a40d Compare June 13, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]: Delete is failing on some projects

1 participant