Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Commit

Permalink
gitreceive: Persist slugbuilder limit across deploys
Browse files Browse the repository at this point in the history
Before this patch, doing a `git push` deploy would remove the
slugbuilder process type from the release, removing any custom
per-app limits.

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
  • Loading branch information
titanous committed Oct 15, 2016
1 parent 90de16e commit ee9c4b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gitreceive/receiver/flynn-receive.go
Expand Up @@ -221,6 +221,9 @@ Options:
}
procs[t] = proc
}
if sb, ok := prevRelease.Processes["slugbuilder"]; ok {
procs["slugbuilder"] = sb
}
release.Processes = procs

if err := client.CreateRelease(release); err != nil {
Expand Down
4 changes: 4 additions & 0 deletions test/test_gitreceive.go
Expand Up @@ -55,6 +55,10 @@ func (s *GitreceiveSuite) TestSlugbuilderLimit(t *c.C) {
t.Assert(push, Succeeds)
t.Assert(push, OutputContains, "524288000")

limit := r.flynn("limit")
t.Assert(limit, Succeeds)
t.Assert(limit.Output, Matches, "slugbuilder:.+memory=500MB")

t.Assert(r.flynn("-a", "gitreceive", "env", "unset", "SLUGBUILDER_DEFAULT_MEMORY_LIMIT"), Succeeds)
}

Expand Down

0 comments on commit ee9c4b6

Please sign in to comment.