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

Fix inconsistent $proxy_host handling in apt and apt::ppa. #330

Merged
merged 2 commits into from
Jul 30, 2014

Conversation

dantman
Copy link

@dantman dantman commented Jul 11, 2014

  • The default for $proxy_host is undef
  • apt considers $proxy_set to be absent if $proxy_host is undef
  • apt::ppa considers proxy_env to be empty if $proxy_host is false or ''

This results in apt::ppa to consider $proxy_host to be set when the default undef is used
breaking ppa resources because $proxy_env becomes:

[http_proxy=http://:8080, https_proxy=http://:8080]

Fix this by making both apt and apt::ppa consider $proxy_host to be unset when it is any of false, '', or undef.


Please merge and release, apt::ppa is unusable as-is.

- The default for $proxy_host is undef
- apt considers $proxy_set to be absent if $proxy_host is undef
- apt::ppa considers proxy_env to be empty if $proxy_host is false or ''

This results in apt::ppa to consider $proxy_host to be set when the default undef is used
breaking ppa resources because $proxy_env becomes:
  [http_proxy=http://:8080, https_proxy=http://:8080]

Fix this by making both apt and apt::ppa consider $proxy_host to be unset when it is
any of false, '', or undef.
@daenney
Copy link

daenney commented Jul 11, 2014

You've broken the tests because you haven't update the tests to the new behaviour. Until this is green we can't even consider this for merge, no matter how broken the current implementation is.

Please merge and release, apt::ppa is unusable as-is.

Comments like these aren't very helpful. If anything on a personal level I tend to turn away from contributions that try to pressure me into doing something because they need it 'right now'.

@dantman
Copy link
Author

dantman commented Jul 11, 2014

Sorry, you're right I broke the tests. It was difficult but I managed to run the tests now. I didn't need to change the tests, I made a mistake in my implementation that broke the with proxy behaviour. I've fixed the mistake. If you see any others I'll fix them.

And sorry for the pressure. But including this in a point/patch release after it's reviewed and merged would be appreciated since apt::ppa cannot be used on most hosts from the version in the forge since this bug cannot be worked around (using false or '' would result in 01proxy breaking instead).

@daenney
Copy link

daenney commented Jul 12, 2014

@mhaskel @apenney Could you guys look at this for a sec? It looks good to me but I'm not sure of the impact it might have. Would be nice to get that in for 1.5.1 though.

@dantman
Copy link
Author

dantman commented Jul 17, 2014

Looks like 1.5.1 has been released first. Is there anything I can cleanup in this pull request?

I notice now this repo has a 1.5.x branch that those releases are tagged from, which isn't merged into or from master. Should I rebase/cherry-pick so this pull-request is pulled into 1.5.x instead of master?

@underscorgan
Copy link

@dantman our next planned release is 1.6.0, which should be coming out in the next couple of weeks, and this will definitely be included there. Would a 1.5.3 release with bugfixes backported be important to you? We could probably get that out next week if need be. If so, I'll handle the necessary cherry-picking.

Thanks for the contribution!

underscorgan pushed a commit that referenced this pull request Jul 30, 2014
Fix inconsistent $proxy_host handling in apt and apt::ppa.
@underscorgan underscorgan merged commit 84b53dc into puppetlabs:master Jul 30, 2014
@dantman
Copy link
Author

dantman commented Aug 6, 2014

@mhaskel Sorry for not responding.

Strictly speaking since this is a bug a point/bug release would be a good idea anyways.

I do depend on some key PPAs for our main overseer/puppetmaster so whenever I make it replicate and bootstrap itself I have to go in and manually replace the puppetlabs/apt module with a git clone.

@underscorgan
Copy link

@dantman we're going to try to get this rolled into a 1.5.3 release for next week.

@underscorgan
Copy link

@dantman We released apt 1.6.0 today that contains a fix for this issue. Could you possibly upgrade to 1.6.0?

@dantman
Copy link
Author

dantman commented Aug 14, 2014

@mhaskel ^_^ I don't have a version restriction for puppetlabs/apt right now, so with a new release my issue should already be fixed, thanks.

@LukasAud LukasAud added the bugfix label Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants