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

Stops after 90 Tag deletions on gitlab.com #4

Open
actraiser opened this issue Jan 17, 2021 · 3 comments
Open

Stops after 90 Tag deletions on gitlab.com #4

actraiser opened this issue Jan 17, 2021 · 3 comments
Labels
help wanted Extra attention is needed type:bug

Comments

@actraiser
Copy link

actraiser commented Jan 17, 2021

First of all about the note in the README.md:
This script uses v4 of the GitLab API. It is tested against a self-hosted GitLab instance and it is unknown if these same commands work on projects hosted on gitlab.com.

I can confirm, script works mostly fine on commercial gitlab.com. I just ran it to clean up 1200 old tags but noticed that it stops after 90 deletions with the success message "Cleanup Complete. Please run ...etc". But it also shows a warning at the beginning of the cleanup process:
./clean-registry.sh: line 118: [: x-next-page:2: integer expression expected

When I re-run the script it just continues to delete the next 90 tags before it stops again. I can only assume that it has something to do with how gitlab.com responses to the page requests as opposed to self-hosted gitlab.

Anyway, the script is a life saver - thank you so much!

Greets
-act

@TheWiresharkGuy
Copy link

First of all about the note in the README.md:
This script uses v4 of the GitLab API. It is tested against a self-hosted GitLab instance and it is unknown if these same commands work on projects hosted on gitlab.com.

I can confirm, script works mostly fine on commercial gitlab.com. I just ran it to clean up 1200 old tags but noticed that it stops after 90 deletions with the success message "Cleanup Complete. Please run ...etc". But it also shows a warning at the beginning of the cleanup process:
./clean-registry.sh: line 118: [: x-next-page:2: integer expression expected

When I re-run the script it just continues to delete the next 90 tags before it stops again. I can only assume that it has something to do with how gitlab.com responses to the page requests as opposed to self-hosted gitlab.

Anyway, the script is a life saver - thank you so much!

Greets
-act

Hi, I've the exact same problem with a self-hosted GitLab instance!

@TheLastCicada
Copy link
Contributor

@actraiser or @TheWiresharkGuy - I don't know that I have a registry with enough old tags at the moment to easily test a fix for this. If I had a potential fix, could either of you test it for me?

@dismine
Copy link

dismine commented Oct 18, 2021

@TheLastCicada I have the same problem with this script on gitlab.com. Ready to help you.

@dkotter dkotter added this to the Future Release milestone Oct 23, 2023
@jeffpaul jeffpaul added the help wanted Extra attention is needed label Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed type:bug
Projects
Status: Backlog
Development

No branches or pull requests

6 participants