Skip to content

Conversation

@adamtheturtle
Copy link
Member

@adamtheturtle adamtheturtle commented Feb 2, 2026

Summary

Adds support for configurable request timeouts in both VWS and CloudRecoService APIs. Previously, timeouts were hardcoded to 30 seconds. Now users can specify a custom timeout during client initialization.

Changes

  • Add optional request_timeout_seconds parameter to VWS and CloudRecoService constructors with 30-second default
  • Replace hardcoded timeout values with the configurable parameter
  • Add comprehensive tests for both default and custom timeout behavior

Testing

Tests verify that the default timeout is 30 seconds and that custom timeouts can be set and used successfully.


Note

Low Risk
Low risk: keeps the existing 30s default while exposing a new optional timeout knob; behavior changes only for callers that set a custom timeout.

Overview
Adds configurable HTTP request timeouts to both VWS and CloudRecoService via a new request_timeout_seconds constructor parameter (defaulting to the previous hardcoded 30s).

Plumbs the timeout through to the underlying requests.request calls (including _target_api_request) and adds tests covering default/custom values plus simulated slow-response timeout/success behavior.

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

Allow users to configure request timeouts instead of using a hardcoded 30-second default. Both VWS and CloudRecoService now accept an optional request_timeout_seconds parameter during initialization, with proper defaults and documentation.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
adamtheturtle and others added 3 commits February 2, 2026 11:54
Add test_timeout_raises_on_slow_response and test_longer_timeout_succeeds
tests to both VWS and CloudRecoService. These tests simulate slow server
responses and verify that short timeouts actually raise Timeout exceptions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use keyword arguments for patch.object and pytest.raises to satisfy
mypy's type checking.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

self._server_access_key = server_access_key
self._server_secret_key = server_secret_key
self._base_vws_url = base_vws_url
self.request_timeout_seconds = request_timeout_seconds
Copy link

Choose a reason for hiding this comment

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

Inconsistent attribute naming convention for new property

Low Severity

request_timeout_seconds is stored as a public attribute, but all other constructor parameters (_server_access_key, _server_secret_key, _base_vws_url in VWS; _client_access_key, _client_secret_key, _base_vwq_url in CloudRecoService) are stored as private attributes with _ prefix. Consider using _request_timeout_seconds for consistency, or document why this attribute should be public.

Fix in Cursor Fix in Web

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