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 load_provider returning None on AnsibleFallbackNotFound (#557) #558

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

jk464
Copy link
Contributor

@jk464 jk464 commented Jul 5, 2023

SUMMARY

Fixes #557

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

load_provider

ADDITIONAL INFORMATION

This fixes load_provider to handle AnsibleFallbackNotFound Exceptions when attempting to evaulate a fallback value for a key in the provider and will instead attempt to use the default value if it exists, or sets it to None otherwise.

This is a change to the old behaviour where default values would be ignored if a fallback option was defined but fails to be evaluated.

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/66d7e694f7be4fe58bbd5627731b3f0d

ansible-test-network-integration-junos-vsrx-netconf-python36-stable29 FAILURE in 13m 15s (non-voting)
ansible-test-network-integration-junos-vsrx-netconf-python36-stable211 RETRY_LIMIT in 5m 51s
✔️ ansible-test-network-integration-junos-vsrx-netconf-python39-stable212 SUCCESS in 1h 04m 44s
✔️ ansible-test-network-integration-junos-vsrx-netconf-python39 SUCCESS in 51m 49s
ansible-test-network-integration-junos-vsrx-network_cli-python36-stable29 FAILURE in 12m 18s (non-voting)
ansible-test-network-integration-junos-vsrx-network_cli-python36-stable211 FAILURE in 25m 48s
✔️ ansible-test-network-integration-junos-vsrx-network_cli-python39-stable212 SUCCESS in 15m 42s
✔️ ansible-test-network-integration-junos-vsrx-network_cli-python39 SUCCESS in 16m 27s
ansible-test-network-integration-junos-vsrx-network_cli-libssh-python36-stable29 FAILURE in 13m 41s (non-voting)
✔️ ansible-test-network-integration-junos-vsrx-network_cli-libssh-python36-stable211 SUCCESS in 16m 35s
ansible-test-network-integration-junos-vsrx-network_cli-libssh-python39-stable212 FAILURE in 13m 14s
✔️ ansible-test-network-integration-junos-vsrx-network_cli-libssh-python39 SUCCESS in 15m 24s
✔️ ansible-test-network-integration-nxos-cli-python39-scenario01 SUCCESS in 29m 06s (non-voting)
✔️ ansible-test-network-integration-nxos-cli-python39-scenario02 SUCCESS in 28m 40s (non-voting)
✔️ ansible-test-network-integration-nxos-cli-python39-scenario03 SUCCESS in 37m 07s (non-voting)
✔️ ansible-test-network-integration-nxos-cli-python39-scenario04 SUCCESS in 28m 17s (non-voting)
✔️ ansible-test-network-integration-eos-network_cli-python39 SUCCESS in 51m 52s (non-voting)
✔️ ansible-test-network-integration-eos-httpapi-python39 SUCCESS in 42m 22s (non-voting)
✔️ ansible-test-network-integration-eos-network_cli-libssh-python39 SUCCESS in 51m 14s (non-voting)
ansible-ee-integration-ios-latest FAILURE in 15m 33s (non-voting)
ansible-ee-integration-ios-stable-2.9 FAILURE in 14m 42s (non-voting)
ansible-ee-integration-ios-stable-2.11 FAILURE in 14m 17s (non-voting)
ansible-ee-integration-ios-stable-2.12 FAILURE in 15m 39s (non-voting)
ansible-ee-integration-ios-libssh-latest FAILURE in 42m 43s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 39m 47s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 43m 29s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 43m 45s (non-voting)
ansible-test-network-integration-vyos-paramiko-python39-devel NODE_FAILURE Node request 200-0006174784 failed in 0s
ansible-test-network-integration-vyos-paramiko-python39-stable214 NODE_FAILURE Node request 200-0006174785 failed in 0s
ansible-test-network-integration-vyos-paramiko-python39-stable213 NODE_FAILURE Node request 200-0006174786 failed in 0s
ansible-test-network-integration-vyos-paramiko-python39-stable212 NODE_FAILURE Node request 200-0006174787 failed in 0s
ansible-test-network-integration-vyos-paramiko-python36-stable29 NODE_FAILURE Node request 200-0006174788 failed in 0s (non-voting)
ansible-test-network-integration-vyos-libssh-python39-devel NODE_FAILURE Node request 200-0006174789 failed in 0s
ansible-test-network-integration-vyos-libssh-python39-stable214 NODE_FAILURE Node request 200-0006174790 failed in 0s
ansible-test-network-integration-vyos-libssh-python39-stable213 NODE_FAILURE Node request 200-0006174791 failed in 0s
ansible-test-network-integration-vyos-libssh-python39-stable212 NODE_FAILURE Node request 200-0006174792 failed in 0s
ansible-test-network-integration-vyos-libssh-python36-stable29 NODE_FAILURE Node request 200-0006174793 failed in 0s
✔️ build-ansible-collection SUCCESS in 14m 37s
✔️ ansible-test-network-integration-ansible-netcommon-junos-vsrx-netconf-python39 SUCCESS in 12m 25s
✔️ ansible-tox-linters SUCCESS in 10m 39s
✔️ ansible-galaxy-importer SUCCESS in 4m 06s

Copy link
Collaborator

@Qalthos Qalthos left a comment

Choose a reason for hiding this comment

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

Can you please add a changelog fragment to your PR? Thanks!

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/0595233197a1484d8113259a4a6578ee

ansible-test-network-integration-junos-vsrx-netconf-python36-stable29 FAILURE in 13m 56s (non-voting)
✔️ ansible-test-network-integration-junos-vsrx-netconf-python36-stable211 SUCCESS in 1h 15m 39s
✔️ ansible-test-network-integration-junos-vsrx-netconf-python39-stable212 SUCCESS in 1h 04m 22s
ansible-test-network-integration-junos-vsrx-netconf-python39 RETRY_LIMIT in 7m 41s
ansible-test-network-integration-junos-vsrx-network_cli-python36-stable29 FAILURE in 13m 06s (non-voting)
✔️ ansible-test-network-integration-junos-vsrx-network_cli-python36-stable211 SUCCESS in 17m 47s
✔️ ansible-test-network-integration-junos-vsrx-network_cli-python39-stable212 SUCCESS in 16m 28s
ansible-test-network-integration-junos-vsrx-network_cli-python39 RETRY_LIMIT in 7m 42s
ansible-test-network-integration-junos-vsrx-network_cli-libssh-python36-stable29 FAILURE in 16m 26s (non-voting)
✔️ ansible-test-network-integration-junos-vsrx-network_cli-libssh-python36-stable211 SUCCESS in 17m 45s
✔️ ansible-test-network-integration-junos-vsrx-network_cli-libssh-python39-stable212 SUCCESS in 16m 15s
ansible-test-network-integration-junos-vsrx-network_cli-libssh-python39 RETRY_LIMIT in 7m 41s
✔️ ansible-test-network-integration-nxos-cli-python39-scenario01 SUCCESS in 32m 04s (non-voting)
✔️ ansible-test-network-integration-nxos-cli-python39-scenario02 SUCCESS in 28m 26s (non-voting)
ansible-test-network-integration-nxos-cli-python39-scenario03 FAILURE in 18m 20s (non-voting)
ansible-test-network-integration-nxos-cli-python39-scenario04 FAILURE in 24m 14s (non-voting)
ansible-test-network-integration-eos-network_cli-python39 RETRY_LIMIT in 5m 41s (non-voting)
ansible-test-network-integration-eos-httpapi-python39 RETRY_LIMIT in 56s (non-voting)
ansible-test-network-integration-eos-network_cli-libssh-python39 RETRY_LIMIT in 1m 05s (non-voting)
ansible-ee-integration-ios-latest FAILURE in 17m 32s (non-voting)
ansible-ee-integration-ios-stable-2.9 FAILURE in 17m 09s (non-voting)
ansible-ee-integration-ios-stable-2.11 FAILURE in 17m 49s (non-voting)
ansible-ee-integration-ios-stable-2.12 NODE_FAILURE Node request 200-0006254644 failed in 0s (non-voting)
ansible-ee-integration-ios-libssh-latest FAILURE in 12m 52s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 13m 27s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 12m 55s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 13m 34s (non-voting)
ansible-test-network-integration-vyos-paramiko-python39-devel NODE_FAILURE Node request 200-0006254649 failed in 0s
ansible-test-network-integration-vyos-paramiko-python39-stable214 NODE_FAILURE Node request 200-0006254650 failed in 0s
ansible-test-network-integration-vyos-paramiko-python39-stable213 NODE_FAILURE Node request 200-0006254651 failed in 0s
ansible-test-network-integration-vyos-paramiko-python39-stable212 NODE_FAILURE Node request 200-0006254652 failed in 0s
ansible-test-network-integration-vyos-paramiko-python36-stable29 NODE_FAILURE Node request 200-0006254653 failed in 0s (non-voting)
ansible-test-network-integration-vyos-libssh-python39-devel NODE_FAILURE Node request 200-0006254654 failed in 0s
ansible-test-network-integration-vyos-libssh-python39-stable214 NODE_FAILURE Node request 200-0006254655 failed in 0s
ansible-test-network-integration-vyos-libssh-python39-stable213 NODE_FAILURE Node request 200-0006254656 failed in 0s
ansible-test-network-integration-vyos-libssh-python39-stable212 NODE_FAILURE Node request 200-0006254657 failed in 0s
ansible-test-network-integration-vyos-libssh-python36-stable29 NODE_FAILURE Node request 200-0006254658 failed in 0s
✔️ build-ansible-collection SUCCESS in 14m 49s
ansible-test-network-integration-ansible-netcommon-junos-vsrx-netconf-python39 RETRY_LIMIT in 55s
✔️ ansible-tox-linters SUCCESS in 10m 47s
✔️ ansible-galaxy-importer SUCCESS in 4m 54s

@jk464
Copy link
Contributor Author

jk464 commented Aug 15, 2023

@Qalthos I've added changelogs/fragments/558-load_provider.yml

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/da9e140efbba46db842e65943888d329

ansible-test-network-integration-junos-vsrx-netconf-python36-stable29 FAILURE in 13m 32s (non-voting)
✔️ ansible-test-network-integration-junos-vsrx-netconf-python36-stable211 SUCCESS in 1h 16m 55s
✔️ ansible-test-network-integration-junos-vsrx-netconf-python39-stable212 SUCCESS in 1h 05m 35s
ansible-test-network-integration-junos-vsrx-netconf-python39 RETRY_LIMIT in 5m 47s
ansible-test-network-integration-junos-vsrx-network_cli-python36-stable29 FAILURE in 13m 04s (non-voting)
✔️ ansible-test-network-integration-junos-vsrx-network_cli-python36-stable211 SUCCESS in 17m 10s
✔️ ansible-test-network-integration-junos-vsrx-network_cli-python39-stable212 SUCCESS in 15m 51s
ansible-test-network-integration-junos-vsrx-network_cli-python39 RETRY_LIMIT in 5m 42s
ansible-test-network-integration-junos-vsrx-network_cli-libssh-python36-stable29 FAILURE in 16m 00s (non-voting)
✔️ ansible-test-network-integration-junos-vsrx-network_cli-libssh-python36-stable211 SUCCESS in 16m 37s
ansible-test-network-integration-junos-vsrx-network_cli-libssh-python39-stable212 FAILURE in 13m 28s
ansible-test-network-integration-junos-vsrx-network_cli-libssh-python39 RETRY_LIMIT in 7m 15s
✔️ ansible-test-network-integration-nxos-cli-python39-scenario01 SUCCESS in 30m 19s (non-voting)
✔️ ansible-test-network-integration-nxos-cli-python39-scenario02 SUCCESS in 28m 42s (non-voting)
ansible-test-network-integration-nxos-cli-python39-scenario03 FAILURE in 37m 59s (non-voting)
✔️ ansible-test-network-integration-nxos-cli-python39-scenario04 SUCCESS in 28m 36s (non-voting)
ansible-test-network-integration-eos-network_cli-python39 RETRY_LIMIT in 5m 19s (non-voting)
ansible-test-network-integration-eos-httpapi-python39 RETRY_LIMIT in 5m 16s (non-voting)
ansible-test-network-integration-eos-network_cli-libssh-python39 RETRY_LIMIT in 5m 28s (non-voting)
ansible-ee-integration-ios-latest FAILURE in 14m 58s (non-voting)
ansible-ee-integration-ios-stable-2.9 FAILURE in 15m 00s (non-voting)
ansible-ee-integration-ios-stable-2.11 FAILURE in 12m 32s (non-voting)
ansible-ee-integration-ios-stable-2.12 FAILURE in 14m 49s (non-voting)
ansible-ee-integration-ios-libssh-latest FAILURE in 12m 54s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 15m 33s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 15m 23s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 15m 31s (non-voting)
ansible-test-network-integration-vyos-paramiko-python39-devel NODE_FAILURE Node request 200-0006288556 failed in 0s
ansible-test-network-integration-vyos-paramiko-python39-stable214 NODE_FAILURE Node request 200-0006288557 failed in 0s
ansible-test-network-integration-vyos-paramiko-python39-stable213 NODE_FAILURE Node request 200-0006288558 failed in 0s
ansible-test-network-integration-vyos-paramiko-python39-stable212 NODE_FAILURE Node request 200-0006288559 failed in 0s
ansible-test-network-integration-vyos-paramiko-python36-stable29 NODE_FAILURE Node request 200-0006288560 failed in 0s (non-voting)
ansible-test-network-integration-vyos-libssh-python39-devel NODE_FAILURE Node request 200-0006288561 failed in 0s
ansible-test-network-integration-vyos-libssh-python39-stable214 NODE_FAILURE Node request 200-0006288562 failed in 0s
ansible-test-network-integration-vyos-libssh-python39-stable213 NODE_FAILURE Node request 200-0006288563 failed in 0s
ansible-test-network-integration-vyos-libssh-python39-stable212 NODE_FAILURE Node request 200-0006288564 failed in 0s
ansible-test-network-integration-vyos-libssh-python36-stable29 NODE_FAILURE Node request 200-0006288565 failed in 0s
✔️ build-ansible-collection SUCCESS in 14m 57s
ansible-test-network-integration-ansible-netcommon-junos-vsrx-netconf-python39 RETRY_LIMIT in 7m 34s
✔️ ansible-tox-linters SUCCESS in 11m 03s
✔️ ansible-galaxy-importer SUCCESS in 4m 48s

@jk464 jk464 requested a review from Qalthos August 23, 2023 11:16
@Qalthos Qalthos added the bug This issue/PR relates to a bug. label Sep 5, 2023
@softwarefactory-project-zuul
Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/7ea37af356c94726a0f1a0328e7b885e

ansible-test-network-integration-junos-vsrx-netconf-python36-stable29 FAILURE in 14m 34s (non-voting)
✔️ ansible-test-network-integration-junos-vsrx-netconf-python36-stable211 SUCCESS in 1h 17m 45s
✔️ ansible-test-network-integration-junos-vsrx-netconf-python39-stable212 SUCCESS in 1h 06m 34s
ansible-test-network-integration-junos-vsrx-netconf-python39 RETRY_LIMIT in 8m 59s
ansible-test-network-integration-junos-vsrx-network_cli-python36-stable29 FAILURE in 13m 13s (non-voting)
✔️ ansible-test-network-integration-junos-vsrx-network_cli-python36-stable211 SUCCESS in 17m 16s
✔️ ansible-test-network-integration-junos-vsrx-network_cli-python39-stable212 SUCCESS in 15m 35s
ansible-test-network-integration-junos-vsrx-network_cli-python39 RETRY_LIMIT in 8m 50s
ansible-test-network-integration-junos-vsrx-network_cli-libssh-python36-stable29 FAILURE in 16m 47s (non-voting)
✔️ ansible-test-network-integration-junos-vsrx-network_cli-libssh-python36-stable211 SUCCESS in 17m 19s
✔️ ansible-test-network-integration-junos-vsrx-network_cli-libssh-python39-stable212 SUCCESS in 16m 39s
ansible-test-network-integration-junos-vsrx-network_cli-libssh-python39 RETRY_LIMIT in 8m 20s
✔️ ansible-test-network-integration-nxos-cli-python39-scenario01 SUCCESS in 30m 57s (non-voting)
✔️ ansible-test-network-integration-nxos-cli-python39-scenario02 SUCCESS in 29m 10s (non-voting)
ansible-test-network-integration-nxos-cli-python39-scenario03 FAILURE in 35m 55s (non-voting)
✔️ ansible-test-network-integration-nxos-cli-python39-scenario04 SUCCESS in 27m 44s (non-voting)
ansible-test-network-integration-eos-network_cli-python39 RETRY_LIMIT in 2m 49s (non-voting)
ansible-test-network-integration-eos-httpapi-python39 RETRY_LIMIT in 2m 30s (non-voting)
ansible-test-network-integration-eos-network_cli-libssh-python39 RETRY_LIMIT in 5m 05s (non-voting)
ansible-ee-integration-ios-latest FAILURE in 12m 06s (non-voting)
ansible-ee-integration-ios-stable-2.9 FAILURE in 14m 17s (non-voting)
ansible-ee-integration-ios-stable-2.11 FAILURE in 12m 24s (non-voting)
ansible-ee-integration-ios-stable-2.12 FAILURE in 16m 06s (non-voting)
ansible-ee-integration-ios-libssh-latest FAILURE in 14m 10s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 14m 06s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 13m 09s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 15m 57s (non-voting)
ansible-test-network-integration-vyos-paramiko-python39-devel NODE_FAILURE Node request 200-0006357676 failed in 0s
ansible-test-network-integration-vyos-paramiko-python39-stable214 NODE_FAILURE Node request 200-0006357677 failed in 0s
ansible-test-network-integration-vyos-paramiko-python39-stable213 NODE_FAILURE Node request 200-0006357678 failed in 0s
ansible-test-network-integration-vyos-paramiko-python39-stable212 NODE_FAILURE Node request 200-0006357679 failed in 0s
ansible-test-network-integration-vyos-paramiko-python36-stable29 NODE_FAILURE Node request 200-0006357680 failed in 0s (non-voting)
ansible-test-network-integration-vyos-libssh-python39-devel NODE_FAILURE Node request 200-0006357681 failed in 0s
ansible-test-network-integration-vyos-libssh-python39-stable214 NODE_FAILURE Node request 200-0006357682 failed in 0s
ansible-test-network-integration-vyos-libssh-python39-stable213 NODE_FAILURE Node request 200-0006357683 failed in 0s
ansible-test-network-integration-vyos-libssh-python39-stable212 NODE_FAILURE Node request 200-0006357684 failed in 0s
ansible-test-network-integration-vyos-libssh-python36-stable29 NODE_FAILURE Node request 200-0006357685 failed in 0s
✔️ build-ansible-collection SUCCESS in 14m 31s
ansible-test-network-integration-ansible-netcommon-junos-vsrx-netconf-python39 RETRY_LIMIT in 7m 45s
✔️ ansible-tox-linters SUCCESS in 10m 51s
✔️ ansible-galaxy-importer SUCCESS in 3m 56s

@Qalthos Qalthos merged commit c65e32c into ansible-collections:main Sep 6, 2023
51 of 52 checks passed
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error in load_provider causes type validation issues
2 participants