kubernetes-sigs / kube-scheduler-wasm-extension

All the things to make the scheduler extendable with wasm.
Apache License 2.0
86 stars 17 forks source link

Fix go.mod go version to 1.20 #12

Closed gonzaloserrano closed 12 months ago

gonzaloserrano commented 12 months ago

What type of PR is this?

/kind bug

What this PR does / why we need it:

I tried running guest/ tests with go 1.20.x and got

internal/imports/mem.go:24:24: unsafe.StringData requires go1.20 or later (-lang was set to go1.19; check go.mod)

Then I downgraded to go 1.19 (via brew) and got:

# sigs.k8s.io/kube-scheduler-wasm-extension/guest/internal/imports
internal/imports/mem.go:24:31: undefined: unsafe.StringData

So since unsafe.StringData is from go 1.20 I guess the guest go.mod should specify go 1.20? Most of the repo versions, and kubernetes/kubernetes also, have go 1.20 in their go.mod.

Which issue(s) this PR fixes:

n/a

Special notes for your reviewer:

n/a

Does this PR introduce a user-facing change?

NONE

k8s-ci-robot commented 12 months ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: gonzaloserrano Once this PR has been reviewed and has the lgtm label, please assign kerthcet for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/kubernetes-sigs/kube-scheduler-wasm-extension/blob/main/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
codefromthecrypt commented 12 months ago

There are no tests in the guest module, so I think the impact of this is lower.

We are intentionally leaving the guest (tinygo) as 1.19 until TinyGo 0.28 which supports 1.20 is out (very soon). We should probably add a comment to the go.mod that this is for tinygo.

kerthcet commented 12 months ago

/hold Feel free to close this or hold until tinygo releases v0.28.