Skip to content

[PLT-0] Fix race conditions in test_task_filter and test_data_row_delete_and_create_with_same_global_key#2047

Merged
mrobers1982 merged 1 commit intodevelopfrom
pnoirel/PLT-0-fix-race-conditions-in-flaky-tests
Mar 18, 2026
Merged

[PLT-0] Fix race conditions in test_task_filter and test_data_row_delete_and_create_with_same_global_key#2047
mrobers1982 merged 1 commit intodevelopfrom
pnoirel/PLT-0-fix-race-conditions-in-flaky-tests

Conversation

@lb-pno
Copy link
Contributor

@lb-pno lb-pno commented Mar 9, 2026

Description

  • Fix test_task_filter race condition where the export task completes before the In_Progress query runs or the GraphQL query times out. Adds retry logic with a fallback to verify completion, and increases the wait timeout to 600s.
  • Fix test_data_row_delete_and_create_with_same_global_key race condition where wait_till_done() silently returns after exhausting its 300s timeout.
    Introduces a _wait_for_task helper with a 600s timeout, a defensive refresh, and an explicit completion assertion.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Document change (fix typo or modifying any markdown files, code comments or anything in the examples folder only)

All Submissions

  • Have you followed the guidelines in our Contributing document?
  • Have you provided a description?
  • Are your changes properly formatted?

New Feature Submissions

  • Does your submission pass tests?
  • Have you added thorough tests for your new feature?
  • Have you commented your code, particularly in hard-to-understand areas?
  • Have you added a Docstring?

Changes to Core Features

  • Have you written new tests for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?
  • Have you updated any code comments, as applicable?

Note

Low Risk
Low risk because changes are confined to test code, but they may slightly increase CI runtime due to added retries and longer timeouts.

Overview
Improves test robustness around asynchronous task state transitions.

test_task_filter now retries querying for In_Progress tasks (tolerating transient query errors), waits up to 600s for completion, and falls back to asserting the task ultimately reaches COMPLETE if it was never observed in progress.

test_data_row_delete_and_create_with_same_global_key introduces a _wait_for_task helper that uses a 600s timeout, refreshes if the task remains IN_PROGRESS, and asserts completion to prevent silent timeouts from masking failures.

Written by Cursor Bugbot for commit fcf02d9. This will update automatically on new commits. Configure here.

@lb-pno lb-pno changed the title Fix race conditions in test_task_filter and test_data_row_delete_and_… [PLT-0] Fix race conditions in test_task_filter and test_data_row_delete_and_create_with_same_global_key Mar 9, 2026
@mrobers1982 mrobers1982 marked this pull request as ready for review March 18, 2026 13:16
@mrobers1982 mrobers1982 requested a review from a team as a code owner March 18, 2026 13:16
@mrobers1982 mrobers1982 merged commit 4f0e294 into develop Mar 18, 2026
16 of 26 checks passed
@mrobers1982 mrobers1982 deleted the pnoirel/PLT-0-fix-race-conditions-in-flaky-tests branch March 18, 2026 13:16
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.

2 participants