Repository navigation
T-1091 [CI] Fail the E2E test when Vector logs errors or warnings - #31
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ignore retried sink requests Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The E2E workflow only checked that every pod was
Running. Vector can be running while its transforms fail on every event (for example theto_floatconversion error from the metrics pods parser that a customer hit), so the test now reads the Vector logs of both the agent DaemonSet and the aggregator Deployment and fails when any line is logged atWARNorERRORlevel during the minute the stack is observed.Why the existing "Show logs from Vector pod" step was not enough:
app.kubernetes.io/name=vector, which matches the agent pod only. The aggregator (where the Kubernetes metrics parsers live since Extract k8s metrics to a separate standalone deployment #26) is labelledapp.kubernetes.io/name=vector-aggregator, so the step never showed its logs at all.kubectl logswith a label selector defaults to the last 10 lines per pod, so even for the agent only the tail was printed. Every recent run shows exactly 10 "Found new file to watch" lines and nothing else.What changes:
Wait for a while with the running podsrecords the time the 60 s observation starts inOBSERVED_SINCE. At that point metrics-server is available, both Vector pods are running and the hello-world pod has produced its logs.Show logs from Vector podsselectsapp.kubernetes.io/name in (vector, vector-aggregator), uses--tail=-1for the full log and--prefixso each line names its pod. This is the debugging view and stays unfiltered.Check that Vector logged no errors or warnings while the pods were runningreads the same pods with--since-time=$OBSERVED_SINCEand fails the job, printing the offending lines, when any line's level column isWARNorERROR. The pattern is anchored on the[pod/...]prefix and the timestamp, so a log message that merely contains the wordERRORdoes not match.What the first full look at the logs showed (run 38409435353, the first commit of this PR with no window and no exclusion), and why the check is scoped the way it is:
WARN ... verify_certificate option is DISABLEDlines at startup. They come from thetlsoverrides in the E2E values template, which are the same overrides the Kubernetes docs give customers, so every real install prints them too. They happen once at startup, before the observation window.http_clientsources start scraping before metrics-server listens, so the first two scrapes logWARN ... Connection refusedplusERROR ... HTTP request processing errorand then recover. Both Deployments start together, so this happens in every install and is also before the window. A scrape that still fails inside the window (wrong service name, metrics-server down) keeps failing every 15 s and is caught.WARN ... connection closed before message completedfollowed byWARN ... Retrying after errorinside the window. This is the keep-alive race between a pooled client connection and the server closing it, the retry succeeded, and it would recur at random. The check therefore dropssink{...}lines of those two kinds. A rejected request (4xx) is logged by Vector as a non-retriableERRORand still fails the test.The workflow installs the last released chart, so chart-side changes (for example an init container that makes the aggregator wait for metrics-server, which would remove the startup errors customers see) are separate work and would only show up here after a release.
🤖 Generated with Claude Code