Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cla.yml

@mittalyashu mittalyashu Jan 24, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@lupppig Can you please revert back the change in this file?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

have done that

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@lupppig The PR is still showing this file is being modified, try rebasing the PR.

@lupppig lupppig Jan 25, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ jobs:
custom-notsigned-prcomment: |
Thank you for your submission, we really appreciate it. This open-source project (“Projects”) made available by Shinkly Private Limited (SPL). We ask that you sign our [Contributor License Agreement](https://github.com/codecarrotlabs/cla-document/blob/main/readme.md) before we can accept your contribution. You can sign the CLA by just posting a Pull Request comment same as the below format. If you have any questions respecting this Agreement, please contact [opensource@codecarrot.net](mailto:opensource@codecarrot.net).
signed-commit-message: |
$contributorName has signed the CLA in $pullRequestNo
$contributorName has signed the CLA in $pullRequestNo
15 changes: 8 additions & 7 deletions internal/requestconfig/requestconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,8 @@ func retryDelay(res *http.Response, retryCount int) time.Duration {
delay = maxDelay
}

jitter := rand.Int63n(int64(delay / 4))
r := rand.New(rand.NewSource(time.Now().UnixNano()))
jitter := r.Int63n(int64(delay / 4))
delay -= time.Duration(jitter)
return delay
}
Expand Down Expand Up @@ -466,12 +467,6 @@ func (cfg *RequestConfig) Execute() (err error) {
ctx := cfg.Request.Context()
if cfg.RequestTimeout != time.Duration(0) && isBeforeContextDeadline(time.Now().Add(cfg.RequestTimeout), ctx) {
ctx, cancel = context.WithTimeout(ctx, cfg.RequestTimeout)
defer func() {
// The cancel function is nil if it was handed off to be handled in a different scope.
if cancel != nil {
cancel()
}
}()
}

req := cfg.Request.Clone(ctx)
Expand All @@ -480,6 +475,12 @@ func (cfg *RequestConfig) Execute() (err error) {
}

res, err = handler(req)

// Close the timeout context for this attempt if one was created
if cancel != nil {
cancel()
cancel = nil
}
if ctx != nil && ctx.Err() != nil {
return ctx.Err()
}
Expand Down
4 changes: 2 additions & 2 deletions internal/testutil/testutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ func CheckTestServer(t *testing.T, url string) bool {
t.Skip("The test will not run without a mock Prism server running against your OpenAPI spec")
return false
}
t.Errorf("The test will not run without a mock Prism server running against your OpenAPI spec. You can set the environment variable %s to true to skip running any tests that require the mock server", SKIP_MOCK_TESTS)
return false
}
t.Errorf("The test will not run without a mock Prism server running against your OpenAPI spec. You can set the environment variable %s to true to skip running any tests that require the mock server. Error: %s", SKIP_MOCK_TESTS, err)
return false
}
return true
}