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

feat: support retry on http status code #1817

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

cr7258
Copy link
Collaborator

@cr7258 cr7258 commented Feb 25, 2025

Ⅰ. Describe what this PR did

新增 retryOnStatus []string 参数支持基于请求的 http 状态码来配置是否需要重试,支持通过正则表达式的方式匹配 http 状态吗。

Ⅱ. Does this pull request fix one issue?

fixes #1808

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@cr7258 cr7258 requested review from CH3CHO and rinfx as code owners February 25, 2025 14:07
@codecov-commenter
Copy link

codecov-commenter commented Feb 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.39%. Comparing base (ef31e09) to head (9b53ed2).
Report is 329 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1817      +/-   ##
==========================================
+ Coverage   35.91%   43.39%   +7.48%     
==========================================
  Files          69       76       +7     
  Lines       11576    12301     +725     
==========================================
+ Hits         4157     5338    +1181     
+ Misses       7104     6629     -475     
- Partials      315      334      +19     

see 71 files with indirect coverage changes

Copy link
Collaborator

@johnlanni johnlanni left a comment

Choose a reason for hiding this comment

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

LGTM

@johnlanni
Copy link
Collaborator

@cr7258 Please resolve the conflicts

@cr7258 cr7258 force-pushed the retry-on-status-code branch from 260fdf2 to d725f24 Compare February 26, 2025 13:24
@cr7258 cr7258 requested a review from johnlanni February 27, 2025 02:05
Copy link
Collaborator

@CH3CHO CH3CHO left a comment

Choose a reason for hiding this comment

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

LGTM

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.

ai-proxy 插件希望能支持基于请求的 http 状态码来配置是否需要重试
4 participants