Skip to content
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

Increase default timeout for helper subprocess commands from 2 minutes to 15 minutes #11153

Merged
merged 2 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions common/lib/dependabot/command_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ module CommandHelpers
extend T::Sig

module TIMEOUTS
NO_TIME_OUT = -1
LOCAL = 30
NETWORK = 120
LONG_RUNNING = 300
DEFAULT = NETWORK
NO_TIME_OUT = -1 # No timeout
LOCAL = 30 # 30 seconds
NETWORK = 120 # 2 minutes
LONG_RUNNING = 300 # 5 minutes
DEFAULT = 900 # 15 minutes
end

class ProcessStatus
Expand Down
2 changes: 1 addition & 1 deletion common/lib/dependabot/shared_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ def self.run_shell_command(command,

env_cmd = [env || {}, cmd, opts].compact
if Experiments.enabled?(:enable_shared_helpers_command_timeout)
stdout, stderr, process, _elapsed_time = CommandHelpers.capture3_with_timeout(
stdout, stderr, process = CommandHelpers.capture3_with_timeout(
env_cmd,
stderr_to_stdout: stderr_to_stdout,
timeout: timeout
Expand Down
Loading