Skip to content

Insert random delay up to two mins to help collisions that cause timeouts #1272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

darrenge
Copy link
Collaborator

BDN tests are seeing a few insert collisions here and there when two test runs are trying to insert at the same time and it times out. This PR adds a task that randomly pauses up to 2 minutes so space out those that are started at the same time.

…event async BDN tests from trying to insert at the same time.
@Copilot Copilot AI review requested due to automatic review settings June 30, 2025 22:53
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a random delay step in the CI workflow to reduce insert collisions that cause timeouts during concurrent test runs.

  • Added a new step in the CI workflow that pauses execution for a random duration between 1 and 120 seconds.
  • The random delay is implemented in PowerShell within the GitHub Actions YAML file.


- name: Random pause between tasks so multiple inserts don't run at the same time
run: |
$delay = Get-Random -Minimum 1 -Maximum 121
Copy link
Preview

Copilot AI Jun 30, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider making the maximum delay duration configurable (e.g., via an environment variable) to allow easier adjustments in different CI environments.

Suggested change
$delay = Get-Random -Minimum 1 -Maximum 121
$maxDelay = $env:MAX_DELAY_DURATION
$delay = Get-Random -Minimum 1 -Maximum [int]$maxDelay

Copilot uses AI. Check for mistakes.

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