teamhephy / workflow

Hephy Workflow - An open source fork of Deis Workflow - The open source PaaS for Kubernetes.
MIT License
410 stars 37 forks source link

There is an incredibly amount of verbose output when a buildpack is not matched #109

Closed n0n0x closed 4 years ago

n0n0x commented 4 years ago

As it can be seen in the following image, when not setting a specific buildpack via BUILDPACK_URL, the slugbuilder cycles through every installed buildpack until it detects the actual programming language (code for reference):

image

This is great, but in the past year, buildpacks like nodejs and php have increased their verbosity when the app is not detected. Leading to something like the following output when deploying using deis:

Screen Shot 2019-11-25 at 09 28 50

I would like to change this behavior by setting a variable like DEIS_BUILDPACK_DEBUG to True or False (defaulting to False and suppressing such output). This way the output would look cleaner as following:

image

Cryptophobia commented 4 years ago

Very good improvement @n0n0x! Have you tested this with the builder and slugbuilder changes?

Also, can you add PR for documentation about this new environment variable for the builder in the workflow repo here:

https://github.com/teamhephy/workflow/blob/master/src/managing-workflow/tuning-component-settings.md#customizing-the-builder

n0n0x commented 4 years ago

Hello!! Thanks!

Regarding documentation, this would be more of a per-app setting. So I think I should document this setting here: https://github.com/teamhephy/workflow/blob/master/src/applications/deploying-apps.md#tuning-application-settings

what do you think?

About testing: We are using this branch in production right now :) But we are mainly python focused. So if anyone can try this using any other programming language, it would be great! The images that we are using are:

Here are some screenshots:

Without DEIS_BUILDPACK_DEBUG set

image

With DEIS_BUILDPACK_DEBUG=True

image

With DEIS_BUILDPACK_DEBUG=False

image

Cryptophobia commented 4 years ago

Regarding documentation, this would be more of a per-app setting. So I think I should document this setting here: https://github.com/teamhephy/workflow/blob/master/src/applications/deploying-apps.md#tuning-application-settings

what do you think?

Yes, you are right @n0n0x. Good catch! This should be documented and set per app similar to BUILDPACK_URL. Actually looks like environment variable BUILDPACK_URL is missing from the above documentation, so if you can put it in there as well while working on this, that would be great. :)

Thank you for the examples. I can go ahead and test a bit with your images as well. I will test with some rails and golang apps and the https://github.com/teamhephy/example-rails5-reactjs example app. Anything that limits noise during the slugbuilding process would be nice since this verbose output is pretty useless.

Since the above change is pretty isolated via a flag, we don't have to worry about it as much unless there is some kind of regression.

n0n0x commented 4 years ago

@Cryptophobia done with documentation in #111!

Cryptophobia commented 4 years ago

closed by https://github.com/teamhephy/workflow/pull/111, https://github.com/teamhephy/builder/pull/54, and https://github.com/teamhephy/slugbuilder/pull/16