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

fix: Allow to delete repos with invalid urls (#20921) (cherry-pick #20975) #21117

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

gcp-cherry-pick-bot[bot]
Copy link

Cherry-picked fix: Allow to delete repos with invalid urls (#20921) (#20975)

Fixes #20921

Normalization of repo url is attempted during repo deletion before comparison with existing repos. Before this change, it'd fail on invalid urls and return "", resulting in permission denied. This ended up in a state where people can add repos with invalid urls but couldn't delete them. Return raw repo url if url parsing failed. Add a test to validate the deletion can be performed and make sure it fails without the main change.

This needs to be cherry-picked to v2.11-2.13

Signed-off-by: Andrii Korotkov andrii.korotkov@verkada.com

  • Don't modify the original NormalizeGitURL

Signed-off-by: Andrii Korotkov andrii.korotkov@verkada.com


Signed-off-by: Andrii Korotkov andrii.korotkov@verkada.com

* fix: Allow to delete repos with invalid urls (#20921)

Fixes #20921

Normalization of repo url is attempted during repo deletion before comparison with existing repos. Before this change, it'd fail on invalid urls and return "", resulting in permission denied. This ended up in a state where people can add repos with invalid urls but couldn't delete them. Return raw repo url if url parsing failed. Add a test to validate the deletion can be performed and make sure it fails without the main change.

This needs to be cherry-picked to v2.11-2.13

Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>

* Don't modify the original NormalizeGitURL

Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>

---------

Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>
@gcp-cherry-pick-bot gcp-cherry-pick-bot bot requested a review from a team as a code owner December 10, 2024 13:19
@pasha-codefresh
Copy link
Member

e2e failure not related to this PR

@pasha-codefresh pasha-codefresh merged commit 60d0786 into release-2.12 Dec 10, 2024
14 of 22 checks passed
@pasha-codefresh pasha-codefresh deleted the cherry-pick-9b2a18-release-2.12 branch December 10, 2024 14:29
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.

2 participants