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

Make tests verbose about startup failures #1473

Merged
merged 4 commits into from
Dec 19, 2023

Conversation

erthalion
Copy link
Contributor

Description

In the past we've got situations when the CI integration tests reports were not extensive enough to clarify what's going on, and we were launching a full-blown debugging process just to find out that the probes were missing.

To make initialization issues more visible, make integration tests verbose about them:

  • Introduce a HEALTHCHECK for the Collector docker image, based on the /ready Civet API. This command would be ignored on K8S, but we could use it on CI for containers filtering.

  • Wait for Collector container to become healthy first before proceeding with the rest of tests. This will make it immediately clear if the test is failing due to missing probes.

  • Make self-checks verification a hard failure. Currently, we wait for the self-checks, but do not report if they're missing. This change will make it clear if something is badly broken to the extent that we don't receive any events.

Checklist

  • Investigated and inspected CI test results
  • Updated documentation accordingly

Testing Performed

Local testing, but CI is sufficient.

@erthalion erthalion requested a review from a team as a code owner December 15, 2023 09:34
@erthalion erthalion force-pushed the feature/make-tests-verbose-about-startup-failures branch from 930d27b to acd379f Compare December 15, 2023 09:36
Copy link
Collaborator

@Stringy Stringy left a comment

Choose a reason for hiding this comment

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

LGTM! This is a great idea, and should help a lot

@erthalion erthalion force-pushed the feature/make-tests-verbose-about-startup-failures branch 2 times, most recently from a12fbd4 to dc4c247 Compare December 15, 2023 10:17
In the past we've got situations when the CI integration tests reports
were not extensive enough to clarify what's going on, and we were
launching a full-blown debugging process just to find out that the
probes were missing.

To make initialization issues more visible, make integration tests
verbose about them:

* Introduce a HEALTHCHECK for the Collector docker image, based on the
/ready Civet API. This command would be ignored on K8S, but we could use
it on CI for containers filtering.

* Wait for Collector container to become healthy first before proceeding
with the rest of tests. This will make it immediately clear if the test
is failing due to missing probes.

* Make self-checks verification a hard failure. Currently, we wait for
the self-checks, but do not report if they're missing. This change will
make it clear if something is badly broken to the extent that we don't
receive any events.
@erthalion erthalion force-pushed the feature/make-tests-verbose-about-startup-failures branch from dc4c247 to 82303a0 Compare December 15, 2023 14:22
Taking into account volatile nature of integration tests, it's
improbable that exactly N processes could be observed during any test.
At the same time we actually want to assert that at least N processes
were observed (e.g. at least 1 to make sure we've got self-checks).
Modify the condition to follow "at least N" approach.
Container doesn't have xargs.
Reduce waiting threshold, make errors more verbose.
@erthalion erthalion merged commit 43e0987 into master Dec 19, 2023
46 checks passed
@erthalion erthalion deleted the feature/make-tests-verbose-about-startup-failures branch December 19, 2023 10:48
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