Skip to content
Snippets Groups Projects

WIP: sends message if the project is above the memory limit

Closed username-removed-117638 requested to merge memory-limit into master
3 unresolved threads

Checks if the project has reached it's limit, blocks the push and messages the user

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
  • Added 1 commit:

    • 1c3e623f - sends message if the project is above the memory limit
  • Added 1 commit:

    • 6c9efcd0 - sends message if the project is above the memory limit
  • Added 1 commit:

    • 4e9b7dbc - sends message if the project is above the memory limit
  • Régis Freyd (GitLab)
  • 32 34 rescue AccessDeniedError => ex
    33 35 $stderr.puts "GitLab: #{ex.message}"
    34 36 false
    37 rescue MemoryLimitReachedError => ex
    38 $stderr.puts "Gitlab: Project has reached the memory limit by: #{ex.message}MB please free some memory in Gitlab's UI to be able to push."
  • 32 34 rescue AccessDeniedError => ex
    33 35 $stderr.puts "GitLab: #{ex.message}"
    34 36 false
    37 rescue MemoryLimitReachedError => ex
    38 $stderr.puts "Gitlab: Project has reached the memory limit by: #{ex.message}MB please free some memory in Gitlab's UI to be able to push."
  • @tiagonbotelho you mention memory in various places, but I think it's size we're talking about here. Mentioning memory is kinda confusing :)

  • I will rename from projectto repository and from memory to size also thank you so much for the text and the layout @axil

  • mentioned in issue #57

  • Maintainer

    FYI, you may want to investigate the accuracy of repository_size: https://gitlab.com/gitlab-org/gitlab-ce/issues/19811

  • @stanhu I can try to check it out after I made this feature work :) I also have one question because we are allowing a user to push a repository with alot of memory the first time is there any way of checking the size of the push before receiving/updating the repo? Right now we just check if what we have is above the limit and make it impossible for the user to push even more files until he fixes the issue

  • Maintainer

    also have one question because we are allowing a user to push a repository with alot of memory the first time is there any way of checking the size of the push before receiving/updating the repo? Right now we just check if what we have is above the limit and make it impossible for the user to push even more files until he fixes the issue

    @tiagonbotelho Just to be clear: when you say "memory", do you mean RAM or disk space? It's important to make that distinction.

    If you are talking about RAM, you've actually touched upon a problem with git that @chriscool is fixing with git itself: https://public-inbox.org/git/20160824184157.19264-1-chriscool@tuxfamily.org/ (https://gitlab.com/gitlab-org/gitlab-ce/issues/17808#note_14458207)

    If you are talking about disk space, you may have to consider if this can be done in the pre-receive or update hooks: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks

    Edited by Stan Hu
  • @stanhu I was referring to Disk Space and thank you for the useful links :) because what we have right now just blocks based on the memory occupied in Gitlab and not on the local machine of the user when he's pushing.

    A user that has a repository in Gitlab with 80GB and pushes to make it 10GB should be accepted IMO. And in the first push the user has 0MB inside Gitlab and can have 80GB in the local repo and he will be able to push

  • let's move this discussion to https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6020 since I am being more active there.

  • these changes will not be used by the new feature so I am closing this MR :) I will reopen incase this changes!

  • username-removed-117638 Status changed to closed

    Status changed to closed

  • image Well how can i fix this then. The 170TB can't be right I imagine?

  • Please register or sign in to reply
    Loading