Skip to content

Commit

Permalink
dashboard, env: add js-wasm-node18 builder
Browse files Browse the repository at this point in the history
Build and use a new container image with Node.js v18.12.1:

$ docker run gcr.io/symbolic-datum-552/js-wasm-node18:latest /usr/bin/node --version
v18.12.1

Use this as an opportunity to tweak/simplify the builder configuration
a bit. For example, drop the dist test skips for "nolibgcc:crypto/x509"
and "vendor/golang.org/x/arch" since they're no-ops, and try 3 helpers
at first since I feel that might work well, and in the worst case will
give us useful timing data.

Add it as a non-trybot with a known issue first. Once it works, I'll
switch it to be the default trybot, and drop the old builder when it
stops being useful.

For golang/go#57017.

Change-Id: I89188fedbc6c636579754402a1ad81c588f92d71
Reviewed-on: https://go-review.googlesource.com/c/build/+/460036
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
  • Loading branch information
dmitshur authored and gopherbot committed Dec 29, 2022
1 parent 22ad766 commit 1f2478a
Show file tree
Hide file tree
Showing 4 changed files with 447 additions and 2 deletions.
39 changes: 37 additions & 2 deletions dashboard/builders.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,15 @@ var Hosts = map[string]*HostConfig{
SSHUsername: "root",
},
"host-linux-amd64-js-wasm": {
Notes: "Container with node.js for testing js/wasm.",
Notes: "Container with Node.js 14 for testing js/wasm.",
ContainerImage: "js-wasm:latest",
SSHUsername: "root",
},
"host-linux-amd64-js-wasm-node18": {
Notes: "Container with Node.js 18 for testing js/wasm.",
ContainerImage: "js-wasm-node18:latest",
SSHUsername: "root",
},
"host-linux-amd64-localdev": {
IsReverse: true,
ExpectNum: 0,
Expand Down Expand Up @@ -1957,7 +1962,6 @@ func init() {
}
return b
},

distTestAdjust: func(run bool, distTest string, isNormalTry bool) bool {
if isNormalTry {
if strings.Contains(distTest, "/internal/") ||
Expand All @@ -1978,6 +1982,37 @@ func init() {
"GO_DISABLE_OUTBOUND_NETWORK=1",
},
})
addBuilder(BuildConfig{
Name: "js-wasm-node18",
HostType: "host-linux-amd64-js-wasm-node18",
KnownIssues: []int{57017},
buildsRepo: func(repo, branch, goBranch string) bool {
b := buildRepoByDefault(repo)
switch repo {
case "benchmarks", "debug", "perf", "talks", "tools", "tour", "website":
// Don't test these golang.org/x repos.
b = false
}
if repo != "go" && !(branch == "master" && goBranch == "master") {
// For golang.org/x repos, don't test non-latest versions.
b = false
}
return b
},
distTestAdjust: func(run bool, distTest string, isNormalTry bool) bool {
if isNormalTry && (strings.Contains(distTest, "/internal/") || distTest == "reboot") {
// Skip some tests in an attempt to speed up normal trybots, inherited from CL 121938.
run = false
}
return run
},
numTryTestHelpers: 3,
env: []string{
"GOOS=js", "GOARCH=wasm", "GOHOSTOS=linux", "GOHOSTARCH=amd64",
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/workdir/go/misc/wasm",
"GO_DISABLE_OUTBOUND_NETWORK=1",
},
})
addBuilder(BuildConfig{
Name: "openbsd-amd64-68",
HostType: "host-openbsd-amd64-68",
Expand Down
17 changes: 17 additions & 0 deletions env/js-wasm-node18/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2022 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

FROM {{REPO}}/linux-x86-sid:20221109
LABEL maintainer="golang-dev@googlegroups.com"

ENV DEBIAN_FRONTEND noninteractive

# A copy of https://deb.nodesource.com/setup_18.x.
COPY setup_18.x setup_18.x

RUN bash setup_18.x && \
apt-get install -y nodejs && \
rm -rf setup_18.x /var/lib/apt/lists/*

CMD ["/usr/local/bin/stage0"]
26 changes: 26 additions & 0 deletions env/js-wasm-node18/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2022 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

IMAGE_NAME=$(shell basename $(CURDIR))
PROD_REPO=gcr.io/symbolic-datum-552

usage:
echo "Use prod or dev targets. For dev, specify your Docker repository with the REPO=foo argument." ; exit 1

prod: Dockerfile
sed 's|{{REPO}}|'"$(PROD_REPO)"'|g' Dockerfile > Dockerfile.make
docker build -t $(PROD_REPO)/$(IMAGE_NAME):latest -f Dockerfile.make .

pushprod: prod
docker push $(PROD_REPO)/$(IMAGE_NAME):latest
rm Dockerfile.make

# You must provide a REPO=your-repo-name arg when you make
# this target. REPO is the name of the Docker repository
# that will be prefixed to the name of the image being built.
dev: Dockerfile
sed 's|{{REPO}}|'"$(REPO)"'|g' Dockerfile > Dockerfile.make
docker build -t $(REPO)/$(IMAGE_NAME):latest -f Dockerfile.make .
docker push $(REPO)/$(IMAGE_NAME):latest
rm Dockerfile.make

0 comments on commit 1f2478a

Please sign in to comment.