#1445 Broken link on old attachment
Closed: Fixed 5 years ago Opened 7 years ago by mikem.

https://pagure.io/pagure/issue/953
I attached a screenshot to 953 a few months ago. It is a broken link now.


my thought is that the ticket repo got corrupted in some way, eventually a commit got pushed that had no or the wrong parent.
So all the files should be there, but the git repo needs to be fixed.

However, I can't really investigate further as I do not have access to that git repo :)

The issue with the broken attachment is a pagure issue. Surely you have access to that.

https://pagure.io/pagure/issue/953

No because the file is in the git repo where all the tickets' metadata are stored.

The only way I could access the git repo is using sudo on the server which isn't something I'm really eager to do (out of principle, I don't like using admin rights to look at people's business)

Oupsy sorry, I'm just re-reading your comment and see this last link is regarding an issue in pagure.
Yes I definitively have access to that, thanks! :)

Ok, so I was able to fix the pagure repo but it's not trivial and we really ought to fix pagure to prevent this from happening again (which I think will mean: add a (better?) locking mechanism around committing and pushing commits to the tickets/requests repo).

Basically, I had to take the original repo from the filesytem, then clone it (just easier to work from a non-bare repo).

Then:

  • Find all the loose commits:
git fsck --lost-found | grep commit | cut -d ' ' -f 3 | xargs -n 1 git log -1 --pretty=oneline
  • For each of them do something like:
git checkout <commit>
git checkout -b <new_branch>
git checkout master && git merge <new_branch>
or
git checkout master && git rebase <new_branch>
  • Fix conflicts
  • Turn off the pagure ticket hook
  • Force push the fixed repo
  • Turn back on the pagure ticket hook

We haven't encountered this issue in a while, so I'm going to close this ticket as fixed and we can re-open it or open a new one if it happens again.

Thanks :)

Metadata Update from @pingou:
- Issue close_status updated to: Fixed

5 years ago

Login to comment on this ticket.

Metadata