Skip to content

[Bug]: superseded PR workflow reports failed coverage merge after producers are cancelled #26569

Closed

Description

@gouhongshen

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

main

Commit ID

55398ca (the relevant workflow behavior was introduced by 7cb78aa)

Other Environment Information

  • Hardware parameters: GitHub-hosted Ubuntu runner
  • OS type: Ubuntu 22.04
  • Others: MatrixOne ALL CI, pull_request_target run 30707381514 attempt 1

Actual Behavior

A superseded/cancelled PR workflow reports Matrixone Utils CI / Coverage as a failure after its required producer jobs have been cancelled.

In run https://github.com/matrixorigin/matrixone/actions/runs/30707381514, the UT coverage and BVT producer jobs were cancelled while a replacement run was triggered for PR #26567. The coverage merge job still ran because matrixone-coverage-merge uses if: ${{ always() ... }}. It received prerequisites_ready: false and failed deliberately during Verify coverage prerequisites:

coverage merge skipped because at least one required producer was skipped or failed

Failed job: https://github.com/matrixorigin/matrixone/actions/runs/30707381514/job/91388792474

The PR changes only pkg/common/morpc/backend.go and pkg/common/morpc/backend_test.go; no test, build, or coverage parsing failure occurred before the prerequisite gate.

Expected Behavior

When a workflow is superseded and required coverage producers are cancelled, the coverage merge job should be cancelled or skipped without adding a failed check to the PR. Genuine producer failures should remain visible as failures.

Steps to Reproduce

  1. Open a PR that triggers .github/workflows/entrypoint.yaml and its coverage producers.
  2. While the workflow is running, trigger a replacement run for the same PR, for example by changing the PR from Draft to Ready for Review.
  3. Observe the older run's producer jobs become cancelled.
  4. Observe matrixone-coverage-merge still start because its job condition uses always().
  5. Observe coverage-merge.yaml receive prerequisites_ready: false and fail the prerequisite verification step.

Additional information

Relevant caller logic is .github/workflows/entrypoint.yaml: matrixone-coverage-merge depends on the producer jobs, runs under always(), and computes prerequisites_ready from producer success. The failure is CI orchestration behavior, not a failure in PR #26567's MORPC change.

Activity

  1. added
    kind/bug
    on Aug 1, 2026
  2. self-assigned this
    on Aug 1, 2026
  3. gouhongshen commented on Aug 1, 2026

    @gouhongshen
    ContributorAuthor

    Additional reproduction from the required one-time rerun:

    This confirms the failure follows workflow supersession/cancellation rather than MORPC execution. Attempt 2 of run 30707381514 is now executing the cancelled/failed jobs once; no PR code change was made.

  4. gouhongshen commented on Aug 1, 2026

    @gouhongshen
    ContributorAuthor

    Repeated-failure evidence from run 30707381514 attempt 2:

    This is the same workflow-concurrency/prerequisite behavior. No MORPC test or coverage parser ran in the failed job, and PR #26567 was not changed.

  5. added
    severity/s0
    ai-easy
    and removed on Aug 1, 2026
  6. gouhongshen commented on Aug 1, 2026

    @gouhongshen
    ContributorAuthor

    Draft fix: #26572

    The caller now uses !cancelled() for the coverage merge job. This separates workflow cancellation from ordinary producer failure without changing the reusable merge workflow's prerequisite failure gate.

    BVT and Go unit tests cannot exercise GitHub Actions' server-side job scheduling. The remaining hosted regression cases are:

    1. Superseded run / cancellation
      • Setup/input: on a valid PR targeting main, wait until UT coverage and both BVT producers are running, then send another synchronize or ready_for_review event for the same PR and concurrency group.
      • Expected: the older run and its producers conclude cancelled; its coverage merge job is skipped or cancelled and does not create a failed Matrixone Utils CI / Coverage check.
    2. Genuine producer failure without cancellation
      • Setup/input: in an Actions integration branch using this caller condition, make one required producer conclude failure while the workflow itself remains active and the PR validation output is true.
      • Expected: coverage merge still starts, receives prerequisites_ready: false, and fails Verify coverage prerequisites, preserving the producer failure signal.
    3. Successful producers
      • Setup/input: let UT coverage and both complementary BVT producers complete successfully for one generation.
      • Expected: coverage merge starts with prerequisites_ready: true, validates the generation artifacts, and reports its normal coverage result.

    Local validation completed: actionlint v1.7.12 -verbose .github/workflows/entrypoint.yaml and git diff --check origin/main...HEAD both exited 0. Because pull_request_target loads the workflow from the base branch, this PR's own run cannot validate the changed head-branch condition before deployment.

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