Skip to content

tests: sync: adapt test for issue 5609#5617

Open
abhizer wants to merge 2 commits intomainfrom
add-test-for-issue5609
Open

tests: sync: adapt test for issue 5609#5617
abhizer wants to merge 2 commits intomainfrom
add-test-for-issue5609

Conversation

@abhizer
Copy link
Contributor

@abhizer abhizer commented Feb 12, 2026

When starting a pipeline from S3 checkpoint, if a local checkpoint is available, we prefer it if it has made more progress than the remote checkpoint.

When starting a pipeline from S3 checkpoint, if a local checkpoint is
available, we prefer it if it has made more progress than the remote
checkpoint.

Signed-off-by: Abhinav Gyawali <22275402+abhizer@users.noreply.github.com>
Copy link
Contributor

@mihaibudiu mihaibudiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which line checks that the local one is preferred?
I think a comment explaining this would be nice.

Updates the description to mention that we will prefer the checkpoint
that has made more progress between the latest remote and the latest
local checkpoint.

Signed-off-by: Abhinav Gyawali <22275402+abhizer@users.noreply.github.com>
@abhizer abhizer requested a review from mihaibudiu February 12, 2026 20:03
if chk_uuid is not None:
assert UUID(uuid) >= UUID(chk_uuid)

if not clear_storage:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have tests covering a few cases here? E.g., local but no remote, local only, remote only, local ahead of remote, local == remote, and local behind remote?

Copy link
Contributor Author

@abhizer abhizer Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We test:

  • remote only
  • local only isn't covered as it is for the purposes of sync, the same as local + remote

We do not test for local checkpoint that has made less progress than remote. We will add new tests with the new sync implementation discussed as part of the rfc.

Copy link
Collaborator

@mythical-fred mythical-fred left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test addition looks correct and the doc update is accurate. One hard block.

Missing manual testing description.
The PR body describes the behaviour change ("if a local checkpoint is available, we prefer it if it has made more progress than the remote checkpoint") but says nothing about how the change was manually verified. Even a minimal sentence — e.g. "ran python -m pytest python/tests/platform/test_checkpoint_sync.py against a live environment and the new assertion passed" — satisfies the requirement.

Commit messages ("tests: sync: adapt test for issue 5609", "docs: sync: update start_from_checkpoint description") are clear and appropriate. The test logic itself is straightforward: insert a local-only record before stopping, then restart from the S3 checkpoint and verify that the local-only record is still present in the output. The assertCountEqual at the end correctly validates ordering-independent equality.

Copy link
Collaborator

@mythical-fred mythical-fred left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upgrading my vote. Since the PR has integration test coverage, the missing manual test description is a soft block — I was too strict. lalithsuresh's open question about the "local behind remote" case still stands.

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.

4 participants