Skip to content

feat(graph_builder): add retry mechanism for Zep Cloud connection failures#131

Open
EuanTop wants to merge 1 commit into666ghj:mainfrom
EuanTop:feat/zep-retry-mechanism
Open

feat(graph_builder): add retry mechanism for Zep Cloud connection failures#131
EuanTop wants to merge 1 commit into666ghj:mainfrom
EuanTop:feat/zep-retry-mechanism

Conversation

@EuanTop
Copy link

@EuanTop EuanTop commented Mar 11, 2026

Description

Adds automatic retry mechanism to handle transient network errors when connecting to Zep Cloud API. This prevents graph build failures caused by temporary connection issues such as "Connection reset by peer" (errno 54).

The retry logic uses exponential backoff (2s, 4s, 6s) and provides detailed progress feedback to users.

Changes

  • Added retry logic (max 3 attempts) to create_graph() method in graph_builder.py
  • Added retry logic to set_ontology() method for robust ontology configuration
  • Added retry logic to add_text_batches() method for batch data uploads
  • Implemented exponential backoff strategy with detailed console logging
  • Added progress messages showing retry attempts and wait times

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation

Testing

  • Manually tested with unstable network conditions
  • Verified retry mechanism triggers on connection failures
  • Confirmed successful graph creation after transient network errors
  • Tested with various network interruption scenarios

Related Issue

Related to #60 - Improves robustness when connecting to Zep Cloud API

Additional Notes

This change is backward compatible and doesn't modify the API interface. The retry mechanism is transparent to users and only activates when network errors occur.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant