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

Validate inventory file (#662) #1182

Open
wants to merge 6 commits into
base: 3.x
Choose a base branch
from

Conversation

simonhammes
Copy link
Contributor

No description provided.

pyinfra_cli/inventory.py Outdated Show resolved Hide resolved
pyinfra_cli/inventory.py Outdated Show resolved Hide resolved
Copy link
Member

@Fizzadar Fizzadar left a comment

Choose a reason for hiding this comment

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

This looks great so far, thank you @simonhammes!

I think long term pyinfra should be moving towards inventory functions as the default to avoid the weird "list or tuple" thing for hosts/groups.

There's also potential for a DSL kind of inventory, but that's a future problem :)

@simonhammes
Copy link
Contributor Author

simonhammes commented Oct 31, 2024

This looks great so far, thank you @simonhammes!

🙏

I think long term pyinfra should be moving towards inventory functions as the default to avoid the weird "list or tuple" thing for hosts/groups.

That seems like a wise decision imho.
Should I even bother to fix the generator support (see the open thread in this PR)? Or just update the documentation?

EDIT: I'll also add some tests.

@Fizzadar
Copy link
Member

That seems like a wise decision imho. Should I even bother to fix the generator support (see the open thread in this PR)? Or just update the documentation?

Let's just update the docs, would rather not increase complexity of the current situation!

Copy link
Member

@Fizzadar Fizzadar left a comment

Choose a reason for hiding this comment

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

Change looks great so far, tests would tie this up nicely!

@simonhammes
Copy link
Contributor Author

That seems like a wise decision imho. Should I even bother to fix the generator support (see the open thread in this PR)? Or just update the documentation?

Let's just update the docs, would rather not increase complexity of the current situation!

Thanks for the feedback, I have updated the docs.

Change looks great so far, tests would tie this up nicely!

Thank you! I agree, I'll add some tests.

@simonhammes
Copy link
Contributor Author

Let me know if you had something else in mind re: tests 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Did not know where to put this - maybe into deploy/inventories?

@simonhammes simonhammes marked this pull request as ready for review November 19, 2024 00:09
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.

2 participants