Skip to content

[dev] Update go to 1.16.3 #3820

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

Merged
merged 2 commits into from
Apr 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:pluggable-workspace-cluster.9
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aledbf-go163.38
workspaceLocation: gitpod/gitpod-ws.code-workspace
checkoutLocation: gitpod
ports:
Expand Down Expand Up @@ -32,7 +32,7 @@ tasks:
- before: scripts/branch-namespace.sh
init: yarn --network-timeout 100000 && yarn build
- name: Go
init: leeway exec --filter-type go -v -- go mod download
init: leeway exec --filter-type go -v -- go mod verify
openMode: split-right
vscode:
extensions:
Expand Down
2 changes: 1 addition & 1 deletion .werft/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pod:
- name: MYSQL_TCP_PORT
value: 23306
- name: build
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:pluggable-workspace-cluster.9
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aledbf-go163.38
workingDir: /workspace
imagePullPolicy: Always
volumeMounts:
Expand Down
6 changes: 3 additions & 3 deletions .werft/run-integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pod:
emptyDir: {}
initContainers:
- name: gcloud
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:pluggable-workspace-cluster.9
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aledbf-go163.38
workingDir: /workspace
imagePullPolicy: Always
volumeMounts:
Expand All @@ -36,7 +36,7 @@ pod:
- bash
- -c
- |

echo "[prep] preparing config."

gcloud auth activate-service-account --key-file /mnt/secrets/gcp-sa/service-account.json
Expand Down Expand Up @@ -74,6 +74,6 @@ pod:
echo "[prep|DONE]"

/entrypoint.sh -kubeconfig=/config/kubeconfig -namespace={{ .Annotations.namespace }} -username=$USERNAME 2>&1 | ts "[int-tests] "

RC=${PIPESTATUS[0]}
if [ $RC -eq 1 ]; then echo "[int-tests|FAIL]"; else echo "[int-tests|DONE]"; fi
4 changes: 2 additions & 2 deletions .werft/wipe-devstaging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ pod:
secretName: gcp-sa-gitpod-dev-deployer
containers:
- name: wipe-devstaging
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:pluggable-workspace-cluster.9
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aledbf-go163.38
workingDir: /workspace
imagePullPolicy: Always
volumeMounts:
- name: gcp-sa
mountPath: /mnt/secrets/gcp-sa
readOnly: true
command:
- bash
- bash
- -c
- |
sleep 1
Expand Down
3 changes: 2 additions & 1 deletion WORKSPACE.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ defaultArgs:
coreYarnLockBase: ../..
publishToNPM: true

defaultVariant:
defaultVariant:
config:
go:
lintCommand: ["golangci-lint", "run", "--disable", "govet,typecheck"]
buildCommand: ["go", "build", "-trimpath", "-ldflags='-buildid= -w -s'"]

variants:
- name: oss
Expand Down
3 changes: 0 additions & 3 deletions components/docker-up/BUILD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ packages:
- ["go", "generate"]
config:
dontTest: true
buildCommand: ["go", "build", "-trimpath", "-ldflags='-buildid= -w -s'"]
- name: bin-runc-facade
type: go
srcs:
Expand All @@ -30,7 +29,6 @@ packages:
- ["rmdir", "runc-facade"]
config:
dontTest: true
buildCommand: ["go", "build", "-trimpath", "-ldflags='-buildid= -w -s'"]
- name: bin-slirp-docker-proxy
type: go
srcs:
Expand All @@ -45,7 +43,6 @@ packages:
- ["rmdir", "slirp-docker-proxy"]
config:
dontTest: true
buildCommand: ["go", "build", "-trimpath", "-ldflags='-buildid= -w -s'"]
- name: app
type: generic
deps:
Expand Down
3 changes: 1 addition & 2 deletions components/gitpod-protocol/go/BUILD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ packages:
- GOOS=linux
config:
packaging: library
buildFlags:
- "-ldflags=-w"
buildCommand: ["go", "build", "-trimpath", "-ldflags=-buildid="]
4 changes: 2 additions & 2 deletions components/gitpod-protocol/go/gitpod-config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestGitpodConfig(t *testing.T) {
{
Desc: "parsing",
Content: `
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:pluggable-workspace-cluster.9
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aledbf-go163.38
workspaceLocation: gitpod/gitpod-ws.code-workspace
checkoutLocation: gitpod
ports:
Expand All @@ -43,7 +43,7 @@ vscode:
- [email protected]:UATTe2sTFfCYWQ3jw4IRsw==
- [email protected]:ZnPmyF/Pb8AIWeCqc83gPw==`,
Expectation: &GitpodConfig{
Image: "eu.gcr.io/gitpod-core-dev/dev/dev-environment:pluggable-workspace-cluster.9",
Image: "eu.gcr.io/gitpod-core-dev/dev/dev-environment:aledbf-go163.38",
WorkspaceLocation: "gitpod/gitpod-ws.code-workspace",
CheckoutLocation: "gitpod",
Ports: []*PortsItems{
Expand Down
3 changes: 0 additions & 3 deletions components/supervisor/BUILD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ packages:
env:
- CGO_ENABLED=0
- GOOS=linux
config:
buildFlags:
- "-ldflags=-w"
- name: docker
type: docker
srcs:
Expand Down
2 changes: 2 additions & 0 deletions components/ws-daemon/BUILD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ packages:
- GOOS=linux
config:
packaging: app
buildCommand: ["go", "build", "-trimpath", "-ldflags=-buildid="]
- name: content-initializer
type: go
srcs:
Expand All @@ -37,6 +38,7 @@ packages:
config:
packaging: app
dontTest: true
buildCommand: ["go", "build", "-trimpath", "-ldflags=-buildid="]
- name: docker
type: docker
deps:
Expand Down
1 change: 0 additions & 1 deletion components/ws-manager/BUILD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ packages:
- GOOS=linux
config:
packaging: app
buildCommand: ["go", "build", "-trimpath", "-ldflags", "-w -extldflags \"-static\""]
- name: docker
type: docker
deps:
Expand Down
1 change: 1 addition & 0 deletions components/ws-proxy/BUILD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ packages:
- GOOS=linux
config:
packaging: app
buildCommand: ["go", "build", "-trimpath", "-ldflags=-buildid="]
- name: docker
type: docker
srcs:
Expand Down
1 change: 1 addition & 0 deletions dev/gpctl/BUILD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ packages:
config:
packaging: app
dontTest: true

12 changes: 7 additions & 5 deletions dev/image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,13 @@ ENV PATH=/home/gitpod/.nvm/versions/node/v${GITPOD_NODE_VERSION}/bin:$PATH
# Fix the Go version
ENV GOPATH=$HOME/go-packages
ENV GOROOT=$HOME/go
RUN go get golang.org/dl/go1.16 && \
go1.16 download && \
mv $(which go1.16) $(which go)
ENV GOPATH=/workspace/go \
PATH=/workspace/go/bin:$PATH
RUN go get golang.org/dl/go1.16.3 \
&& go1.16.3 download \
&& mv $(which go1.16.3) $(which go)
ENV GOPATH=/workspace/go
ENV PATH=/workspace/go/bin:$PATH

ENV GOFLAGS="-mod=readonly"

## Register leeway autocompletion in bashrc
RUN bash -c "echo . \<\(leeway bash-completion\) >> ~/.bashrc"
Expand Down
2 changes: 2 additions & 0 deletions install/installer/BUILD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ packages:
env:
- CGO_ENABLED=0
- GOOS=linux
config:
packaging: app
- name: docker
type: docker
srcs:
Expand Down