-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix Gitpod CLI arm builds #20032
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 Gitpod CLI arm builds #20032
Conversation
/gh run recreate-vm=true Comment triggered a workflow runStarted workflow run: 9907471768
|
" " + | ||
mainFile, | ||
// We need to set GOARCH explicitly here because the `defaultVariant` in `WORKSPACE.yaml` overrides it for the workspace | ||
`GOARCH=${goarch} go build -trimpath -ldflags "-X github.com/gitpod-io/local-app/pkg/constants.GitCommit=\${__git_commit} -X github.com/gitpod-io/local-app/pkg/constants.BuildTime=\$(date +%s)" -o ${binaryName} ${mainFile}`, |
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.
isn't this the same with env
line above?
env: ["GOOS=" + goos, "GOARCH=" + goarch, "CGO_ENABLED=0"],
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.
Not sure if I follow exactly, but inlining the env variable here means it's out of reach for leeway to change, so we don't have to worry about it being overridden. The other vars can be kept because we don't override them anywhere.
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.
I see, you mean the bug is caused by env
defined in current leeway build will be overridden by what's defined in WORKSPACE.yaml
It's a weird behavior, maybe worth create an issue on leeway as well? not sure if it's designed by that
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.
I think the argument can be made that variants should override environment variables, although I agree it makes more sense that packages would take precedence. We should still merge this, but perhaps if it gets fixed in leeway we can revert it.
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.
Raised gitpod-io/leeway#186 cc @mustard-mh @csweichel
Description
We accidentally changed all builds to build for
amd64
and this PR fixes that.Related Issue(s)
Fixes ENT-325
How to test
Check it's
arm64
Documentation
Preview status
Gitpod was successfully deployed to your preview environment.
Build Options
Build
Run the build with werft instead of GHA
Run Leeway with
--dont-test
Publish
Installer
Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
If enabled this will build
install/preview
If enabled this will create the environment on GCE infra
Saves cost. Untick this only if you're really sure you need a non-preemtible machine.
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh
. If enabled,with-preview
andwith-large-vm
will be enabled./hold