Skip to content
Snippets Groups Projects

Add user repository integrity check rake task

Corrupt repositories and stuck lock files can cause weird issues in GitLab. Often we know which user is having these problems and then we have to go hunt down which repository is causing it. Several times recently that involved me running queries in the rails console to get an array of projects and then writing a quick Ruby script to loop through and run git fsck. This last time I also had to check for the existence of config.lock and ref lock files.

This rake task will eliminate all of those steps and allow an admin to simply specify a username.

I also added the lock file checks to the exist gitlab:repo:check task which goes through all projects.

Screen_Shot_2015-12-11_at_5.33.08_PM

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Drew Blessing Added 1 commit:

    Added 1 commit:

    • 19d868bc - Split in to methods
  • Drew Blessing Added 1 commit:

    Added 1 commit:

    • 849e380b - [ci skip] Add user repository integrity check rake task
  • Drew Blessing Added 1 commit:

    Added 1 commit:

    • ae8443b3 - [ci skip] Add user repository integrity check rake task
  • Drew Blessing Title changed from WIP: Add user repository integrity check rake task to Add user repository integrity check rake task

    Title changed from WIP: Add user repository integrity check rake task to Add user repository integrity check rake task

  • Author Maintainer

    @rspeicher I took your advice and made this script-friendly. It will still prompt if a username isn't specified as an arg. Thanks for the suggestion.

    I also added documentation about the repo checks.

  • It will still prompt if a username isn't specified as an arg. Thanks for the suggestion.

    Good call.

    :thumbsup: Minor fixes to docs, rest LGTM.

  • Drew Blessing Added 1 commit:

    Added 1 commit:

    • f8bf6c4b - [ci skip] Add user repository integrity check rake task
  • Author Maintainer

    @rspeicher Fixed up the docs. Can we still get this in for 8.3?

    Thanks to you and @axil for the review.

  • Robert Speicher Status changed to merged

    Status changed to merged

  • Robert Speicher mentioned in commit 28a8d0b5

    mentioned in commit 28a8d0b5

  • DJ Mountney mentioned in commit 536a25f0

    mentioned in commit 536a25f0

  • DJ Mountney mentioned in commit c4b71fc4

    mentioned in commit c4b71fc4

  • DJ Mountney mentioned in commit 3a512594

    mentioned in commit 3a512594

  • DJ Mountney mentioned in commit 0d8fba4e

    mentioned in commit 0d8fba4e

  • Please register or sign in to reply
    Loading