Skip to content

fix: tolerate multiple scheduler activations in trace test - #2097

Merged
hidb4ai merged 1 commit into
oceanbase:masterfrom
Skylm808:fix/scheduler-activation-traces-2071
Oct 20, 2026
Merged

hidb4ai merged 1 commit into
oceanbase:masterfrom
Skylm808:fix/scheduler-activation-traces-2071

Conversation

@Skylm808

Copy link
Copy Markdown
Contributor

Which issue or RFC does this PR close?

Closes #2071.

Rationale for this change

The scheduler activation test compares every completion log's trace ID with the first root span's trace ID. Each activation creates an independent root trace, so multiple valid activations can cause the test to fail.

What changes are included in this PR?

  • Wait for at least two activations to consistently exercise the multiple-activation scenario.
  • Close the runtime before inspecting logs and finished spans.
  • Match completion logs to root spans by trace ID and span ID, including occurrence counts.
  • Verify that activations have distinct trace IDs, root spans have no parent, and completion logs do not retain the startup request ID.

Are there any user-facing changes?

No. This change only updates a test; runtime behavior and public APIs are unchanged.

How was this change tested?

Validated locally with Python 3.11.16:

  • Confirmed that waiting for two activations causes the original assertion to fail for both memory and experience.

  • Ran test_scheduler.py: 18 passed.

  • Ran the following related tests with four workers: 50 passed.

    .venv/bin/python -m pytest -n 4 \
      tests/builtin/runtime/test_scheduler.py \
      tests/builtin/runtime/test_processing_scheduler.py \
      tests/builtin/runtime/test_artifact_processing.py -q

@Skylm808
Skylm808 requested a review from PsiACE as a code owner October 20, 2026 03:22

@hidb4ai hidb4ai 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.

LGTM

@hidb4ai
hidb4ai merged commit a2e5930 into oceanbase:master Oct 20, 2026
7 checks passed
@hidb4ai hidb4ai added the 1.4.1 v1.4.1 release tracking label Oct 20, 2026
@Skylm808
Skylm808 deleted the fix/scheduler-activation-traces-2071 branch October 20, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.4.1 v1.4.1 release tracking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: flaky trace assertion in scheduler activation test

2 participants