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

tools/c7n_org - exit early on an empty list of accounts or policies #8515

Merged

Conversation

ajkerrigan
Copy link
Member

If after filtering accounts and policies we have an empty list of either, there's no point in continuing a c7n-org run. Bailing early should avoid some unnecessary work (along with some errors that might come up when trying to operate on an empty list of targets).

Closes #8441
Closes #8486

@ajkerrigan ajkerrigan requested a review from kapilt as a code owner April 24, 2023 18:10
Copy link
Collaborator

@kapilt kapilt left a comment

Choose a reason for hiding this comment

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

lgtm, thanks

@ajkerrigan ajkerrigan merged commit e8a3e92 into cloud-custodian:main Apr 25, 2023
21 checks passed
@ajkerrigan ajkerrigan deleted the c7n-org/nothing-to-do-bail-early branch April 25, 2023 18:27
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.

c7n-org -l option fails when no policies match c7n-org fails if all policies filtered out
2 participants