Skip to content

ci: keep the raw go test output of e2e runs and upload it from failed Query Serving upgrade jobs - #22161

Draft
arthurschreiber wants to merge 1 commit into
mainfrom
arthur/e2e-gotestsum-jsonfile
Draft

arthurschreiber wants to merge 1 commit into
mainfrom
arthur/e2e-gotestsum-jsonfile

Conversation

@arthurschreiber

Copy link
Copy Markdown
Member

Description

Since 2026-10-19, the vtgate=N-1 job of Upgrade Downgrade Test - Query Serving (Queries) sometimes fails on preparestmt, and the one of Query Serving (Queries 2) on vtgate_kill. It is about 20 runs so far; the first is run 39288167712. In each run, the first package of the job fails in TestMain after 25-30 seconds, before any test runs, and the next push passes. The log never says why. When a package fails before any test runs, gotestsum's rerun runs no tests and passes. gotestsum then prints nothing from that package, so neither the console log nor the JUnit report has the TestMain output. The job fails only in tools/assert_tests_ran.sh.

This PR keeps that output:

  • test.go sets JSON_OUTPUT to _test/json/report-<test>-<run>.json, beside JUNIT_OUTPUT, and tools/e2e_go_test.sh passes it to gotestsum as --jsonfile. That file is the raw go test -json output of every run, including what gotestsum doesn't print.
  • The two Query Serving upgrade/downgrade workflows upload _test/json/ as an artifact when a job fails.

The upgrade/downgrade jobs run test.go and tools/e2e_go_test.sh from the previous release's checkout, so they write the file only once this is backported to release-24.0 (and to release-23.0 for the release-24.0 branch's own upgrade jobs). Until then, the upload step finds nothing and skips.

I checked the gap with a package whose TestMain fails on its first run only. tools/e2e_go_test.sh fails with gotestsum ran 0 tests; the console output and the JUnit report have none of the package's output, and the JSON file has it.

Related Issue(s)

Checklist

  • "Backport to:" labels have been added if this change should be back-ported to release branches
  • If this change is to be back-ported to previous releases, a justification is included in the PR description
  • Tests were added or are not required
  • Did the new or modified tests pass consistently locally and on CI?
  • Documentation was added or is not required

Deployment Notes

None, CI only.

AI Disclosure

This PR was written primarily by Claude Code.

🤖 Generated with Claude Code

… Query Serving upgrade jobs

When a package fails in TestMain, before any test runs, gotestsum's rerun
runs no tests and passes, and gotestsum then prints nothing from that
package: the console log and the JUnit report never show why TestMain
failed. Pass --jsonfile to gotestsum so the raw go test output, which
keeps it, is written to _test/json/, and upload that directory from the
two upgrade/downgrade Query Serving workflows when a job fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Arthur Schreiber <arthur@planetscale.com>
Copilot AI balanced review requested due to automatic review settings November 24, 2026 20:00
@arthurschreiber arthurschreiber added Component: Build/CI Type: CI/Build Backport to: release-23.0 Needs to be backport to release-23.0 Backport to: release-24.0 Needs to be backport to release-24.0 labels Nov 24, 2026
@github-actions github-actions Bot added this to the v25.0.0 milestone Nov 24, 2026
@vitess-bot vitess-bot Bot added NeedsWebsiteDocsUpdate What it says NeedsDescriptionUpdate The description is not clear or comprehensive enough, and needs work NeedsIssue A linked issue is missing for this Pull Request NeedsBackportReason If backport labels have been applied to a PR, a justification is required labels Nov 24, 2026
@vitess-bot

vitess-bot Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Review Checklist

Hello reviewers! 👋 Please follow this checklist when reviewing this Pull Request.

General

  • Ensure that the Pull Request has a descriptive title.
  • Ensure there is a link to an issue (except for internal cleanup and flaky test fixes), new features should have an RFC that documents use cases and test cases.

Tests

  • Bug fixes should have at least one unit or end-to-end test, enhancement and new features should have a sufficient number of tests.

Documentation

  • Apply the release notes (needs details) label if users need to know about this change.
  • New features should be documented.
  • There should be some code comments as to why things are implemented the way they are.
  • There should be a comment at the top of each new or modified test to explain what the test does.

New flags

  • Is this flag really necessary?
  • Flag names must be clear and intuitive, use dashes (-), and have a clear help text.

If a workflow is added or modified:

  • Each item in Jobs should be named in order to mark it as required.
  • If the workflow needs to be marked as required, the maintainer team must be notified.

Backward compatibility

  • Protobuf changes should be wire-compatible.
  • Changes to _vt tables and RPCs need to be backward compatible.
  • RPC changes should be compatible with vitess-operator
  • If a flag is removed, then it should also be removed from vitess-operator and arewefastyet, if used there.
  • vtctl command output order should be stable and awk-able.

@arthurschreiber arthurschreiber removed NeedsDescriptionUpdate The description is not clear or comprehensive enough, and needs work NeedsWebsiteDocsUpdate What it says NeedsIssue A linked issue is missing for this Pull Request NeedsBackportReason If backport labels have been applied to a PR, a justification is required labels Nov 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The default Docker test path does not forward JSON_OUTPUT or preserve reports before deleting the temporary checkout, leaving raw JSON reporting incomplete.

1 open issue
What changed in this PR

This PR adds raw Go test output capture to the end-to-end test runner, helping diagnose package startup failures that gotestsum can omit from console and JUnit output.

Changes:

  • Configure per-test, per-run JSON reports through JSON_OUTPUT and gotestsum’s --jsonfile.
  • Upload reports from failed Query Serving upgrade/downgrade jobs with 14-day retention.
  • Record the pinned upload action in the workflow lockfile. Capture in previous-release checkouts depends on the described backports.
File Description
tools/​e2e_go_test.sh Pass the optional JSON output path to gotestsum.
test.go Create the JSON report directory and configure report paths.
.github/​workflows/​upgrade_downgrade_test_query_serving_queries.yml Upload raw reports when a job fails.
.github/​workflows/​upgrade_downgrade_test_query_serving_queries_2.yml Add matching failure-report uploads for Queries 2.
.github/​workflows/​actions.lock Register the pinned upload action for both workflows.

Review effort: Balanced

Comment thread test.go
// https://github.com/grpc/grpc/blob/master/doc/keepalive.md
"GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA": "0",
"JUNIT_OUTPUT": junitOutput,
"JSON_OUTPUT": jsonOutput,

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backport to: release-23.0 Needs to be backport to release-23.0 Backport to: release-24.0 Needs to be backport to release-24.0 Component: Build/CI Type: CI/Build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants