-
Notifications
You must be signed in to change notification settings - Fork 29
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
Reuse headers from pulpcore::apache class #354
Conversation
We have the exact same code in both pulpcore::plugin::container as in pulpcore::apache. This reuses the variables rather than duplicating the logic. Fixes: 21aa39e ("Fixes #37308 - set REMOTE_USER properly for pulpcore registry")
@@ -27,7 +19,7 @@ | |||
'url' => "${pulpcore::apache::api_base_url}${registry_version_path}", | |||
}, | |||
], | |||
'request_headers' => $api_default_request_headers + $api_additional_request_headers, | |||
'request_headers' => $pulpcore::apache::api_default_request_headers + $pulpcore::apache::api_additional_request_headers, |
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 debated introducing a new variable that has both these values, but decided against it to keep this smaller.
When adding tests I figured out that at least there it's somehow different. Redoing it, I first wrote tests prior to this patch (e3d1ddb, based on @evgeni's work elsewhere). Then reapplied this (bd1dbec) and fixed tests the (66b97fe). Why does it result in an additional line when it should use the exact same variables? Still trying to figure that out. |
Because the content of the variables are not identical! The "global" ones: puppet-pulpcore/manifests/apache.pp Lines 48 to 55 in 5b6d088
The ones you removed here: puppet-pulpcore/manifests/plugin/container.pp Lines 12 to 18 in c63cb65
the global ones, that we now use have an additional
|
I was so blindly staring at |
We have the exact same code in both pulpcore::plugin::container as in pulpcore::apache. This reuses the variables rather than duplicating the logic.
Fixes: 21aa39e ("Fixes #37308 - set REMOTE_USER properly for pulpcore registry")