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

[InventoryManager] Fix two unhandled exceptions #73667

Merged
merged 1 commit into from Feb 22, 2021

Conversation

relrod
Copy link
Member

@relrod relrod commented Feb 20, 2021

SUMMARY

Change:

  • Fix regression: unhandled exception when given inventory directory
    is empty or contains empty subdirectories.
  • Fix unhandled exception when limit file is actually a directory
    instead of a file.
  • Fix inventory tests which previously could never fail due to missing
    set -e. Fixed up tests that failed after set -e was added. Added
    several tests.

Test Plan:

  • New tests
  • Fixed existing tests which previously could never fail

Tickets:

Signed-off-by: Rick Elrod rick@elrod.me

ISSUE TYPE
  • Bugfix Pull Request
  • Test Pull Request
COMPONENT NAME

inventory

Change:
- Fix regression: unhandled exception when given inventory directory
  is empty or contains empty subdirectories.
- Fix unhandled exception when limit file is actually a directory
  instead of a file.
- Fix inventory tests which previously could never fail due to missing
  `set -e`. Fixed up tests that failed after `set -e` was added. Added
  several tests.

Test Plan:
- New tests
- Fixed existing tests which previously could never fail

Tickets:
- Fixes ansible#73658

Signed-off-by: Rick Elrod <rick@elrod.me>
@ansibot ansibot added affects_2.11 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. inventory Inventory category needs_triage Needs a first human triage before being processed. 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 Feb 20, 2021
@bcoca bcoca merged commit fa046d3 into ansible:devel Feb 22, 2021
@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label Feb 23, 2021
@ansible ansible locked and limited conversation to collaborators Mar 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.11 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. inventory Inventory 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.

Non bound local variable causes inventory parsing fail.
3 participants