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

performance: avoid failing test case if a process cannot be found #1564

Conversation

jmontesi
Copy link
Contributor

It applies to rt-apps-no-exec-probes.

The reason a process cannot be found after it has been properly retrieved previously could be that the process has finished. So, in this case it seems more adequate to just ignore it than to produce an error. If the error is of another kind, the container is added to the non compliant list but the processing for that container continues instead of breaking, to have more info on the processes.

The commit also changes the verification order in that test case, making the faster check of exec probes at the beginning, skipping the slower part in which the processes are list.

Finally, the compliant containers are added to its list with the reason for compliance.

It applies to rt-apps-no-exec-probes.

The reason a process cannot be found after it has been properly
retrieved previously could be that the process has finished. So, in this
case it seems more adequate to just ignore it than to produce an error.
If the error is of another kind the container is added to the non
compliant list but the processing for that container continues instead
of breaking, to have more info on the processes.

The commit also changes the verification order in that test case, making
the faster check of exec probes at the beginning, skipping the slower
part in which the processes are list.

Finally, the compliant containers are added to its list with the reason
for compliance.
@jmontesi jmontesi requested a review from greyerof October 27, 2023 10:21
@jmontesi jmontesi merged commit d6177a4 into redhat-best-practices-for-k8s:main Oct 31, 2023
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.

4 participants