Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use direct=true processes for go buildpack #265

Merged
merged 5 commits into from
Jan 18, 2022

Conversation

sambhav
Copy link

@sambhav sambhav commented Jan 5, 2022

The go buildpack currently uses direct=false processes. AFAICT,
the buildpack itself, doesn't need to support direct=false process types
as it does not rely on any profile.d scripts or use any environment
variables as arguments for its process type. Direct=false processes
also have an extremely unintuitive/error causing behavior with arg
handling at runtime. For more info see
https://github.com/buildpacks/rfcs/blob/main/text/0093-remove-shell-processes.md#argument-handling

This also prevents divergence in the behavior of the output images
between the tiny stack and the other stacks with runtime arguments being
handled consistently now.

This also leads to performance improvements as direct=true processes
do not need to load bash/go through the shell for startup.

Related RFC paketo-buildpacks/rfcs#136

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

@sambhav sambhav requested a review from a team as a code owner January 5, 2022 22:44
The go buildpack currently uses direct=false processes. AFAICT,
the buildpack itself, doesn't need to support direct=false process types
as it does not rely on any profile.d scripts or use any environment
variables as arguments for its process type. Direct=false processes
also have an extremely unintuitive/error causing behavior with arg
handling at runtime. For more info see
https://github.com/buildpacks/rfcs/blob/main/text/0093-remove-shell-processes.md#argument-handling

This also prevents divergence in the behavior of the output images
between the tiny stack and the other stacks with runtime arguments being
handled consistently now.

This also leads to performance improvements as direct=true processes
do not need to load bash/go through the shell for startup.

Signed-off-by: Sambhav Kothari <skothari44@bloomberg.net>
@fg-j
Copy link

fg-j commented Jan 13, 2022

Hey @samj1912, see my change to make reloadable processes still work with this change. It follows the recommendation in the CNB RFC to explicitly use bash.

@fg-j
Copy link

fg-j commented Jan 18, 2022

I'd vote minor bump on this, since the change doesn't break any of the existing integration-tested functionality of the buildpack.

@ryanmoran ryanmoran added the semver:minor A change requiring a minor version bump label Jan 18, 2022
@ForestEckhardt ForestEckhardt merged commit c6b8a31 into paketo-buildpacks:main Jan 18, 2022
@sambhav sambhav deleted the direct branch January 18, 2022 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:minor A change requiring a minor version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants