Skip to content

[Bug]: Ubuntu/x86 arm64 SCA fails on unused CDC test helper #28546

Closed

Description

@gouhongshen

Is there an existing issue for the same bug?

  • I have checked the existing issues; no issue matching this exact unused-helper SCA failure was found.

Branch

main

Version

ea8f64b5e13e696d6807a6da0500c5deb33740be (PR #28511 head rebased onto main)

Describe the bug

The MatrixOne ALL CI arm64 static-code-analysis job fails on an unused helper in pkg/tests/issues/issue_27666_test.go. The failure is independent of PR #28511, whose only file change is pkg/tests/issues/issue_26875_test.go.

Reproduction

Workflow run: https://github.com/matrixorigin/matrixone/actions/runs/34389479247

Failed job: https://github.com/matrixorigin/matrixone/actions/runs/34389479247/job/102594344756

Observed output:

pkg/tests/issues/issue_27666_test.go:436:6: func execInternalTxnSQL is unused (unused)
make: *** [Makefile:1454: static-check-analysis] Error 2

The failure occurred after golangci-lint run -v --concurrency 1 -c .golangci.yml ./... completed package loading and analysis.

Expected behavior

The arm64 SCA job should pass when the tree contains no unused test helpers.

Initial analysis

execInternalTxnSQL is defined at lines 436-439 of pkg/tests/issues/issue_27666_test.go but has no callers. The preceding refactor in commit 7f173b4d524 (test(cdc): synchronize cross-CN watermark race fixture, PR #28542) switched the active call sites to execInternalTxnSQLWithAffectedRows and left the wrapper unused. Removing the orphan wrapper or restoring a real call, according to the owning CDC test design, should resolve the lint error.

PR #28511 does not modify this file, the CDC test, or static-analysis configuration; its changed pkg/tests/issues/issue_26875_test.go package completed successfully in the same CI workflow.

Additional information

This issue tracks the unrelated CI blocker identified while validating PR #28511. The failing workflow was attempt 1 and was not rerun yet; the failed job should be rerun once after this issue is recorded.

Activity

  1. self-assigned this
    on Sep 9, 2026
  2. added
    kind/bug
    severity/s0
    ai-easy
    and removed on Sep 9, 2026
  3. gouhongshen commented on Sep 9, 2026

    @gouhongshen
    ContributorAuthor

    Investigation complete. The arm64 SCA failure was caused by the unused execInternalTxnSQL wrapper left behind when the CDC fixture switched its only call site to execInternalTxnSQLWithAffectedRows in 7f173b4d524. Draft PR #28548 removes only that orphan helper and references this issue without a closing keyword. On macOS arm64, the exact CDC helper UTs passed, the two-CN TestIssue27666CDCWatermarkWriteSerializesWithDrop passed for both orderings, and package golangci-lint passed with 0 issues. The issue remains open for manual validation on Ubuntu arm64.

  4. gouhongshen commented on Sep 9, 2026

    @gouhongshen
    ContributorAuthor

    PR #28548 is trying to fix this issue.

  5. gouhongshen commented on Sep 9, 2026

    @gouhongshen
    ContributorAuthor

    Attempt-2 evidence for the unrelated CI blocker: workflow run #34389479247 reran the failed arm64 SCA job once at job 102612993860. It reproduced the same lint error after 16m26s of analysis:

    pkg/tests/issues/issue_27666_test.go:436:6: func execInternalTxnSQL is unused (unused)
    make: *** [Makefile:1454: static-check-analysis] Error 2
    

    The unrelated job was not affected by PR #28511, and no further rerun is permitted for this attempt-2 failure.

    The current-head retry workflow run #34399780769 attempt 2 reproduced the same error in arm64 SCA job 102653219472 after 15m55.658s:

    pkg/tests/issues/issue_27666_test.go:436:6: func execInternalTxnSQL is unused (unused)
    make: *** [Makefile:1454: static-check-analysis] Error 2
    

    The exact head was 809e5d9b0ddc01d482de57f877166444f45ec402; the file is outside PR #28511. This is the same tracked root cause, and no further rerun is permitted.

  6. gouhongshen commented on Sep 9, 2026

    @gouhongshen
    ContributorAuthor

    Repeated failure evidence from retry attempt 2:

    This is the same root cause as the original arm64 SCA failure; the workflow was already rerun once, so it is not rerun again.

  7. gouhongshen commented on Sep 9, 2026

    @gouhongshen
    ContributorAuthor

    PR #28272 also reproduced this blocker on its single permitted retry. Workflow run 34396806225 attempt 2 failed at arm64 SCA job 102640113083:

    pkg/tests/issues/issue_27666_test.go:436:6: func execInternalTxnSQL is unused (unused)
    1 issues: * unused: 1
    make: *** [Makefile:1454: static-check-analysis] Error 2
    

    The file is absent from PR #28272’s diff and has the identical SHA-256 ef41cad9128258561d7111abd7957f15f01a69a94af06b44993b541151b85ab4 at base 81a6fc70e50d4ccc28d09b0d5e87f18a97a2ad9e and head 07a8d8274b311b119a3904e56c76ececeb75bbbb. Draft PR #28548 removes the orphan wrapper, and its arm64 SCA check passed. Because run 34396806225 is already attempt 2, it was not rerun again.

  8. gouhongshen commented on Sep 9, 2026

    @gouhongshen
    ContributorAuthor

    Resolved on main by merged PR #28555 at commit 7c643f469b9162dec19b7f880e4cf6b2c12507d9. That commit deletes exactly the unused five-line execInternalTxnSQL wrapper identified here. PR #28272 has now rebased onto that commit at head 9c64854f04a6a0dc8ed6b0a044b63a5e3c9d5647; the symbol is absent and the file is no longer part of its PR diff. Closing this root-cause issue; current-head CI will provide the final arm64 SCA integration check.

  9. gouhongshen commented on Sep 9, 2026

    @gouhongshen
    ContributorAuthor

    PR #28548 was closed without merge; this issue remains unresolved.

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

Metadata

Metadata

Assignees

Labels

ai-easykind/bugseverity/s0

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions