-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[cmd/builder] add ocb feature to install go binary to temp dir #11386
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11386 +/- ##
==========================================
- Coverage 91.79% 91.78% -0.02%
==========================================
Files 432 432
Lines 20425 20430 +5
==========================================
+ Hits 18750 18752 +2
+ Misses 1301 1294 -7
- Partials 374 384 +10 ☔ View full report in Codecov by Sentry. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
This is an interesting solution to a make it easier for users to use the Builder without thinking about other dependencies - like to make sure Go is installed. Still, I'm not convinced that downloading Go should be in scope of the Builder's responsibilities. This increases the complexity of the Builder's code. I'd rather keep the Builder's code as small as possible and have users use other tools to download Go. Happy to hear the maintainers' opinion on this. |
@andrzej-stencel now that we have the docker images published I feel like that helps abstract away the requirement of having a local golang environment; there's of course also more security concerns with having ocb act as a "trojan horse," even if it only downloads golang to a temporary directory and removing afterwards. I don't feel strongly about this PR and I think we can probably let it expire in accordance with your comments about the issue #11382 |
I would vote to NOT have this feature. Setting up Go should not ocb's job. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Description
Removes requirement for ocb to have go binary installed in local environment. If go binary is not found in local path, downloads go binary for appropriate platform and architecture, based on the version that ocb was built with, installs to temporary directory, and deletes that directory when complete.
Link to tracking issue
Fixes #11382
Testing
Unit tests for each function added, as well as an additional test for
SetGoPath()
where$PATH
is mocked to not have an existing go environmentDocumentation
.chloggen file