diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 0c2ecec..86b0e83 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.20.0" + ".": "0.21.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index ba9cc44..cc2f129 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 52 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/hypeman-f9fed11ca56bb499302232ce70b65d8fa6c0f88c5274dbf16670283303449c63.yml -openapi_spec_hash: 24530949a7f53ab57694443c45088190 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/hypeman-6c73c988bf5930a45cafe6d304d97479842354d4181bc77f2aa39838b531d431.yml +openapi_spec_hash: 1bcecb92c1a31dcb09a659272be61633 config_hash: 99e93e381d8384de5a44c6eeed4bd4b1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 65b2e2b..16f035c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.21.0 (2026-06-10) + +Full Changelog: [v0.20.0...v0.21.0](https://github.com/kernel/hypeman-go/compare/v0.20.0...v0.21.0) + +### Features + +* Add design proposal: Rosetta x86-64 emulation for vz Linux guests ([2b08025](https://github.com/kernel/hypeman-go/commit/2b08025ee910dbbe9936d81f254525c9bfe2b3f2)) + ## 0.20.0 (2026-05-18) Full Changelog: [v0.19.0...v0.20.0](https://github.com/kernel/hypeman-go/compare/v0.19.0...v0.20.0) diff --git a/README.md b/README.md index 1f0803c..86fba72 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Or to pin the version: ```sh -go get -u 'github.com/kernel/hypeman-go@v0.20.0' +go get -u 'github.com/kernel/hypeman-go@v0.21.0' ``` diff --git a/image.go b/image.go index babf0db..a53b7e5 100644 --- a/image.go +++ b/image.go @@ -98,6 +98,8 @@ type Image struct { Env map[string]string `json:"env"` // Error message if status is failed Error string `json:"error" api:"nullable"` + // Resolved image platform as os/arch[/variant] (e.g. "linux/amd64") + Platform string `json:"platform"` // Position in build queue (null if not queued) QueuePosition int64 `json:"queue_position" api:"nullable"` // Disk size in bytes (null until ready) @@ -116,6 +118,7 @@ type Image struct { Entrypoint respjson.Field Env respjson.Field Error respjson.Field + Platform respjson.Field QueuePosition respjson.Field SizeBytes respjson.Field Tags respjson.Field @@ -145,6 +148,11 @@ const ( type ImageNewParams struct { // OCI image reference (e.g., docker.io/library/nginx:latest) Name string `json:"name" api:"required"` + // Target platform as os/arch[/variant] (e.g. "linux/amd64"), matching Docker + // --platform. Omit for the host platform. Not a fixed enum: the os/arch[/variant] + // grammar is validated server-side and invalid values return 400 invalid_platform. + // Only os "linux" with arch amd64 or arm64 is accepted today. + Platform param.Opt[string] `json:"platform,omitzero"` // User-defined key-value tags. Tags map[string]string `json:"tags,omitzero"` paramObj diff --git a/image_test.go b/image_test.go index 9631e75..bb007f4 100644 --- a/image_test.go +++ b/image_test.go @@ -27,7 +27,8 @@ func TestImageNewWithOptionalParams(t *testing.T) { option.WithAPIKey("My API Key"), ) _, err := client.Images.New(context.TODO(), hypeman.ImageNewParams{ - Name: "docker.io/library/nginx:latest", + Name: "docker.io/library/nginx:latest", + Platform: hypeman.String("linux/amd64"), Tags: map[string]string{ "team": "backend", "env": "staging", diff --git a/instance.go b/instance.go index 0b10c37..0f5830d 100644 --- a/instance.go +++ b/instance.go @@ -690,6 +690,9 @@ type Instance struct { // initializing, shutdown). Consumers (e.g. billing) sum the phases they consider // billable. PhaseDurationsMs map[string]int64 `json:"phase_durations_ms"` + // Resolved image platform as os/arch[/variant] (e.g. "linux/amd64"). amd64 images + // on an arm64 host run under Rosetta emulation. + Platform string `json:"platform"` // Whole-instance restart supervision policy. RestartPolicy RestartPolicy `json:"restart_policy"` // Runtime status for restart policy decisions. @@ -732,6 +735,7 @@ type Instance struct { Network respjson.Field OverlaySize respjson.Field PhaseDurationsMs respjson.Field + Platform respjson.Field RestartPolicy respjson.Field RestartStatus respjson.Field Size respjson.Field @@ -1406,6 +1410,11 @@ type InstanceNewParams struct { HotplugSize param.Opt[string] `json:"hotplug_size,omitzero"` // Writable overlay disk size (human-readable format like "10GB", "50G") OverlaySize param.Opt[string] `json:"overlay_size,omitzero"` + // Target platform as os/arch[/variant] (e.g. "linux/amd64"), matching Docker + // --platform. Omit for the host platform. Not a fixed enum: the os/arch[/variant] + // grammar is validated server-side and invalid values return 400 invalid_platform. + // Only os "linux" with arch amd64 or arm64 is accepted today. + Platform param.Opt[string] `json:"platform,omitzero"` // Base memory size (human-readable format like "1GB", "512MB", "2G") Size param.Opt[string] `json:"size,omitzero"` // Skip guest-agent installation during boot. When true, the exec and stat APIs diff --git a/instance_test.go b/instance_test.go index 9299a21..f075ba2 100644 --- a/instance_test.go +++ b/instance_test.go @@ -96,6 +96,7 @@ func TestInstanceNewWithOptionalParams(t *testing.T) { Enabled: hypeman.Bool(true), }, OverlaySize: hypeman.String("20GB"), + Platform: hypeman.String("linux/amd64"), RestartPolicy: hypeman.RestartPolicyParam{ Backoff: hypeman.String("5s"), MaxAttempts: hypeman.Int(10), diff --git a/internal/version.go b/internal/version.go index 6c84346..b6325aa 100644 --- a/internal/version.go +++ b/internal/version.go @@ -2,4 +2,4 @@ package internal -const PackageVersion = "0.20.0" // x-release-please-version +const PackageVersion = "0.21.0" // x-release-please-version