Skip to content

fix(platform): retry requests that fail to connect - #1932

Open
PG-Thomas wants to merge 2 commits into
mainfrom
fix/retry-connect-error
Open

PG-Thomas wants to merge 2 commits into
mainfrom
fix/retry-connect-error

Conversation

@PG-Thomas

@PG-Thomas PG-Thomas commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

What broke: sometimes the network drops a connection while it is still being opened. One dropped connection made the whole step fail.

The fix: treat httpx.ConnectError as something to retry, with the same backoff and attempt limit as timeouts.

Why this is safe: a ConnectError means the request never left our side, because the connection wasn't up yet. Sending it again can't do anything twice, even for a POST. Errors that can happen after the server already got the request (ReadError, WriteError) are still not retried.

@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-integrations labels Oct 8, 2026
A connection reset during the TLS handshake raised httpx.ConnectError, which the
platform retry did not cover, so one dropped connection failed the whole call.
A failed connect never sends the request, so it is safe to retry for any method.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DXskDkqHWRWgUhAzNk7ptY
@PG-Thomas
PG-Thomas force-pushed the fix/retry-connect-error branch from 16a613c to 3e96a2b Compare October 12, 2026 12:10
@PG-Thomas
PG-Thomas marked this pull request as ready for review October 12, 2026 12:34
Copilot AI balanced review requested due to automatic review settings October 12, 2026 12:34
@uipathepixa-dogfood

Copy link
Copy Markdown

Epixa-Dogfood Review

Review unavailable: required_pr_review_evidence_unavailable

Not reviewed: packages/uipath-platform/pyproject.toml, packages/uipath-platform/src/uipath/platform/common/retry.py, packages/uipath-platform/tests/services/test_retry.py +2 more

What this PR does

The pull request author describes the intended change as follows: fix(platform): retry requests that fail to connect

This review did not reuse a local review of this change. Set up Epixa local review.

Full review: 3e96a2b 0 findings

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.

🟢 Approval recommended

The focused implementation and regression test correctly extend existing retry behavior without retrying post-connection transport errors.

0 open findings

What changed in this PR

Adds retries for transient httpx.ConnectError failures in the platform HTTP client.

Changes:

  • Marks connection failures as retryable.
  • Adds a focused regression test.
  • Bumps uipath-platform to 0.2.37.
File Description
packages/​uipath-platform/​src/​uipath/​platform/​common/​retry.py Adds ConnectError to retryable exceptions.
packages/​uipath-platform/​tests/​services/​test_retry.py Tests connection-error classification.
packages/​uipath-platform/​pyproject.toml Bumps the package version.
packages/​uipath-platform/​uv.lock Updates locked package metadata.
packages/​uipath/​uv.lock Updates the consuming package’s lock metadata.

🧠 Review effort: Balanced


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

@github-actions

Copy link
Copy Markdown

🚨 Heads up: uipath-integrations cross-tests are FAILING 🚨

Your changes may break one or more integrations in uipath-integrations-python:

  • uipath-openai-agents
  • uipath-google-adk
  • uipath-agent-framework
  • uipath-llamaindex
  • uipath-pydantic-ai

⚠️ These checks are NOT enforced by branch protection rules. Please review the failures before merging.

🔍 Inspect the failed run →

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

🚨 Heads up: uipath-langchain cross-tests are FAILING 🚨

Your changes may break the uipath-langchain-python integration.

⚠️ These checks are NOT enforced by branch protection rules. Please review the failures before merging.

🔍 Inspect the failed run →

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-integrations test:uipath-langchain Triggers tests in the uipath-langchain-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants