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

Ensure uri module always returns status even on failure #56240

Merged
merged 4 commits into from May 23, 2019

Conversation

samdoran
Copy link
Contributor

@samdoran samdoran commented May 8, 2019

SUMMARY

Fixes #55897

Also return url and update docs for other values to indicate they are only returned on success.
Add integration tests

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

lib/ansible/module_utils/urls.py

ADDITIONAL INFORMATION

This seems a bit "leaky" in that I have to change the behavior of urls.py to make uri.py behave as documented. If this fix seems ok. I will also add unit tests.

Also return url and update docs for other values to indicate they are only returned on success.

Add integration tests
@samdoran samdoran requested a review from sivel May 8, 2019 20:04
@ansibot ansibot added WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. net_tools Net-tools category support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels May 8, 2019
@samdoran samdoran changed the title [WIP] Ensure uri module always returns status even on failure Ensure uri module always returns status even on failure May 9, 2019
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. labels May 11, 2019
@jillr jillr removed the needs_triage Needs a first human triage before being processed. label May 16, 2019
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label May 19, 2019
@samdoran samdoran force-pushed the issue/55897-uri-invalid-cert-status branch from 3e0d377 to 863dbf2 Compare May 20, 2019 19:40
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels May 20, 2019
@samdoran samdoran requested review from sivel and removed request for sivel May 20, 2019 21:07
@samdoran samdoran merged commit 8f4f375 into ansible:devel May 23, 2019
@samdoran samdoran deleted the issue/55897-uri-invalid-cert-status branch May 23, 2019 14:17
samdoran added a commit to samdoran/ansible that referenced this pull request May 23, 2019
…nsible#56240)

- Also return url and update docs for other values to indicate they are only returned on success.
- Add integration tests
- Use info variable for common return values
- Use -1 as default status rather than None. This is lines up with with existing code in urls.py
- Add unit tests to ensure status and url are returned on failure
(cherry picked from commit 8f4f375)

Co-authored-by: Sam Doran <sdoran@redhat.com>
samdoran added a commit to samdoran/ansible that referenced this pull request May 23, 2019
…nsible#56240)

- Also return url and update docs for other values to indicate they are only returned on success.
- Add integration tests
- Use info variable for common return values
- Use -1 as default status rather than None. This is lines up with with existing code in urls.py
- Add unit tests to ensure status and url are returned on failure.
(cherry picked from commit 8f4f375)

Co-authored-by: Sam Doran <sdoran@redhat.com>
abadger pushed a commit that referenced this pull request May 24, 2019
…56240)

- Also return url and update docs for other values to indicate they are only returned on success.
- Add integration tests
- Use info variable for common return values
- Use -1 as default status rather than None. This is lines up with with existing code in urls.py
- Add unit tests to ensure status and url are returned on failure
(cherry picked from commit 8f4f375)

Co-authored-by: Sam Doran <sdoran@redhat.com>
@ansible ansible locked and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. net_tools Net-tools category support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

uri module does not set status with invalid SSL certificate
4 participants