-
Notifications
You must be signed in to change notification settings - Fork 5.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
fix: do not export repo-server environment to sidecar (#9393) #9397
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9397 +/- ##
==========================================
- Coverage 45.86% 45.78% -0.09%
==========================================
Files 221 220 -1
Lines 26309 26170 -139
==========================================
- Hits 12067 11981 -86
+ Misses 12586 12531 -55
- Partials 1656 1658 +2
Continue to review full report at Codecov.
|
reposerver/repository/repository.go
Outdated
@@ -1270,8 +1270,11 @@ func runConfigManagementPlugin(appPath, repoRoot string, envVars *v1alpha1.Env, | |||
return kube.SplitYAML([]byte(out)) | |||
} | |||
|
|||
func getPluginEnvs(envVars *v1alpha1.Env, q *apiclient.ManifestRequest, creds git.Creds) ([]string, error) { | |||
env := append(os.Environ(), envVars.Environ()...) | |||
func getPluginEnvs(envVars *v1alpha1.Env, q *apiclient.ManifestRequest, creds git.Creds, remote bool) ([]string, error) { |
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.
Can you add a comment to describe what remote does? And, if you have time, a unit test to illustrate the difference?
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.
I have added a comment. Testing the feature at the level of exported functions would require mocking the cmp server which does not look like an easy task. I do not have the time for that.
getPluginEnvs is both used for local plugins and sidecar plugins. For the later do not include the environement variables of the repo-server in the supplied variables. Fixes: argoproj#9393 Signed-off-by: Pierre Crégut <[email protected]>
f1ff699
to
e28ca33
Compare
Merged already as part of #9319 |
getPluginEnvs is both used for local plugins and sidecar plugins. For the later
do not include the environement variables of the repo-server in the supplied
variables.
Fixes: #9393
Signed-off-by: Pierre Crégut [email protected]
Note on DCO:
If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.
Checklist: