-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix(bundler): authentication using only env vars #33339
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs tests/test updating too
Tests updated. I've just removed the tests checking if the "bundler config" auth commands were running and changed the "gems.private.com" host to "gems-private.com" so the hyphen replacement is working properly when creating the environment variable. |
'-e GEM_HOME ' + | ||
'-e CONTAINERBASE_CACHE_DIR ' + | ||
'-w "/tmp/github/some/repo" ' + | ||
'ghcr.io/containerbase/sidecar' + | ||
' bash -l -c "' + | ||
'install-tool ruby 1.2.0' + | ||
' && ' + | ||
'install-tool bundler 1.3.0' + | ||
'install-tool bundler 2.3.5' + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What caused this line to change in the test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is GitHub diff pranking us. I actually didn't remove those lines:
https://github.com/renovatebot/renovate/pull/33339/files#diff-5421e221c5a44026d537b2f1168b1ce07db041069cba49bf2ba6462848e6c5cfL438-L489
So, because the line you mentioned is part of the block that I actually removed, It mixed things up and displayed a bogus visualization.
Happy new year! 🎉
@@ -32,14 +30,16 @@ import { | |||
const hostConfigVariablePrefix = 'BUNDLE_'; | |||
|
|||
function buildBundleHostVariable(hostRule: HostRule): Record<string, string> { | |||
if (!hostRule.resolvedHost || hostRule.resolvedHost.includes('-')) { | |||
if (!hostRule.resolvedHost) { | |||
return {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rarkins , this is the line failing the test coverage. I wonder if checking the "hostRule.resolvedHost" is even necessary. If not, I can remove the if statement. Otherwise, I'd appreciate any help creating a proper test.
Changes
Change the bundle authentication to use ENV vars for hostnames with hyphen. Discussion #33205
I might need help with the unit tests because I'm not a js/typescript developer.
Context
#33205
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: