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

Allow domain to return zero resources without failing #589

Open
brandtkeller opened this issue Aug 12, 2024 · 2 comments · May be fixed by #704
Open

Allow domain to return zero resources without failing #589

brandtkeller opened this issue Aug 12, 2024 · 2 comments · May be fixed by #704
Assignees
Labels
enhancement New feature or request

Comments

@brandtkeller
Copy link
Member

Describe what should be investigated or refactored

In thinking about general workflows for best-practices and STIG's, Lula may want to support the ability to return zero resources from a domain data collection activity.

Currently the inability to find > 0 resources will fail a Validation as not evaluated as there were no items found.

I thinking about something such as a best practice or STIG - there are at least two primary scenarios:

  1. If a resource exists -> perform policy evaluation to determine adherence
  2. If a resource does not exist -> there is no applicable evaluation to be done (IE success)

both of these should be drive from the provider policy instead of the domain. This allows the validation author to write a policy that either passes or fails when zero resources are retrieved.

@github-actions github-actions bot added the triage Awaiting triage from the team label Aug 12, 2024
@meganwolf0
Copy link
Collaborator

I like this issue and agree that auto-failing with no resources isn't great. However, I will say that this will probably need to be coupled with updated validations/tests, as I'm not sure that they all pass with zero input conditions. Since that wasn't a possible outcome I didn't always include that in the testing options. Depending on how the input is structured (e.g., {some-resource: {}} or just {}) will probably impact those policies.

@brandtkeller brandtkeller added enhancement New feature or request and removed triage Awaiting triage from the team labels Aug 12, 2024
@brandtkeller brandtkeller added this to the Quality of life milestone Aug 29, 2024
@brandtkeller
Copy link
Member Author

@brandtkeller brandtkeller self-assigned this Oct 4, 2024
@brandtkeller brandtkeller linked a pull request Oct 4, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🏗 In Progress
Development

Successfully merging a pull request may close this issue.

2 participants