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

feat: Improve Performance of delete Command with Concurrency #322

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

OmBiradar
Copy link

Fixes: #79
Also trying to fix #316

Inspired from #80

Handles concurrent deletion of projects, registries and repositories

Description

This PR enhances the performance of the harbor project delete command by introducing concurrency to handle multiple project deletions in parallel. The changes ensure that the command is more efficient, especially when dealing with multiple projects.

Changes

Changes made in RepoDeleteCmd(), DeleteRegistryCommand() and DeleteProjectCommand() to handle batch operation by using go routines.

Benefits

Performance: Can concurently handle delete operations, thus improving execution time when dealing with multiple projects.
Readibility: Logging of any errors and overall status delivers a clear insight into errors and issues.

Usage

# Delete multiple projects concurrently
harbor project delete project1 project2 project3

# Delete multiple repositories concurrently
harbor repository delete repo1 repo2 repo3

# Delete multiple registries concurrently
harbor registry delete reg1 reg2 reg3

Looking forward for integration into the main branch. Waiting for your comments maintainers and contributors.

handles concurrent deletion of projects, registries and users

Signed-off-by: OmBiradar <[email protected]>
@OmBiradar OmBiradar marked this pull request as draft February 7, 2025 18:21
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.

Proper error messages for project delete Add Support for Deleting Multiple Projects in CLI
1 participant