Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,18 @@ jobs:
- uses: actions/checkout@v6

- name: Get GitHub OIDC Token
if: github.repository == 'stainless-sdks/kernel-go'
if: |-
github.repository == 'stainless-sdks/kernel-go' &&
!startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
uses: actions/github-script@v8
with:
script: core.setOutput('github_token', await core.getIDToken());

- name: Upload tarball
if: github.repository == 'stainless-sdks/kernel-go'
if: |-
github.repository == 'stainless-sdks/kernel-go' &&
!startsWith(github.ref, 'refs/heads/stl/')
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.42.1"
".": "0.42.2"
}
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 0.42.2 (2026-03-07)

Full Changelog: [v0.42.1...v0.42.2](https://github.com/kernel/kernel-go-sdk/compare/v0.42.1...v0.42.2)

### Chores

* **ci:** skip uploading artifacts on stainless-internal branches ([0586ec1](https://github.com/kernel/kernel-go-sdk/commit/0586ec11323a030954b76b8dde236db6817f5141))
* **internal:** codegen related update ([63ecb44](https://github.com/kernel/kernel-go-sdk/commit/63ecb4436a223ba865230b94353a4f654205a4e2))
* update placeholder string ([82510c4](https://github.com/kernel/kernel-go-sdk/commit/82510c497a99e3a671b695667cc59aa66b8605ac))

## 0.42.1 (2026-03-05)

Full Changelog: [v0.42.0...v0.42.1](https://github.com/kernel/kernel-go-sdk/compare/v0.42.0...v0.42.1)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Or to pin the version:
<!-- x-release-please-start-version -->

```sh
go get -u 'github.com/kernel/kernel-go-sdk@v0.42.1'
go get -u 'github.com/kernel/kernel-go-sdk@v0.42.2'
```

<!-- x-release-please-end -->
Expand Down
2 changes: 1 addition & 1 deletion browser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func TestBrowserLoadExtensions(t *testing.T) {
kernel.BrowserLoadExtensionsParams{
Extensions: []kernel.BrowserLoadExtensionsParamsExtension{{
Name: "name",
ZipFile: io.Reader(bytes.NewBuffer([]byte("some file contents"))),
ZipFile: io.Reader(bytes.NewBuffer([]byte("Example data"))),
}},
},
)
Expand Down
6 changes: 3 additions & 3 deletions browserf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ func TestBrowserFUpload(t *testing.T) {
kernel.BrowserFUploadParams{
Files: []kernel.BrowserFUploadParamsFile{{
DestPath: "/J!",
File: io.Reader(bytes.NewBuffer([]byte("some file contents"))),
File: io.Reader(bytes.NewBuffer([]byte("Example data"))),
}},
},
)
Expand Down Expand Up @@ -355,7 +355,7 @@ func TestBrowserFUploadZip(t *testing.T) {
"id",
kernel.BrowserFUploadZipParams{
DestPath: "/J!",
ZipFile: io.Reader(bytes.NewBuffer([]byte("some file contents"))),
ZipFile: io.Reader(bytes.NewBuffer([]byte("Example data"))),
},
)
if err != nil {
Expand Down Expand Up @@ -383,7 +383,7 @@ func TestBrowserFWriteFileWithOptionalParams(t *testing.T) {
err := client.Browsers.Fs.WriteFile(
context.TODO(),
"id",
io.Reader(bytes.NewBuffer([]byte("some file contents"))),
io.Reader(bytes.NewBuffer([]byte("Example data"))),
kernel.BrowserFWriteFileParams{
Path: "/J!",
Mode: kernel.String("0611"),
Expand Down
2 changes: 1 addition & 1 deletion deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func TestDeploymentNewWithOptionalParams(t *testing.T) {
EnvVars: map[string]string{
"FOO": "bar",
},
File: io.Reader(bytes.NewBuffer([]byte("some file contents"))),
File: io.Reader(bytes.NewBuffer([]byte("Example data"))),
Force: kernel.Bool(false),
Region: kernel.DeploymentNewParamsRegionAwsUsEast1a,
Source: kernel.DeploymentNewParamsSource{
Expand Down
2 changes: 1 addition & 1 deletion extension_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func TestExtensionUploadWithOptionalParams(t *testing.T) {
option.WithAPIKey("My API Key"),
)
_, err := client.Extensions.Upload(context.TODO(), kernel.ExtensionUploadParams{
File: io.Reader(bytes.NewBuffer([]byte("some file contents"))),
File: io.Reader(bytes.NewBuffer([]byte("Example data"))),
Name: kernel.String("name"),
})
if err != nil {
Expand Down
8 changes: 3 additions & 5 deletions internal/requestconfig/requestconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,9 @@ func (b *bodyWithTimeout) Close() error {
}

func retryDelay(res *http.Response, retryCount int) time.Duration {
// If the API asks us to wait a certain amount of time (and it's a reasonable amount),
// just do what it says.

if retryAfterDelay, ok := parseRetryAfterHeader(res); ok && 0 <= retryAfterDelay && retryAfterDelay < time.Minute {
Copy link

Choose a reason for hiding this comment

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

Removed upper bound allows unbounded retry delay

Medium Severity

The retryDelay function previously capped server-provided Retry-After values at under one minute, falling through to exponential backoff (max 8 seconds) for larger values. The new code removes that upper bound entirely, meaning a server sending a large Retry-After value (e.g., hours or days) will cause the client to block for that entire duration. While ctx.Done() in the select provides protection when a context deadline is set, callers without a deadline could experience unbounded blocking.

Fix in Cursor Fix in Web

return retryAfterDelay
// If the backend tells us to wait a certain amount of time, use that value
if retryAfterDelay, ok := parseRetryAfterHeader(res); ok {
return max(0, retryAfterDelay)
}

maxDelay := 8 * time.Second
Expand Down
2 changes: 1 addition & 1 deletion internal/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

package internal

const PackageVersion = "0.42.1" // x-release-please-version
const PackageVersion = "0.42.2" // x-release-please-version