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

memset*.py: Fixed URLError handling #6114

Merged
merged 5 commits into from
Mar 8, 2023
Merged

memset*.py: Fixed URLError handling #6114

merged 5 commits into from
Mar 8, 2023

Conversation

danopt
Copy link
Contributor

@danopt danopt commented Feb 28, 2023

SUMMARY

Hi,

the memset modules are currently missing URLError handling.

Current behavior
grafik

Expected behavior
grafik

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME
  • memset.py
  • memset_zone.py
  • memset_zone_record.py
  • memset_zone_domain.py
  • memset_server_info.py
  • memset_memstore_info.py
  • memset_dns_reload.py
ADDITIONAL INFORMATION

Steps to reproduce:

Run the following Playbook and turn off your internet connection:

---
- name: Example playbook for localhost
  hosts: localhost
  gather_facts: no

  tasks:

    - name:
      community.general.memset_server_info:
        api_key: "12345678abcdefghi"
        name: "test"
      ignore_errors: true

    - name:
      community.general.memset_dns_reload:
        api_key: "12345678abcdefghi"
      ignore_errors: true

    - name:
      community.general.memset_memstore_info:
        api_key: "12345678abcdefghi"
        name: "test"
      ignore_errors: true

    - name:
      community.general.memset_zone_domain:
        api_key: "12345678abcdefghi"
        domain: "test"
        zone: "test"
      ignore_errors: true

    - name:
      community.general.memset_zone_record:
        api_key: "12345678abcdefghi"
        type: A
        zone: "test"
        address: "ip"
      ignore_errors: true

    - name:
      community.general.memset_zone:
        api_key: "12345678abcdefghi"
        state: present
        name: "test"
      ignore_errors: true

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug cloud module module module_utils module_utils new_contributor Help guide this first time contributor plugins plugin (any type) labels Feb 28, 2023
@danopt danopt changed the title memset modules: Fix URLError handling WIP: memset modules: Fix URLError handling Feb 28, 2023
@ansibullbot ansibullbot added the WIP Work in progress label Feb 28, 2023
@danopt danopt changed the title WIP: memset modules: Fix URLError handling memset*.py: Fixed URLError handling Feb 28, 2023
@ansibullbot ansibullbot removed the WIP Work in progress label Feb 28, 2023
Copy link

@glitchcrab glitchcrab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally speaking this looks fine, however I no longer work for Memset and I haven't worked on these modules in years.

@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-5 labels Mar 1, 2023
@felixfontein
Copy link
Collaborator

I'll merge if nobody objects in, say, a week.

@felixfontein felixfontein merged commit 6cf6744 into ansible-collections:main Mar 8, 2023
@patchback
Copy link

patchback bot commented Mar 8, 2023

Backport to stable-5: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-5/6cf674485ff85c46ce7fd1464ac4f71a22e93aa0/pr-6114

Backported as #6156

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Mar 8, 2023
patchback bot pushed a commit that referenced this pull request Mar 8, 2023
* memset.py: Added URLError exception and stderr to Response() object

* memset_*.py: Check response.status_code and response.stderr

* Added changelog fragment

* memset.py: Fixed pep8

* Renamed changelog fragment with .yml file extension

(cherry picked from commit 6cf6744)
@patchback
Copy link

patchback bot commented Mar 8, 2023

Backport to stable-6: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-6/6cf674485ff85c46ce7fd1464ac4f71a22e93aa0/pr-6114

Backported as #6157

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Mar 8, 2023
* memset.py: Added URLError exception and stderr to Response() object

* memset_*.py: Check response.status_code and response.stderr

* Added changelog fragment

* memset.py: Fixed pep8

* Renamed changelog fragment with .yml file extension

(cherry picked from commit 6cf6744)
@felixfontein
Copy link
Collaborator

@danopt thanks for your contribution!
@glitchcrab thanks for reviewing this!

@github-actions
Copy link

github-actions bot commented Mar 8, 2023

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.

felixfontein pushed a commit that referenced this pull request Mar 8, 2023
…dling (#6156)

memset*.py: Fixed URLError handling (#6114)

* memset.py: Added URLError exception and stderr to Response() object

* memset_*.py: Check response.status_code and response.stderr

* Added changelog fragment

* memset.py: Fixed pep8

* Renamed changelog fragment with .yml file extension

(cherry picked from commit 6cf6744)

Co-authored-by: Daniel Patrick <dani.p1991@gmail.com>
felixfontein pushed a commit that referenced this pull request Mar 8, 2023
…dling (#6157)

memset*.py: Fixed URLError handling (#6114)

* memset.py: Added URLError exception and stderr to Response() object

* memset_*.py: Check response.status_code and response.stderr

* Added changelog fragment

* memset.py: Fixed pep8

* Renamed changelog fragment with .yml file extension

(cherry picked from commit 6cf6744)

Co-authored-by: Daniel Patrick <dani.p1991@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug cloud module_utils module_utils module module new_contributor Help guide this first time contributor plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants