-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: release pipeline #104
Conversation
* change actions/checkout to v4 * change actions/setup-go to v5 * change go-version to v1.22 * change goreleaser/goreleaser-action to v6 * add "version: 2" to .goreleaser.yml * remove darwin from .goreleaser.yml, because we import longhorn/go-common-libs which uses unix.CLONE_NEWNET Signed-off-by: PoAn Yang <[email protected]>
f0aa588
to
b0a0215
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
@FrankYang0529 @Yu-Jack I think this change cause the provider to be not available for me on macos: │ Provider registry.terraform.io/harvester/harvester v0.6.5 does not have a package available for your current platform, darwin_amd64. :( |
@FrankYang0529 Can we see if we can enable darwin platform again? |
Yeah, @Yu-Jack and I are checking on it. |
@FrankYang0529 I think we need to modify longhorn/go-common-libs by creating different system go files. Here are two examples you could try that. ExampleThis example works with different builds.
// main.go
package main
import "fmt"
func main() {
a := Namespace("test")
fmt.Println(a.Flag())
} // namespace_linux.go
// go:build linux
package main
import (
"fmt"
"golang.org/x/sys/unix"
)
type Namespace string
const (
NamespaceNet = Namespace("net")
)
func (ns Namespace) Flag() uintptr {
fmt.Println("linux")
switch ns {
case NamespaceNet:
return unix.CLONE_NEWNET
default:
return 0
}
} // namespace_darwin.go
// go:build darwin
package main
import (
"fmt"
)
type Namespace string
const (
NamespaceNet = Namespace("net")
)
func (ns Namespace) Flag() uintptr {
fmt.Println("darwin")
return 0
} Example 2This is a wrong example. It complains the error which is // namespace_darwin.go
// go:build darwin
package main
import (
"fmt"
"golang.org/x/sys/unix"
)
type Namespace string
const (
NamespaceNet = Namespace("net")
)
func (ns Namespace) Flag() uintptr {
fmt.Print(unix.CLONE_NEWNET)
fmt.Println("darwin")
return 0
} So, we need to add |
harvester/harvester#6655 tracks that |
longhorn/go-common-libs which uses unix.CLONE_NEWNET