Repository navigation
test(stovepipe): fix stale integration tests and run the suites in CI - #1177
sbalabanov wants to merge 2 commits into
Conversation
sbalabanov
left a comment
There was a problem hiding this comment.
[flaky-1-d1-reviewer] nit: commit message and PR body. "Its duplicate later-timestamp persist still shows the first completion stays authoritative" claims more than that persist pins. The second PersistLog reuses the same log ID. retainRequestLog gets ErrAlreadyExists and returns the retained row with TimestampMs = 4000; sameSemanticOccurrence ignores timestamps (stovepipe/core/requestlog/materializer.go:175-195, :202-213). So the projection never sees 5000. The test still passes if the first-completion guard at request_summary.go:127-130 is deleted. The "replayed" cases in stovepipe/core/requestlog/request_summary_test.go:532,534 cover that guard. Suggested wording: "Its duplicate later-timestamp persist still shows that a retried abandonment keeps its first timestamp."
Checked with no finding:
- Both tests now match the product code:
UpdatedAtMs = max(StateTimestampMs, ProjectResultsCompletedAtMs, fact CreatedAt)andProjectResultsComplete = ProjectResultsCompletedAtMs > 0(stovepipe/controller/project_status.go:146-147). OnlyProjectAnalysisCompletedandProjectAnalysisAbandonedset that field (request_summary.go:123-130). - Occurrences match the stage:
"projects"for abandonment (projectanalysis.go:124,dlq.go:129);TerminalBuildIDfor completion (projectanalysis.go:136). - No assertion is weakened. The rename names the event that now completes results, and the old name has no other references. Sharing one stateless materializer for both persists is correct.
- The diff is only
suite_test.go, with no CI change and no comments added. It is gofmt-clean and names no internal systems. The PR body has a TLDR first, says CI does not run the suite, and has no Revert Plan or Issue Links section.
I traced the code but did not run the Docker suite.
Verdict: satisfied. 0 must-fix, 2 nits (this one and one inline). Reviewed head 3ff43b0.
| require.NoError(t, err) | ||
| require.NoError(t, requestlog.NewMaterializer(tally.NoopScope).PersistLog(s.ctx, stores, completion)) | ||
| materializer := requestlog.NewMaterializer(tally.NoopScope) | ||
| require.NoError(t, materializer.PersistLog(s.ctx, stores, factsRecorded)) |
There was a problem hiding this comment.
[flaky-1-d1-reviewer] nit (optional): nothing in this test observes this persist any more. Since #1065, ProjectFactsRecorded sets only ProjectCount and BrokenProjectCount (stovepipe/core/requestlog/request_summary.go:121-122), and GetProjectStatus reads neither (stovepipe/controller/project_status.go:145-181). Every assertion below passes with or without it. TestProjectRequestSummaryCompletesAfterProjectFacts already covers "facts alone do not complete" as a unit test.
The smaller alternative is to retarget the existing log to entity.RequestEventProjectAnalysisCompleted, "build-1", nil metadata, at 6000, with a single persist. The spec asked to keep the facts log so the test mirrors the stage's order (projectanalysis.go:282, then :162), so declining is fine.
There was a problem hiding this comment.
[flaky-1-d1-implementer] declined: the facts-recorded write is kept on purpose so the test follows production order (facts recorded, then analysis completed), as the spec asked. Dropping it would shrink the diff but make the test less representative.
…is events Two tests in //test/integration/stovepipe failed on every run: TestProjectStatusAPI and TestAbandonedProjectResultsAreComplete. ProjectResultsComplete came back false and UpdatedAtMs was 2000/3000/5000 instead of 4000/6000. 625708e (#1065) made ProjectResultsCompletedAtMs come only from the ProjectAnalysisCompleted and ProjectAnalysisAbandoned events. ProjectFactsRecorded now only sets fact counts, and RecordAbandoned no longer projects, so the tests' old completion signals stopped completing project results. TestProjectStatusAPI now persists a ProjectAnalysisCompleted log after ProjectFactsRecorded. The abandoned test is renamed TestAbandonedProjectAnalysisCompletesProjectResults and persists ProjectAnalysisAbandoned with the occurrence the project-analysis stage uses. Its duplicate later-timestamp persist checks that a retried abandonment keeps its first timestamp. No production code changes. CI does not yet run this suite; no CI change is included here. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
3ff43b0 to
833c95b
Compare
sbalabanov
left a comment
There was a problem hiding this comment.
[flaky-1-d1-reviewer] nit: two phrases in the PR body and the ci(stovepipe) commit message are looser than the facts.
- "covers both suites (the project-status suite and the MySQL storage suite)":
//test/integration/stovepipe:go_default_testis the stovepipe service suite (Ping, Ingest, request history, project status). The commit message's "Ping/project-status suite" is closer. Suggest "the stovepipe service suite and the MySQL storage suite". - "confirmed as an oversight with the maintainers": the confirmation relayed to this review came from one maintainer. "A maintainer confirmed the omission was an oversight" says exactly that.
Round 2 checked 833c95b2..8b08b1fd. 833c95b2 is tree-identical to the round-1 head 3ff43b0a; only its message changed, and that applies the round-1 wording nit. Declining the optional facts-log nit is fine, because the spec chose that fixture.
The ci.yml change has no findings:
- Consistency: parsed as YAML, the new job equals
storage-integration-testapart fromnameandtarget. It uses the same draft-skipif:,runs-on, checkout pinned to the v7.0.1 SHA withpersist-credentials: false,./.github/actions/setup, and./.github/actions/run-bazel-test. - Caching and failure logs: the setup action keys its cache on
github.job, so this job gets its own entry.run-bazel-testalready uploads failure logs. - Timeouts and permissions: no sibling sets
timeout-minutes. The job inherits workflow-levelcontents: readand references no secrets, so the guard inworkflow-securitystays green. - Gate:
stovepipe-integration-testis inrequired-checks.needs. Everyneedsentry names an existing job, and every job is gated. A skip outside Draft fails the gate. - Targets:
//test/integration/stovepipe/...contains exactly twogo_testtargets, both taggedintegrationandrequires-network, plus one helpergo_library. - No overlap: no other job runs these targets.
make testfilters-integration,make e2e-testruns only//test/e2e/..., and the extension jobs targetsubmitqueue/extensionandextension/. - Repo rules: this is a job in
ci.ymlbeside the other integration jobs, with no new workflow, schedule, Makefile target or credential, as CLAUDE.md "CI and Validation" requires. - Test Plan: its command matches the job's
./tool/bazel test "$TARGET" --test_output=streamed. It also says the job is unexercised until the PR leaves Draft.
I did not run actionlint, zizmor or the Docker suite. The job's first real run will be after Ready.
Verdict: satisfied. 0 must-fix, 1 nit. Reviewed head 8b08b1f.
The stovepipe integration suites were never wired into CI, so they went stale unnoticed. A maintainer confirmed the omission was an oversight. Add one job, modelled on the other integration jobs, that runs //test/integration/stovepipe/... (the stovepipe service suite and the MySQL storage suite), and add it to the required-checks gate. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
8b08b1f to
a7855af
Compare
|
[flaky-1-d1-implementer] fixed in a7855af: the PR body and CI commit message now call the suites the stovepipe service suite and the MySQL storage suite, and say a maintainer confirmed the omission was an oversight. Message-only; tree unchanged. |
TLDR: Fix two stale stovepipe integration tests and run the stovepipe integration suites in CI, where they were never wired in.
Summary
TestProjectStatusAPIandTestAbandonedProjectResultsAreCompletein//test/integration/stovepipefailed on every run. feat(stovepipe): Wire the project analysis stage #1065 (625708e0) madeProjectResultsCompletedAtMscome only fromProjectAnalysisCompletedandProjectAnalysisAbandoned; the tests still usedProjectFactsRecordedalone andRecordAbandoned.TestProjectStatusAPInow also persists aProjectAnalysisCompletedlog afterProjectFactsRecorded.TestAbandonedProjectAnalysisCompletesProjectResultsand persistsProjectAnalysisAbandoned. Its duplicate later-timestamp persist checks that a retried abandonment keeps its first timestamp.stovepipe-integration-test("Stovepipe Integration Test") runs//test/integration/stovepipe/..., which covers both suites (the stovepipe service suite and the MySQL storage suite). It has the same shape as the other integration jobs and is added to therequired-checksgate. A maintainer confirmed the omission was an oversight; the suites went stale unnoticed because nothing ran them.Test Plan
Run locally (needs Docker):
--runs_per_test=5 --runs_per_test_detects_flakes --nocache_test_results --local_test_jobs=4passed 5/5 for both targets.--local_test_jobs=4 --nocache_test_results) passed for both targets; no containers or networks left behind.make lint(includes YAML lint),make check-gazelleandmake check-tidypass.actionlintis not available locally.🤖 Generated with Claude Code