Skip to content

Commit cf8022d

Browse files
Merge pull request #49 from kernel/release-please--branches--main--changes--next
release: 0.26.0
2 parents 3819f79 + 2b7b9ca commit cf8022d

8 files changed

Lines changed: 44 additions & 16 deletions

File tree

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.25.0"
2+
".": "0.26.0"
33
}

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## [0.26.0](https://github.com/kernel/hypeman-go/compare/v0.25.0...v0.26.0) (2026-08-21)
4+
5+
6+
### Features
7+
8+
* Repair SDK tracking generation ([ea5a7f8](https://github.com/kernel/hypeman-go/commit/ea5a7f8d0d069b51e10189a8d0196f6155aaa4a8))
9+
310
## [0.25.0](https://github.com/kernel/hypeman-go/compare/v0.24.0...v0.25.0) (2026-08-17)
411

512

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Or to pin the version:
3030
<!-- x-release-please-start-version -->
3131

3232
```sh
33-
go get -u 'github.com/kernel/hypeman-go@v0.25.0'
33+
go get -u 'github.com/kernel/hypeman-go@v0.26.0'
3434
```
3535

3636
<!-- x-release-please-end -->

device.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ type Device struct {
128128
// Whether the device is currently bound to the vfio-pci driver, which is required
129129
// for VM passthrough.
130130
//
131-
// - true: Device is bound to vfio-pci and ready for (or currently in use by) a VM.
132-
// The device's native driver has been unloaded.
133-
// - false: Device is using its native driver (e.g., nvidia) or no driver. Hypeman
134-
// will automatically bind to vfio-pci when attaching to an instance.
131+
// - true: Device is bound to vfio-pci and ready for (or currently in use by) a VM.
132+
// The device's native driver has been unloaded.
133+
// - false: Device is using its native driver (e.g., nvidia) or no driver. Hypeman
134+
// will automatically bind to vfio-pci when attaching to an instance.
135135
BoundToVfio bool `json:"bound_to_vfio" api:"required"`
136136
// Registration timestamp (RFC3339)
137137
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`

ingress.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,9 @@ func (r *IngressRuleRequestHeaderAuthParam) UnmarshalJSON(data []byte) error {
274274
type IngressTarget struct {
275275
// Target instance name, ID, or capture reference.
276276
//
277-
// - For literal hostnames: Use the instance name or ID directly (e.g., "my-api")
278-
// - For pattern hostnames: Reference a capture from the hostname (e.g.,
279-
// "{instance}")
277+
// - For literal hostnames: Use the instance name or ID directly (e.g., "my-api")
278+
// - For pattern hostnames: Reference a capture from the hostname (e.g.,
279+
// "{instance}")
280280
//
281281
// When using pattern hostnames, the instance is resolved dynamically at request
282282
// time.
@@ -311,9 +311,9 @@ func (r IngressTarget) ToParam() IngressTargetParam {
311311
type IngressTargetParam struct {
312312
// Target instance name, ID, or capture reference.
313313
//
314-
// - For literal hostnames: Use the instance name or ID directly (e.g., "my-api")
315-
// - For pattern hostnames: Reference a capture from the hostname (e.g.,
316-
// "{instance}")
314+
// - For literal hostnames: Use the instance name or ID directly (e.g., "my-api")
315+
// - For pattern hostnames: Reference a capture from the hostname (e.g.,
316+
// "{instance}")
317317
//
318318
// When using pattern hostnames, the instance is resolved dynamically at request
319319
// time.

instance.go

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,8 @@ func (r *InstanceService) New(ctx context.Context, body InstanceNewParams, opts
5858
return res, err
5959
}
6060

61-
// Update mutable properties of a running instance. Currently supports updating
62-
// only the environment variables referenced by existing credential policies,
63-
// enabling secret/key rotation without instance restart.
61+
// Update mutable instance properties. TTL values are relative to when the update
62+
// is committed. Expiration updates are rejected after the current deadline passes.
6463
func (r *InstanceService) Update(ctx context.Context, id string, body InstanceUpdateParams, opts ...option.RequestOption) (res *Instance, err error) {
6564
opts = slices.Concat(r.Options, opts)
6665
if id == "" {
@@ -635,6 +634,9 @@ type Instance struct {
635634
ID string `json:"id" api:"required"`
636635
// Creation timestamp (RFC3339)
637636
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
637+
// Absolute expiration time, or null when automatic expiration is disabled.
638+
// Instance TTL is cleared on fork.
639+
ExpiresAt time.Time `json:"expires_at" api:"required" format:"date-time"`
638640
// OCI image reference
639641
Image string `json:"image" api:"required"`
640642
// Human-readable name
@@ -719,6 +721,7 @@ type Instance struct {
719721
JSON struct {
720722
ID respjson.Field
721723
CreatedAt respjson.Field
724+
ExpiresAt respjson.Field
722725
Image respjson.Field
723726
Name respjson.Field
724727
State respjson.Field
@@ -1409,6 +1412,9 @@ type InstanceNewParams struct {
14091412
// Disk I/O rate limit (e.g., "100MB/s", "500MB/s"). Defaults to proportional share
14101413
// based on CPU allocation if configured.
14111414
DiskIoBps param.Opt[string] `json:"disk_io_bps,omitzero"`
1415+
// Absolute expiration time. Must be in the future and is mutually exclusive with
1416+
// ttl.
1417+
ExpiresAt param.Opt[time.Time] `json:"expires_at,omitzero" format:"date-time"`
14121418
// Additional memory for hotplug (human-readable format like "3GB", "1G"). Omit to
14131419
// disable hotplug memory.
14141420
HotplugSize param.Opt[string] `json:"hotplug_size,omitzero"`
@@ -1430,6 +1436,10 @@ type InstanceNewParams struct {
14301436
// out-of-tree kernel modules (e.g., NVIDIA vGPU drivers). Recommended for
14311437
// workloads that don't need kernel module compilation.
14321438
SkipKernelHeaders param.Opt[bool] `json:"skip_kernel_headers,omitzero"`
1439+
// Relative lifetime from instance creation, in Go duration format. Use "0s" or
1440+
// omit both expiration fields to disable automatic expiration. Mutually exclusive
1441+
// with expires_at.
1442+
Ttl param.Opt[string] `json:"ttl,omitzero"`
14331443
// Number of virtual CPUs
14341444
Vcpus param.Opt[int64] `json:"vcpus,omitzero"`
14351445
// Linux-only automatic standby policy based on active inbound TCP connections
@@ -1656,6 +1666,12 @@ func init() {
16561666
}
16571667

16581668
type InstanceUpdateParams struct {
1669+
// Absolute expiration time. Must be in the future and is mutually exclusive with
1670+
// ttl.
1671+
ExpiresAt param.Opt[time.Time] `json:"expires_at,omitzero" format:"date-time"`
1672+
// Relative lifetime from when this update is committed, in Go duration format. Use
1673+
// "0s" to disable automatic expiration. Mutually exclusive with expires_at.
1674+
Ttl param.Opt[string] `json:"ttl,omitzero"`
16591675
// Linux-only automatic standby policy based on active inbound TCP connections
16601676
// observed from the host conntrack table.
16611677
AutoStandby AutoStandbyPolicyParam `json:"auto_standby,omitzero"`

instance_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"errors"
88
"os"
99
"testing"
10+
"time"
1011

1112
"github.com/kernel/hypeman-go"
1213
"github.com/kernel/hypeman-go/internal/testutil"
@@ -58,6 +59,7 @@ func TestInstanceNewWithOptionalParams(t *testing.T) {
5859
"PORT": "3000",
5960
"NODE_ENV": "production",
6061
},
62+
ExpiresAt: hypeman.Time(time.Now()),
6163
GPU: hypeman.InstanceNewParamsGPU{
6264
Profile: hypeman.String("L40S-1Q"),
6365
},
@@ -118,6 +120,7 @@ func TestInstanceNewWithOptionalParams(t *testing.T) {
118120
"team": "backend",
119121
"env": "staging",
120122
},
123+
Ttl: hypeman.String("24h"),
121124
Vcpus: hypeman.Int(2),
122125
Volumes: []hypeman.VolumeMountParam{{
123126
MountPath: "/mnt/data",
@@ -162,6 +165,7 @@ func TestInstanceUpdateWithOptionalParams(t *testing.T) {
162165
Env: map[string]string{
163166
"OUTBOUND_OPENAI_KEY": "new-rotated-key-456",
164167
},
168+
ExpiresAt: hypeman.Time(time.Now()),
165169
HealthCheck: hypeman.HealthCheckParam{
166170
Exec: hypeman.HealthCheckExecParam{
167171
Command: []string{"curl", "-f", "http://localhost:4318/"},
@@ -189,6 +193,7 @@ func TestInstanceUpdateWithOptionalParams(t *testing.T) {
189193
Policy: hypeman.RestartPolicyPolicyOnFailure,
190194
StableAfter: hypeman.String("10m"),
191195
},
196+
Ttl: hypeman.String("6h"),
192197
},
193198
)
194199
if err != nil {

internal/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
package internal
44

5-
const PackageVersion = "0.25.0" // x-release-please-version
5+
const PackageVersion = "0.26.0" // x-release-please-version

0 commit comments

Comments
 (0)