Skip to content

chore(NODE-7765): add default timeouts - #5036

Open
PavelSafronov wants to merge 3 commits into
mainfrom
node-7765-timeout-secs
Open

chore(NODE-7765): add default timeouts#5036
PavelSafronov wants to merge 3 commits into
mainfrom
node-7765-timeout-secs

Conversation

@PavelSafronov

Copy link
Copy Markdown
Contributor

Description

Summary of Changes

This PR adds a default timeout_secs: 300 to all tasks, which means that if the task produces no stdout/stderr output for 5 minutes, the task will be killed.

Notes for Reviewers

Changes:

  • set a global 5 minute timeout
  • remove existing 5 minute timeouts
  • set timeout to be 10 minutes for benchmarks
  • when timeout is triggered, log diagnostics data, so we can identify what caused the timeout

What is the motivation for this change?

Timeouts weren't correctly set in evergreen config, so tasks only timed out after 2 hours (default timeout value).

Double check the following

  • Lint is passing (npm run check:lint)
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@PavelSafronov
PavelSafronov marked this pull request as ready for review August 25, 2026 17:48
Copilot AI lite review requested due to automatic review settings August 25, 2026 17:48
@PavelSafronov
PavelSafronov requested a review from a team as a code owner August 25, 2026 17:48

Copilot AI 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.

Pull request overview

This PR updates the Evergreen configuration for the MongoDB Node.js driver CI to enforce a consistent default idle timeout across tasks and to collect diagnostic information when timeouts occur, aiming to reduce long-running stalled builds.

Changes:

  • Set a global default timeout_secs: 300 (idle timeout) and remove redundant per-command 300s timeouts.
  • Replace the timeout handler with a diagnostic shell.exec script to capture directory/process/socket state on timeout.
  • Increase benchmark idle timeout to timeout_secs: 600 to accommodate longer silent benchmark runs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.evergreen/config.yml Applies the generated Evergreen config updates: global idle timeout, updated timeout diagnostics handler, and per-command overrides (including benchmarks).
.evergreen/config.in.yml Source template for Evergreen config: documents and defines the global timeout policy, diagnostics on timeout, and command-specific timeout overrides.
Suppressed comments (2)

.evergreen/config.in.yml:293

  • timeout_secs: 60 makes the compile step fail if it is silent for 60s. In run-typescript.sh, npm run build:ts can be quiet while tsc works, and compilation can exceed 60s on slower/contended hosts, leading to flaky CI timeouts. Consider using the 300s default (or adding periodic output).
  "compile driver":
    - command: subprocess.exec
      type: test
      timeout_secs: 60
      params:

.evergreen/config.in.yml:250

  • timeout_secs: 60 makes the TypeScript type-check command fail if it is silent for 60s. run-typescript.sh runs node $TSC mongodb.d.ts ... which can be silent until completion and may exceed 60s on slower machines, causing intermittent timeouts. Consider using the 300s default (or adding periodic output).
  "check types":
    - command: subprocess.exec
      type: test
      timeout_secs: 60
      params:

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .evergreen/config.in.yml Outdated
Comment on lines +21 to +24
# A stalled task is usually a leaked child process still holding the command's
# stdout open, so dump the process tables before the host is reclaimed. On Windows
# `ps` only lists cygwin processes, hence `tasklist` for native ones. Every command
# is guarded so the handler cannot itself fail or hang.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated comment.

Comment thread .evergreen/config.in.yml
Comment on lines 220 to 224
"run lint checks":
- command: subprocess.exec
type: test
timeout_secs: 60
params:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The tasks resolve in under 15 seconds most of the time, this isn't an issue.

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