← 输入框|github.com|刷新
Skip to content

[python] Don't assume checkpoint list order in storage details test - #7944

Open
mythical-fred-ops[bot] wants to merge 1 commit into
mainfrom
fred/checkpoint-order-independent-test
Open

mythical-fred-ops[bot] wants to merge 1 commit into
mainfrom
fred/checkpoint-order-independent-test

Conversation

@mythical-fred-ops

Copy link
Copy Markdown
Contributor

test_pipeline_storage_details_checkpoints assumed storage_status_details.checkpoints is oldest-first.

Setup Checkpoints kept [-1] != first
Single host 1 (newest) passes
Multihost 2, newest first fails: [-1] is first

Change: assert that some listed checkpoint has a UUID different from first. This works with any order and still fails if no new checkpoint was made.

Checked:

  • ran the old and new assertions on both list orders, the single-host case, and a list with no new checkpoint. Only the new assertion gives the right result in every case.
  • pre-commit: ruff and ruff-format pass.
  • I did not run the platform test itself, because it needs a running pipeline manager.

test_pipeline_storage_details_checkpoints checked that the last entry of
storage_status_details.checkpoints differs from the first checkpoint.
A multihost pipeline keeps two checkpoints and lists the newest first,
so the last entry is the first checkpoint and the assertion fails.

Look for a checkpoint with a different UUID anywhere in the list.  That
holds for one host or many, in any order, and still fails if no new
checkpoint was made.
@blp

blp commented Nov 12, 2026

Copy link
Copy Markdown
Member

Please hold this PR. The evidence does not confirm that the checkpoint list is newest-first. If the list holds only first when the test reads it, the new assertion also fails. If the list really is newest-first, this change hides an ordering bug. The details are in the internal issue. The next step is a diagnostic change that puts the full checkpoint list in the assertion message.

@blp

blp commented Nov 12, 2026

Copy link
Copy Markdown
Member

Update: the multihost checkpoint list really is newest-first, while a single host lists oldest-first. The cause is in the multihost implementation, and a fix there will make both lists oldest-first. With that fix, the existing [-1] != first assertion is correct, so this PR is not needed. I recommend closing it.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant