Skip to content

Comments

fix(prompt): remove GetTagNameFromUser() that caused deadlock#681

Open
rshdhere wants to merge 3 commits intogoharbor:mainfrom
rshdhere:fix/deadlock-in-prompt
Open

fix(prompt): remove GetTagNameFromUser() that caused deadlock#681
rshdhere wants to merge 3 commits intogoharbor:mainfrom
rshdhere:fix/deadlock-in-prompt

Conversation

@rshdhere
Copy link

@rshdhere rshdhere commented Feb 6, 2026

solves #680
The function had an empty goroutine that never sent to the unbuffered channel, causing any caller to block indefinitely. Since this function was unused and GetTagFromUser() already provides the correct implementation for tag selection, removing it entirely is the cleanest fix. Fixes #680

@rshdhere rshdhere force-pushed the fix/deadlock-in-prompt branch from 3070b64 to f8001bf Compare February 7, 2026 01:22
@rshdhere
Copy link
Author

rshdhere commented Feb 7, 2026

PTAL @NucleoFusion

Copy link
Collaborator

@qcserestipy qcserestipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this contribution. I think the comment might be removed. Otherwise LGTM


return <-repoName
}
// GetTagNameFromUser was removed - it contained a deadlock bug (empty goroutine
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove it without leaving a comment. So far no one used it and will not miss it, I guess

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for the delay was busy with school, on it now!

The function had an empty goroutine that never sent to the unbuffered
channel, causing any caller to block indefinitely. Since this function
was unused and GetTagFromUser() already provides the correct
implementation for tag selection, removing it entirely is the cleanest fix.
Fixes goharbor#680

Signed-off-by: raashed <mohammedraashed10@gmail.com>
- Eliminate `GetTagNameFromUser` containing empty goroutine that never sent to channel, causing deadlock[1][2]
- Retain `GetTagFromUser` as corrected replacement that properly fetches and displays tags[1]

Signed-off-by: raashed <mohammedraashed10@gmail.com>
Signed-off-by: raashed <mohammedraashed10@gmail.com>
@rshdhere rshdhere force-pushed the fix/deadlock-in-prompt branch from a342949 to 383c254 Compare February 14, 2026 17:07
@rshdhere
Copy link
Author

rebased and ready to be merged @qcserestipy

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: GetTagNameFromUser() causes deadlock due to empty goroutine

2 participants