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

fixing file.managed with requests lib #32315

Merged
merged 1 commit into from
Apr 4, 2016

Conversation

ahus1
Copy link
Contributor

@ahus1 ahus1 commented Apr 2, 2016

What does this PR do?

This PR fixes the use of the requests lib when retrieving files via http. This worked in 2015.5, but stopped working in 2015.8.

In 2015.5 and before requests lib is the only way to retrieve files via a http proxy.

What issues does this PR fix or reference?

This issue was also mentioned as part of #23617 for the 2015.8 branch (@The-Loeki commented on 8 Oct 2015).

Previous Behavior

The following code downloads the file correctly in 2015.5, but retrieves an empty file in 2015.8.

# minon
requests_lib: True

# state.sls
{% set docker_compose_completion_url = 'https://raw.githubusercontent.com/docker/compose/1.6.2/contrib/completion/bash/docker-compose' %}
{% set docker_compose_completion_hash = '03bb978332f6a9c047314f15f901805459cac2647ccb6f7606a87209a6c3c0d4' %}

/etc/bash_completion.d/docker-compose.bash:
  file.managed:
    - source: {{ docker_compose_completion_url }}
    - source_hash: sha256={{ docker_compose_completion_hash }}
    - mode: 644

Tests written?

No - a hint on how to write a test for this would be appreciated.

This was manually tested on 2015.8.8.2 on CentOS

@cachedout cachedout merged commit 4389680 into saltstack:2015.8 Apr 4, 2016
@ahus1 ahus1 deleted the fix_file_managed_http_requests branch May 23, 2016 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants