Skip to content

ignore SLOW SQL QUERY critical log in all log poller tests#22128

Merged
Tofel merged 2 commits intodevelopfrom
ignore-slow-query-all-lp-tests
Apr 22, 2026
Merged

ignore SLOW SQL QUERY critical log in all log poller tests#22128
Tofel merged 2 commits intodevelopfrom
ignore-slow-query-all-lp-tests

Conversation

@Tofel
Copy link
Copy Markdown
Contributor

@Tofel Tofel commented Apr 22, 2026

  • fix bug in load test log scanners

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 22, 2026

✅ No conflicts with other open PRs targeting develop

@trunk-io
Copy link
Copy Markdown

trunk-io Bot commented Apr 22, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@Tofel Tofel marked this pull request as ready for review April 22, 2026 09:31
@Tofel Tofel requested a review from a team as a code owner April 22, 2026 09:31
Copilot AI review requested due to automatic review settings April 22, 2026 09:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Risk Rating: LOW (test-only changes, but affects failure diagnostics and log-scan gating)

This PR updates devenv test log-scanning behavior to ignore expected “SLOW SQL QUERY” critical/DPanic logs in log poller tests and adjusts cleanup log scanning in some soak/load tests.

Changes:

  • Centralizes an allowed log message (ignoredSlowQueryLog) and passes it into all log poller test runners.
  • Updates executeLogPollerReplay to accept allowed log messages (but currently doesn’t apply them in cleanup scanning).
  • Removes immediate t.Error reporting of log-scan errors in OCR2 soak and automation load test cleanups.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
devenv/tests/ocr2/soak_test.go Removes early t.Error for log scan failures during cleanup.
devenv/tests/logpoller/logpoller_test.go Adds shared ignored “SLOW SQL QUERY” allowed message and threads it through log poller test helpers.
devenv/tests/automation/load_test.go Removes early t.Error for log scan failures during cleanup.
Comments suppressed due to low confidence (2)

devenv/tests/automation/load_test.go:87

  • With the t.Error removal, scanErr won’t cause t.Failed() to be true until the final require.NoError, so the log-saving branch is skipped when log scanning fails. Save container logs when scanErr != nil (e.g., if t.Failed() || scanErr != nil) so failures in the log scanner still capture logs for debugging.

		if t.Failed() {
			saveErr := framework.StreamCTFContainerLogsFanout(
				framework.LogStreamConsumer{
					Name: "save-container-logs",
					Consume: func(logStreams map[string]io.ReadCloser) error {
						_, saveErr := framework.SaveContainerLogsFromStreams(fmt.Sprintf("%s-%d", framework.DefaultCTFLogsDir, time.Now().UnixNano()), logStreams)
						return saveErr

devenv/tests/ocr2/soak_test.go:52

  • Removing the early t.Error means a non-nil scanErr no longer marks the test as failed until the final require.NoError, so the if t.Failed() branch won’t run and container logs won’t be saved for log-scan failures. Consider saving logs when scanErr != nil as well (e.g., if t.Failed() || scanErr != nil), and update the final error message to reflect a scan failure rather than a save failure.

		if t.Failed() {
			saveErr := framework.StreamCTFContainerLogsFanout(
				framework.LogStreamConsumer{
					Name: "save-container-logs",
					Consume: func(logStreams map[string]io.ReadCloser) error {

Comment thread devenv/tests/logpoller/logpoller_test.go
@Tofel Tofel force-pushed the ignore-slow-query-all-lp-tests branch from c2bc5f6 to 59a7f4f Compare April 22, 2026 09:37
@cl-sonarqube-production
Copy link
Copy Markdown

@Tofel Tofel enabled auto-merge April 22, 2026 16:34
@Tofel Tofel added this pull request to the merge queue Apr 22, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 22, 2026
@Tofel Tofel added this pull request to the merge queue Apr 22, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 22, 2026
@Tofel Tofel added this pull request to the merge queue Apr 22, 2026
Merged via the queue into develop with commit 1eca13c Apr 22, 2026
114 checks passed
@Tofel Tofel deleted the ignore-slow-query-all-lp-tests branch April 22, 2026 18:05
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.

5 participants