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

--force Flag for project deletion fails #298

Open
bupd opened this issue Dec 31, 2024 · 1 comment · May be fixed by #299
Open

--force Flag for project deletion fails #298

bupd opened this issue Dec 31, 2024 · 1 comment · May be fixed by #299

Comments

@bupd
Copy link
Contributor

bupd commented Dec 31, 2024

Investigate the potential cause of this.
Since deleting on the UI works fine.

❯ harbor project delete "oracle" --force
FATA[0001] invalid project/repository format: oracle/mysql/community-server

The below is the correct request in the UI

DELETE /api/v2.0/projects/oracle/repositories/mysql%252Fcommunity-server HTTP/1.1
@Roaster05
Copy link
Contributor

@bupd The issue is due to the ParseProjectRepo utility function. Currently, it splits the input argument using '/' as the delimiter, causing oracle to be sent as the projectName and only mysql as the repoName instead of mysql/community-server. This can be fixed by splitting only at the first /, its a one line fix raising a PR for this

@Roaster05 Roaster05 linked a pull request Jan 1, 2025 that will close this issue
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 a pull request may close this issue.

2 participants