Skip to content

Add support for Retry-After header - #1726

Open
andrey-kashcheev wants to merge 1 commit into
masterfrom
datasdk-107-retry-after-support
Open

andrey-kashcheev wants to merge 1 commit into
masterfrom
datasdk-107-retry-after-support

Conversation

@andrey-kashcheev

Copy link
Copy Markdown
Collaborator

Optional additional waiting time between retry
attempts. Only version with seconds is supported

Relates-To: DATASDK-107

@codecov

codecov Bot commented Sep 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.42857% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.48%. Comparing base (994e6a2) to head (14f43c2).

Files with missing lines Patch % Lines
olp-cpp-sdk-core/src/client/OlpClient.cpp 71.43% 2 Missing and 2 partials ⚠️

❌ Your patch check has failed because the patch coverage (71.43%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1726      +/-   ##
==========================================
+ Coverage   80.44%   80.48%   +0.04%     
==========================================
  Files         358      358              
  Lines       14431    14443      +12     
  Branches     1581     1583       +2     
==========================================
+ Hits        11608    11624      +16     
+ Misses       2184     2177       -7     
- Partials      639      642       +3     
Files with missing lines Coverage Δ
olp-cpp-sdk-core/src/client/OlpClient.cpp 89.44% <71.43%> (+0.33%) ⬆️

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Optional additional waiting time between retry
attempts. Only version with seconds is supported

Relates-To: DATASDK-107

Signed-off-by: Andrey Kashcheev <ext-andrey.kashcheev@here.com>
@andrey-kashcheev
andrey-kashcheev force-pushed the datasdk-107-retry-after-support branch from a6a333e to 14f43c2 Compare September 21, 2026 12:22
const std::chrono::seconds::rep seconds_from_header =
std::strtol(header.second.c_str(), nullptr, 10);

if (seconds_from_header == LONG_MAX || seconds_from_header == LONG_MIN) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

maybe std::numeric_limits ? may depends on the http header description of course

Comment on lines +316 to +317
const auto actual_wait_time = std::min(
wait_time, settings->max_wait_time - settings->accumulated_wait_time);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If the RetryAfterWaitTime is a big enough number, it may be ignored. Is it really what we want to achieve?
Same question to the line 875

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.

3 participants