gaffneyc / heroku-buildpack-jemalloc

Heroku buildpack that installs the Jemalloc memory allocator
BSD 3-Clause "New" or "Revised" License
252 stars 77 forks source link

Question about use with Heroku Pipelines #9

Closed braindev closed 5 years ago

braindev commented 5 years ago

If this buildpack is used in an app that uses Heroku Pipelines would there by any extra steps needed? I use a pipeline like this at work:

QA -> Staging -> Production

The app is built on QA then promoted to staging and finally to production.

If QA has the buildpack do staging and production also need the buildpack? What about the environment variables like JEMALLOC_ENABLED and JEMALLOC_VERSION?

Thanks

gaffneyc commented 5 years ago

As best as I understand it, the slug is built when the code is pushed to the first stage in the pipeline (QA in this case). So when it is promoted to staging and production jemalloc should be in the slug already. You can double check that by running heroku run ls /app/vendor/jemalloc -a [production app]. You shouldn't need the buildpack in staging or production but I would still advise it to keep them consistent in case you ever need to push directly to an environment.

One thing to be aware of is that the version of jemalloc will be whatever is set in the QA environment. At this point, the version is only set when building the slug. So you shouldn't need JEMALLOC_VERSION in staging and production, but it's helpful for consistency.

You will need to set JEMALLOC_ENABLED in all environments since it's read when the dynos boot.