├── .gitignore ├── internal ├── gcsfs │ └── testdata │ │ └── dirfs │ │ ├── a │ │ ├── b │ │ └── dir │ │ └── x ├── diff │ └── testdata │ │ ├── same.txt │ │ ├── eof.txt │ │ ├── allnew.txt │ │ ├── allold.txt │ │ ├── eof1.txt │ │ ├── eof2.txt │ │ ├── start.txt │ │ ├── dups.txt │ │ ├── end.txt │ │ ├── basic.txt │ │ ├── triv.txt │ │ └── long.txt ├── task │ ├── testdata │ │ ├── terminal.png │ │ ├── pre-announce-minor-solo.txt │ │ ├── pre-announce-minor.txt │ │ ├── pre-announce-minor-solo.html │ │ ├── pre-announce-minor.html │ │ ├── announce-minor.txt │ │ ├── announce-major.txt │ │ ├── announce-minor.html │ │ ├── announce-minor-solo.txt │ │ ├── announce-major.html │ │ ├── announce-beta.txt │ │ ├── announce-rc.txt │ │ ├── announce-minor-solo.html │ │ ├── announce-beta.html │ │ └── announce-rc.html │ ├── _data │ │ └── darwinpkg │ │ │ ├── blue-bg.png │ │ │ └── brown-bg.png │ ├── README.md │ ├── releaselet │ │ ├── README.md │ │ └── releaselet_test.go │ ├── gerrit_test.go │ └── template │ │ ├── pre-announce-minor.md │ │ ├── announce-major.md │ │ ├── announce-beta.md │ │ └── announce-rc.md ├── relui │ ├── testing │ │ └── test.css │ ├── static │ │ └── images │ │ │ ├── chevron_right_black_24dp.svg │ │ │ ├── expand_more_black_24dp.svg │ │ │ ├── error_red_24dp.svg │ │ │ ├── check_circle_green_24dp.svg │ │ │ ├── pending_grey_24dp.svg │ │ │ └── pending_yellow_24dp.svg │ ├── migrations │ │ ├── 20210928195553_create_task_logs_table.down.sql │ │ ├── 20220609175710_remove_corrupt_workflow.down.sql │ │ ├── 20220715183205_add_retry_count.down.sql │ │ ├── 20220712205734_add_started_to_tasks.down.sql │ │ ├── 20210909141405_create_workflows_table.down.sql │ │ ├── 20220715183205_add_retry_count.up.sql │ │ ├── 20220712205734_add_started_to_tasks.up.sql │ │ ├── 20220901160804_create_schedules.down.sql │ │ ├── 20211005180646_update_workflows_add_finished.down.sql │ │ ├── 20220622151222_add_ready_for_approval_to_tasks.down.sql │ │ ├── 20220622151222_add_ready_for_approval_to_tasks.up.sql │ │ ├── 20220609175710_remove_corrupt_workflow.up.sql │ │ ├── 20210928195553_create_task_logs_table.up.sql │ │ ├── 20220621201140_add_approved_at_to_tasks.up.sql │ │ ├── 20211005180646_update_workflows_add_finished.up.sql │ │ ├── 20210909141405_create_workflows_table.up.sql │ │ ├── 20220621201140_add_approved_at_to_tasks.down.sql │ │ └── 20220901160804_create_schedules.up.sql │ ├── sign │ │ └── doc.go │ ├── templates │ │ └── scheduled_workflow_failure_email.txt │ ├── content.go │ ├── db │ │ ├── pgdbtx.go │ │ └── db.go │ ├── protos │ │ └── proto.go │ └── metrics_test.go ├── logparser │ └── testdata │ │ ├── 9.fail │ │ └── 12.fail ├── lru │ └── README.md ├── access │ ├── doc.go │ └── README.md ├── coordinator │ ├── remote │ │ ├── doc.go │ │ └── README.md │ └── schedule │ │ └── span_test.go ├── untar │ └── README.md ├── httpdl │ └── README.md ├── https │ └── README.md ├── spanlog │ ├── README.md │ └── spanlog.go ├── envutil │ └── README.md ├── iapclient │ └── README.md ├── buildgo │ └── README.md ├── foreach │ └── README.md ├── sourcecache │ └── README.md ├── secret │ └── README.md ├── gomote │ ├── README.md │ ├── doc.go │ └── protos │ │ └── protos.go ├── singleflight │ └── README.md ├── metrics │ └── README.md ├── buildstats │ └── README.md ├── gitauth │ └── README.md ├── datastore │ └── fake │ │ └── README.md ├── gophers │ └── README.md ├── loghash │ ├── README.md │ └── loghash.go ├── workflow │ └── README.md ├── influx │ └── influx.go └── internal_test.go ├── cmd ├── gitmirror │ ├── .gitignore │ ├── service.yaml │ └── README.md ├── coordinator │ ├── .gitignore │ ├── internal │ │ ├── legacydash │ │ │ ├── static │ │ │ │ ├── status_good.gif │ │ │ │ └── status_alert.gif │ │ │ └── README.md │ │ └── dashboard │ │ │ └── README.md │ ├── protos │ │ ├── protos.go │ │ └── coordinator.proto │ ├── service-staging.yaml │ ├── templates │ │ └── base.html │ ├── builders_test.go │ ├── version.sh │ ├── cloudbuild.yaml │ ├── README.md │ ├── deployment-staging.yaml │ ├── module-proxy-service.yaml │ └── queues_test.go ├── docker2boot │ ├── .gitignore │ └── README.md ├── pubsubhelper │ ├── .gitignore │ ├── pubsubtypes │ │ └── README.md │ └── README.md ├── buildlet │ ├── .gitignore │ ├── stage0 │ │ ├── README.md │ │ ├── Dockerfile │ │ └── stage0_windows.go │ ├── testssh │ │ └── README.md │ └── README ├── relui │ ├── .prettierrc.yaml │ ├── Dockerfile.node │ ├── .stylelintrc.yaml │ ├── Dockerfile.test │ ├── .eslintrc.yaml │ ├── Dockerfile │ ├── cloudbuild.yaml │ ├── sqlc.yaml │ └── package.json ├── greplogs │ ├── README.md │ ├── internal │ │ └── logparse │ │ │ ├── doc.go │ │ │ └── README.md │ ├── _embed │ │ ├── README.md │ │ └── broken.go │ └── xdg.go ├── upload │ └── README.md ├── gomote │ ├── README.md │ └── rdp.go ├── buildstats │ └── README.md ├── racebuild │ └── README.md ├── genbootstrap │ └── README.md ├── debugnewvm │ └── README.md ├── relnote │ └── README.md ├── releaseschedule │ └── README.md ├── genbuilderkey │ └── README.md ├── retrybuilds │ └── README.md ├── fetchlogs │ ├── README.md │ └── xdg.go ├── xb │ └── README.md ├── rundockerbuildlet │ └── README.md ├── updatestd │ └── README.md ├── perfrun │ └── README.md ├── runqemubuildlet │ └── README.md ├── gerritbot │ └── README.md └── gopherbot │ └── README.md ├── .gcloudignore ├── codereview.cfg ├── env ├── linux-x86-sid │ ├── Makefile │ └── cloudbuild.yaml ├── plan9 │ ├── .gitignore │ └── plan9-gce.iso.sha1 ├── linux-x86-alpine │ ├── Makefile │ └── Dockerfile ├── linux-x86-bullseye │ └── Makefile ├── linux-x86-buster │ └── Makefile ├── linux-x86-clang │ ├── Makefile │ └── sources │ │ └── clang-deps.list ├── linux-x86-debug │ ├── Makefile │ └── Dockerfile ├── linux-x86-fedora │ ├── Makefile │ └── Dockerfile ├── linux-x86-stretch │ └── Makefile ├── openbsd-386 │ ├── README │ ├── .gitignore │ └── make.bash ├── linux-arm64-bullseye │ └── Makefile ├── windows │ ├── .gitignore │ ├── rdp.bash │ ├── ssh.bash │ └── make.bash ├── freebsd-amd64 │ ├── sysctl.conf │ ├── .gitignore │ ├── rc.conf │ ├── loader.conf │ ├── Makefile │ ├── buildlet │ └── README ├── linux-ppc64le │ └── osuosl │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── install-docker.bash │ │ ├── p10.patch │ │ ├── rundockerbuildlet.service │ │ ├── install-buildlet.bash │ │ └── setup-remote.sh ├── crosscompile │ ├── linux-armel-cross │ │ ├── Makefile │ │ └── README │ ├── linux-armhf-cross │ │ ├── Makefile │ │ └── README │ └── linux-s390x-cross │ │ ├── Makefile │ │ └── README ├── netbsd-386 │ ├── anita-2.10.tar.gz.sha1 │ ├── .gitignore │ └── Makefile ├── dragonfly-amd64 │ ├── .gitignore │ ├── phase2.sh │ └── README ├── netbsd-amd64 │ ├── .gitignore │ ├── anita-2.10.tar.gz.sha1 │ └── Makefile ├── linux-ppc64 │ └── osuosl │ │ ├── sid-image │ │ ├── Dockerfile.sid │ │ └── build-sid.sh │ │ ├── rundockerbuildlet.service │ │ └── buildlet-image │ │ └── Dockerfile ├── corellium │ ├── ios │ │ └── files │ │ │ ├── profile │ │ │ ├── builder.sh │ │ │ ├── org.golang.builder.plist │ │ │ └── arwrap.go │ ├── android │ │ └── files │ │ │ ├── run-builder-at-boot │ │ │ ├── profile │ │ │ ├── exec.sh │ │ │ ├── builder.sh │ │ │ └── clangwrap.go │ └── README.md ├── linux-arm-qemu │ ├── buildlet.service │ ├── qemu.service │ ├── Makefile │ ├── buildlet-qemu │ └── stage2 ├── openbsd-amd64 │ ├── .gitignore │ └── README ├── android-amd64-emu │ ├── README.md │ └── Makefile ├── linux-arm │ └── aws │ │ ├── containerd.service │ │ ├── rundockerbuildlet.service │ │ ├── Makefile │ │ ├── Dockerfile │ │ └── README.md ├── linux-x86-vmx │ └── README.md ├── windows-arm64 │ └── azure │ │ └── windows-arm64-stage0-loop.bat ├── darwin │ └── aws │ │ ├── bootptab │ │ ├── start-mutable.sh │ │ ├── start-snapshot.sh │ │ └── start-installer.sh ├── wasip1-wasm-wazero │ ├── Dockerfile │ └── Makefile ├── js-wasm │ └── Dockerfile ├── js-wasm-node18 │ ├── Dockerfile │ └── Makefile ├── wasip1-wasm-wasmtime │ ├── Dockerfile │ └── Makefile └── shared-makefile │ └── Makefile ├── maintner ├── maintnerd │ ├── .gitignore │ ├── apipb │ │ ├── README │ │ └── apipb.go │ ├── maintapi │ │ ├── README.md │ │ └── version │ │ │ └── README.md │ ├── gcslog │ │ ├── README.md │ │ └── gcslog_test.go │ └── README.md ├── maintq │ └── README.md ├── README.md ├── maintpb │ ├── README.md │ └── maintpb.go ├── maintwatch │ ├── README.md │ └── maintwatch.go ├── reclog │ └── README.md ├── cmd │ └── maintserve │ │ └── README.md ├── internal │ └── robustio │ │ ├── README.md │ │ ├── robustio_darwin.go │ │ ├── robustio_other.go │ │ └── robustio_windows.go └── godata │ ├── README.md │ └── example_test.go ├── .dockerignore ├── devapp ├── static │ ├── favicon.ico │ └── index.html ├── README.md ├── gzip.go ├── service-staging.yaml ├── gophercon_test.go ├── release_test.go └── deployment-staging.yaml ├── cloudfns ├── wikiwebhook │ ├── go.mod │ └── README.md └── sendwikidiff │ ├── go.mod │ ├── go.sum │ └── README.md ├── perfdata ├── appengine │ ├── README.md │ ├── app.yaml │ ├── static │ │ └── upload.html │ └── .gcloudignore ├── db │ ├── export_test.go │ ├── dbtest │ │ └── nocloud.go │ ├── sqlite3 │ │ └── sqlite3.go │ └── schema.sql ├── app │ ├── appengine.go │ └── local.go ├── query │ ├── query_test.go │ └── query.go └── fs │ └── gcs │ └── gcs.go ├── vcs-test ├── dav_svn.conf ├── vcweb │ ├── deathclock_go121_test.go │ ├── bzr.go │ ├── svn.go │ ├── deathclock_test.go │ ├── git.go │ └── insecure.go ├── Dockerfile.apache └── Makefile ├── gerrit ├── README.md └── example_test.go ├── repos ├── README.md └── repos_test.go ├── pargzip └── README.md ├── tarutil └── README.md ├── types └── README.md ├── kubernetes ├── README.md ├── api │ └── README.md └── gke │ └── README.md ├── autocertcache └── README.md ├── livelog └── README.md ├── third_party └── bandchart │ ├── fs.go │ └── LICENSE ├── revdial └── v2 │ └── README.md ├── app └── appengine │ └── index.yaml ├── influx └── Dockerfile ├── perf ├── Dockerfile └── app │ ├── index.go │ └── parse_test.go ├── dashboard └── README.md ├── doc └── deployment.md └── CONTRIBUTING.md /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | -------------------------------------------------------------------------------- /internal/gcsfs/testdata/dirfs/a: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/gcsfs/testdata/dirfs/b: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cmd/gitmirror/.gitignore: -------------------------------------------------------------------------------- 1 | gitmirror 2 | -------------------------------------------------------------------------------- /internal/gcsfs/testdata/dirfs/dir/x: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gcloudignore: -------------------------------------------------------------------------------- 1 | *.iso 2 | *.raw 3 | \.#* 4 | -------------------------------------------------------------------------------- /cmd/coordinator/.gitignore: -------------------------------------------------------------------------------- 1 | coordinator 2 | -------------------------------------------------------------------------------- /codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /env/linux-x86-sid/Makefile: -------------------------------------------------------------------------------- 1 | ../shared-makefile/Makefile -------------------------------------------------------------------------------- /env/plan9/.gitignore: -------------------------------------------------------------------------------- 1 | disk.raw 2 | plan9-gce.iso 3 | -------------------------------------------------------------------------------- /cmd/docker2boot/.gitignore: -------------------------------------------------------------------------------- 1 | disk.raw 2 | docker2boot 3 | -------------------------------------------------------------------------------- /env/linux-x86-alpine/Makefile: -------------------------------------------------------------------------------- 1 | ../shared-makefile/Makefile -------------------------------------------------------------------------------- /env/linux-x86-bullseye/Makefile: -------------------------------------------------------------------------------- 1 | ../shared-makefile/Makefile -------------------------------------------------------------------------------- /env/linux-x86-buster/Makefile: -------------------------------------------------------------------------------- 1 | ../shared-makefile/Makefile -------------------------------------------------------------------------------- /env/linux-x86-clang/Makefile: -------------------------------------------------------------------------------- 1 | ../shared-makefile/Makefile -------------------------------------------------------------------------------- /env/linux-x86-debug/Makefile: -------------------------------------------------------------------------------- 1 | ../shared-makefile/Makefile -------------------------------------------------------------------------------- /env/linux-x86-fedora/Makefile: -------------------------------------------------------------------------------- 1 | ../shared-makefile/Makefile -------------------------------------------------------------------------------- /env/linux-x86-stretch/Makefile: -------------------------------------------------------------------------------- 1 | ../shared-makefile/Makefile -------------------------------------------------------------------------------- /env/openbsd-386/README: -------------------------------------------------------------------------------- 1 | See ../openbsd-amd64/README. 2 | -------------------------------------------------------------------------------- /env/linux-arm64-bullseye/Makefile: -------------------------------------------------------------------------------- 1 | ../shared-makefile/Makefile -------------------------------------------------------------------------------- /env/windows/.gitignore: -------------------------------------------------------------------------------- 1 | instance.txt 2 | .envrc 3 | out/* 4 | -------------------------------------------------------------------------------- /cmd/pubsubhelper/.gitignore: -------------------------------------------------------------------------------- 1 | pubsubhelper 2 | ca-certificates.crt 3 | -------------------------------------------------------------------------------- /env/freebsd-amd64/sysctl.conf: -------------------------------------------------------------------------------- 1 | kern.timecounter.hardware=TSC-low 2 | -------------------------------------------------------------------------------- /env/linux-ppc64le/osuosl/.gitignore: -------------------------------------------------------------------------------- 1 | rundockerbuildlet.ppc64le 2 | -------------------------------------------------------------------------------- /maintner/maintnerd/.gitignore: -------------------------------------------------------------------------------- 1 | maintnerd 2 | ca-certificates.crt 3 | -------------------------------------------------------------------------------- /env/crosscompile/linux-armel-cross/Makefile: -------------------------------------------------------------------------------- 1 | ../../shared-makefile/Makefile -------------------------------------------------------------------------------- /env/crosscompile/linux-armhf-cross/Makefile: -------------------------------------------------------------------------------- 1 | ../../shared-makefile/Makefile -------------------------------------------------------------------------------- /env/crosscompile/linux-s390x-cross/Makefile: -------------------------------------------------------------------------------- 1 | ../../shared-makefile/Makefile -------------------------------------------------------------------------------- /env/freebsd-amd64/.gitignore: -------------------------------------------------------------------------------- 1 | iso 2 | config.iso 3 | *.raw 4 | *.qcow2 5 | -------------------------------------------------------------------------------- /env/netbsd-386/anita-2.10.tar.gz.sha1: -------------------------------------------------------------------------------- 1 | ../netbsd-amd64/anita-2.10.tar.gz.sha1 -------------------------------------------------------------------------------- /maintner/maintnerd/apipb/README: -------------------------------------------------------------------------------- 1 | Run "go generate" to rebuild after edits. 2 | -------------------------------------------------------------------------------- /env/dragonfly-amd64/.gitignore: -------------------------------------------------------------------------------- 1 | *.iso 2 | *.iso.bz2 3 | disk-* 4 | disk.* 5 | isotmp 6 | -------------------------------------------------------------------------------- /env/netbsd-386/.gitignore: -------------------------------------------------------------------------------- 1 | anita-*/ 2 | anita-*.tar.gz 3 | netbsd-*.tar.gz 4 | work-* 5 | -------------------------------------------------------------------------------- /env/plan9/plan9-gce.iso.sha1: -------------------------------------------------------------------------------- 1 | b6f362a7483806036cdea26400b64519a6e8f60a plan9-gce.iso 2 | -------------------------------------------------------------------------------- /env/netbsd-amd64/.gitignore: -------------------------------------------------------------------------------- 1 | anita-*/ 2 | anita-*.tar.gz 3 | netbsd-*.tar.gz 4 | work-* 5 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | .git 2 | **/*.tar.gz 3 | **/*.tgz 4 | **/*.iso 5 | **/*.raw 6 | env/*/work-* 7 | -------------------------------------------------------------------------------- /devapp/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sayjun0505/build/HEAD/devapp/static/favicon.ico -------------------------------------------------------------------------------- /env/netbsd-amd64/anita-2.10.tar.gz.sha1: -------------------------------------------------------------------------------- 1 | 042deb4c820091bc5a55560ec65ec50c997b2bd3 anita-2.10.tar.gz 2 | -------------------------------------------------------------------------------- /internal/diff/testdata/same.txt: -------------------------------------------------------------------------------- 1 | -- old -- 2 | hello world 3 | -- new -- 4 | hello world 5 | -- diff -- 6 | -------------------------------------------------------------------------------- /env/linux-ppc64/osuosl/sid-image/Dockerfile.sid: -------------------------------------------------------------------------------- 1 | FROM scratch 2 | COPY ./debian_sid/ / 3 | CMD ["/bin/bash"] 4 | -------------------------------------------------------------------------------- /internal/diff/testdata/eof.txt: -------------------------------------------------------------------------------- 1 | -- old -- 2 | a 3 | b 4 | c^D 5 | -- new -- 6 | a 7 | b 8 | c^D 9 | -- diff -- 10 | -------------------------------------------------------------------------------- /internal/task/testdata/terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sayjun0505/build/HEAD/internal/task/testdata/terminal.png -------------------------------------------------------------------------------- /cmd/buildlet/.gitignore: -------------------------------------------------------------------------------- 1 | dev-buildlet.* 2 | buildlet 3 | buildlet.*-* 4 | stage0/buildlet-stage0.* 5 | cert.pem 6 | key.pem 7 | -------------------------------------------------------------------------------- /cmd/relui/.prettierrc.yaml: -------------------------------------------------------------------------------- 1 | arrowParens: avoid 2 | singleQuote: true 3 | bracketSpacing: false 4 | quoteProps: consistent 5 | -------------------------------------------------------------------------------- /env/corellium/ios/files/profile: -------------------------------------------------------------------------------- 1 | export PATH=$HOME/bin:$HOME/go/bin:$PATH 2 | export GOROOT_BOOTSTRAP=$HOME/go-ios-arm64-bootstrap 3 | -------------------------------------------------------------------------------- /internal/task/_data/darwinpkg/blue-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sayjun0505/build/HEAD/internal/task/_data/darwinpkg/blue-bg.png -------------------------------------------------------------------------------- /internal/task/_data/darwinpkg/brown-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sayjun0505/build/HEAD/internal/task/_data/darwinpkg/brown-bg.png -------------------------------------------------------------------------------- /cloudfns/wikiwebhook/go.mod: -------------------------------------------------------------------------------- 1 | module golang.org/x/build/cloudfns/wikiwebhook 2 | 3 | go 1.13 4 | 5 | require cloud.google.com/go/pubsub v1.26.0 6 | -------------------------------------------------------------------------------- /env/corellium/android/files/run-builder-at-boot: -------------------------------------------------------------------------------- 1 | termux-wake-lock 2 | sshd 3 | tmux new-session -d /data/data/com.termux/files/home/builder.sh 4 | -------------------------------------------------------------------------------- /perfdata/appengine/README.md: -------------------------------------------------------------------------------- 1 | # perfdata.golang.org 2 | 3 | Deploy: 4 | 5 | ``` 6 | gcloud app deploy --project=golang-org app.yaml 7 | ``` 8 | -------------------------------------------------------------------------------- /env/corellium/android/files/profile: -------------------------------------------------------------------------------- 1 | export GOROOT_BOOTSTRAP=$HOME/go-android-arm64-bootstrap 2 | export PATH=$HOME/go/bin:$PATH 3 | export TMPDIR=$HOME/tmpdir 4 | -------------------------------------------------------------------------------- /env/crosscompile/linux-armel-cross/README: -------------------------------------------------------------------------------- 1 | The docker image created from this directory can be used to cross compile go 2 | from linux/amd64 to linux/armel. 3 | -------------------------------------------------------------------------------- /env/crosscompile/linux-armhf-cross/README: -------------------------------------------------------------------------------- 1 | The docker image created from this directory can be used to cross compile go 2 | from linux/amd64 to linux/armhf. 3 | -------------------------------------------------------------------------------- /env/crosscompile/linux-s390x-cross/README: -------------------------------------------------------------------------------- 1 | The docker image created from this directory can be used to cross compile go 2 | from linux/amd64 to linux/s390x. 3 | -------------------------------------------------------------------------------- /cmd/coordinator/internal/legacydash/static/status_good.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sayjun0505/build/HEAD/cmd/coordinator/internal/legacydash/static/status_good.gif -------------------------------------------------------------------------------- /cmd/coordinator/internal/legacydash/static/status_alert.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sayjun0505/build/HEAD/cmd/coordinator/internal/legacydash/static/status_alert.gif -------------------------------------------------------------------------------- /env/linux-arm-qemu/buildlet.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Buildlet 3 | 4 | [Service] 5 | ExecStart=/usr/local/bin/stage0 6 | 7 | [Install] 8 | WantedBy=multi-user.target 9 | -------------------------------------------------------------------------------- /env/linux-arm-qemu/qemu.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=QEMU 3 | 4 | [Service] 5 | ExecStart=/usr/local/bin/buildlet-qemu 6 | 7 | [Install] 8 | WantedBy=multi-user.target 9 | -------------------------------------------------------------------------------- /internal/diff/testdata/allnew.txt: -------------------------------------------------------------------------------- 1 | -- old -- 2 | -- new -- 3 | a 4 | b 5 | c 6 | -- diff -- 7 | diff old new 8 | --- old 9 | +++ new 10 | @@ -0,0 +1,3 @@ 11 | +a 12 | +b 13 | +c 14 | -------------------------------------------------------------------------------- /internal/diff/testdata/allold.txt: -------------------------------------------------------------------------------- 1 | -- old -- 2 | a 3 | b 4 | c 5 | -- new -- 6 | -- diff -- 7 | diff old new 8 | --- old 9 | +++ new 10 | @@ -1,3 +0,0 @@ 11 | -a 12 | -b 13 | -c 14 | -------------------------------------------------------------------------------- /env/openbsd-386/.gitignore: -------------------------------------------------------------------------------- 1 | auto_install.conf 2 | boot.conf 3 | disk.raw 4 | disklabel.template 5 | etc 6 | install.site 7 | install*.iso 8 | openbsd-*-gce.tar.gz 9 | random.seed 10 | site58.tgz 11 | -------------------------------------------------------------------------------- /env/openbsd-amd64/.gitignore: -------------------------------------------------------------------------------- 1 | auto_install.conf 2 | boot.conf 3 | disk.raw 4 | disklabel.template 5 | etc 6 | install.site 7 | install*.iso 8 | openbsd-*-gce.tar.gz 9 | random.seed 10 | site58.tgz 11 | -------------------------------------------------------------------------------- /vcs-test/dav_svn.conf: -------------------------------------------------------------------------------- 1 | 2 | DAV svn 3 | SVNParentPath /home/vcweb/svn 4 | 5 | Require all denied 6 | 7 | 8 | -------------------------------------------------------------------------------- /env/android-amd64-emu/README.md: -------------------------------------------------------------------------------- 1 | The android-amd64-emu builder is built in two parts: 2 | 3 | * first, a large Docker container 4 | * second, a VMX+konlet-based VM image with that Docker image pre-pulled 5 | 6 | 7 | -------------------------------------------------------------------------------- /env/linux-arm/aws/containerd.service: -------------------------------------------------------------------------------- 1 | # overwrite containerd.service 2 | # /etc/systemd/system/containerd.service.d/override.conf 3 | [Service] 4 | ExecStart= 5 | ExecStart=/usr/bin/setarch linux32 -B /usr/bin/containerd 6 | -------------------------------------------------------------------------------- /env/freebsd-amd64/rc.conf: -------------------------------------------------------------------------------- 1 | hostname="buildlet" 2 | rc_info="YES" 3 | rc_startmsgs="YES" 4 | ifconfig_vtnet0="SYNCDHCP mtu 1460" 5 | sshd_enable="YES" 6 | buildlet_enable="YES" 7 | buildlet_env="PATH=/bin:/sbin:/usr/bin:/usr/local/bin" 8 | -------------------------------------------------------------------------------- /cloudfns/sendwikidiff/go.mod: -------------------------------------------------------------------------------- 1 | module golang.org/x/build/cloudfns/sendwikidiff 2 | 3 | go 1.13 4 | 5 | require ( 6 | github.com/sendgrid/rest v2.4.1+incompatible // indirect 7 | github.com/sendgrid/sendgrid-go v3.4.1+incompatible 8 | ) 9 | -------------------------------------------------------------------------------- /internal/diff/testdata/eof1.txt: -------------------------------------------------------------------------------- 1 | -- old -- 2 | a 3 | b 4 | c 5 | -- new -- 6 | a 7 | b 8 | c^D 9 | -- diff -- 10 | diff old new 11 | --- old 12 | +++ new 13 | @@ -1,3 +1,3 @@ 14 | a 15 | b 16 | -c 17 | +c 18 | \ No newline at end of file 19 | -------------------------------------------------------------------------------- /internal/diff/testdata/eof2.txt: -------------------------------------------------------------------------------- 1 | -- old -- 2 | a 3 | b 4 | c^D 5 | -- new -- 6 | a 7 | b 8 | c 9 | -- diff -- 10 | diff old new 11 | --- old 12 | +++ new 13 | @@ -1,3 +1,3 @@ 14 | a 15 | b 16 | -c 17 | \ No newline at end of file 18 | +c 19 | -------------------------------------------------------------------------------- /internal/relui/testing/test.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2022 The Go Authors. All rights reserved. 3 | * Use of this source code is governed by a BSD-style 4 | * license that can be found in the LICENSE file. 5 | */ 6 | 7 | .Header { font-size: 10rem; } 8 | -------------------------------------------------------------------------------- /env/linux-x86-clang/sources/clang-deps.list: -------------------------------------------------------------------------------- 1 | # The debian sources for stable clang builds, taken from http://apt.llvm.org 2 | deb http://apt.llvm.org/jessie/ llvm-toolchain-jessie-3.9 main 3 | deb-src http://apt.llvm.org/jessie/ llvm-toolchain-jessie-3.9 main 4 | -------------------------------------------------------------------------------- /internal/relui/static/images/chevron_right_black_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cmd/relui/Dockerfile.node: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | FROM node:16.15.1-alpine3.16 6 | 7 | WORKDIR /workspace/cmd/relui 8 | -------------------------------------------------------------------------------- /env/linux-arm-qemu/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2014 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | docker: Dockerfile 6 | docker build -t gobuilders/linux-arm-qemu . 7 | -------------------------------------------------------------------------------- /internal/relui/migrations/20210928195553_create_task_logs_table.down.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2021 The Go Authors. All rights reserved. 2 | -- Use of this source code is governed by a BSD-style 3 | -- license that can be found in the LICENSE file. 4 | 5 | DROP TABLE task_logs; 6 | -------------------------------------------------------------------------------- /internal/relui/migrations/20220609175710_remove_corrupt_workflow.down.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2021 The Go Authors. All rights reserved. 2 | -- Use of this source code is governed by a BSD-style 3 | -- license that can be found in the LICENSE file. 4 | 5 | -- non-reversible migration 6 | -------------------------------------------------------------------------------- /internal/relui/static/images/expand_more_black_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /devapp/README.md: -------------------------------------------------------------------------------- 1 | # devapp 2 | 3 | ## Local development 4 | 5 | ```sh 6 | $ go run . -listen-http=localhost:8080 7 | ``` 8 | 9 | Then visit http://localhost:8080/ in your browser. 10 | 11 | ## Deployment 12 | 13 | See the documentation on [deployment](../doc/deployment.md). 14 | -------------------------------------------------------------------------------- /internal/relui/migrations/20220715183205_add_retry_count.down.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2022 The Go Authors. All rights reserved. 2 | -- Use of this source code is governed by a BSD-style 3 | -- license that can be found in the LICENSE file. 4 | 5 | ALTER TABLE tasks 6 | DROP COLUMN retry_count; -------------------------------------------------------------------------------- /internal/relui/migrations/20220712205734_add_started_to_tasks.down.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2022 The Go Authors. All rights reserved. 2 | -- Use of this source code is governed by a BSD-style 3 | -- license that can be found in the LICENSE file. 4 | 5 | ALTER TABLE tasks 6 | DROP COLUMN started; 7 | -------------------------------------------------------------------------------- /env/openbsd-386/make.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright 2014 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | 6 | set -e 7 | set -u 8 | 9 | ARCH=i386 ../openbsd-amd64/make.bash 10 | -------------------------------------------------------------------------------- /internal/logparser/testdata/9.fail: -------------------------------------------------------------------------------- 1 | Section: "Testing packages." 2 | Pkg: "" 3 | Test: "" 4 | Mode: "" 5 | Snippet: 6 | Test "go_test:encoding/pem" ran over 20m0s limit (20m0.000756227s); saw output: 7 | Output: 8 | Test "go_test:encoding/pem" ran over 20m0s limit (20m0.000756227s); saw output: 9 | -------------------------------------------------------------------------------- /internal/relui/migrations/20210909141405_create_workflows_table.down.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2021 The Go Authors. All rights reserved. 2 | -- Use of this source code is governed by a BSD-style 3 | -- license that can be found in the LICENSE file. 4 | 5 | DROP TABLE task; 6 | 7 | DROP TABLE workflows; 8 | -------------------------------------------------------------------------------- /internal/relui/static/images/error_red_24dp.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /env/linux-ppc64le/osuosl/Makefile: -------------------------------------------------------------------------------- 1 | power8: 2 | ./setup-remote.sh ubuntu@140.211.169.160 host-linux-ppc64le-osu 3 | 4 | power9: 5 | ./setup-remote.sh ubuntu@140.211.169.171 host-linux-ppc64le-power9-osu 6 | 7 | power10: 8 | ./setup-remote.sh ubuntu@go-le-p10-1.osuosl.org host-linux-ppc64le-power10-osu 9 | -------------------------------------------------------------------------------- /gerrit/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/gerrit.svg)](https://pkg.go.dev/golang.org/x/build/gerrit) 4 | 5 | # golang.org/x/build/gerrit 6 | 7 | Package gerrit contains code to interact with Gerrit servers. 8 | -------------------------------------------------------------------------------- /internal/lru/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/internal/lru.svg)](https://pkg.go.dev/golang.org/x/build/internal/lru) 4 | 5 | # golang.org/x/build/internal/lru 6 | 7 | Package lru implements an LRU cache. 8 | -------------------------------------------------------------------------------- /repos/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/repos.svg)](https://pkg.go.dev/golang.org/x/build/repos) 4 | 5 | # golang.org/x/build/repos 6 | 7 | Package repos contains information about Go source repositories. 8 | -------------------------------------------------------------------------------- /cmd/greplogs/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/greplogs.svg)](https://pkg.go.dev/golang.org/x/build/cmd/greplogs) 4 | 5 | # golang.org/x/build/cmd/greplogs 6 | 7 | Command greplogs searches Go builder logs. 8 | -------------------------------------------------------------------------------- /env/freebsd-amd64/loader.conf: -------------------------------------------------------------------------------- 1 | autoboot_delay="-1" 2 | beastie_disable="YES" 3 | loader_logo="none" 4 | hw.memtest.tests="0" 5 | console="comconsole,vidconsole" 6 | hw.vtnet.csum_disable=1 7 | machdep.disable_tsc_calibration=1 8 | kern.timecounter.invariant_tsc=1 9 | aesni_load="YES" 10 | nvme_load="YES" 11 | -------------------------------------------------------------------------------- /internal/access/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package access provides primitives for implementing authentication and 6 | // authorization. 7 | package access 8 | -------------------------------------------------------------------------------- /internal/relui/migrations/20220715183205_add_retry_count.up.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2022 The Go Authors. All rights reserved. 2 | -- Use of this source code is governed by a BSD-style 3 | -- license that can be found in the LICENSE file. 4 | 5 | ALTER TABLE tasks 6 | ADD COLUMN retry_count integer NOT NULL DEFAULT 0; -------------------------------------------------------------------------------- /pargzip/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/pargzip.svg)](https://pkg.go.dev/golang.org/x/build/pargzip) 4 | 5 | # golang.org/x/build/pargzip 6 | 7 | Package pargzip contains a parallel gzip writer implementation. 8 | -------------------------------------------------------------------------------- /tarutil/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/tarutil.svg)](https://pkg.go.dev/golang.org/x/build/tarutil) 4 | 5 | # golang.org/x/build/tarutil 6 | 7 | Package tarutil contains utilities for working with tar archives. 8 | -------------------------------------------------------------------------------- /cmd/upload/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/upload.svg)](https://pkg.go.dev/golang.org/x/build/cmd/upload) 4 | 5 | # golang.org/x/build/cmd/upload 6 | 7 | The upload command writes a file to Google Cloud Storage. 8 | -------------------------------------------------------------------------------- /internal/coordinator/remote/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package remote provides remote access to resources in the build 6 | // infrastructure. 7 | package remote 8 | -------------------------------------------------------------------------------- /internal/relui/migrations/20220712205734_add_started_to_tasks.up.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2022 The Go Authors. All rights reserved. 2 | -- Use of this source code is governed by a BSD-style 3 | -- license that can be found in the LICENSE file. 4 | 5 | ALTER TABLE tasks 6 | ADD COLUMN started bool NOT NULL DEFAULT FALSE; 7 | -------------------------------------------------------------------------------- /internal/relui/sign/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package sign provides implementations for servers which can 6 | // sign Go release artifacts. 7 | package sign 8 | -------------------------------------------------------------------------------- /internal/untar/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/internal/untar.svg)](https://pkg.go.dev/golang.org/x/build/internal/untar) 4 | 5 | # golang.org/x/build/internal/untar 6 | 7 | Package untar untars a tarball to disk. 8 | -------------------------------------------------------------------------------- /types/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/types.svg)](https://pkg.go.dev/golang.org/x/build/types) 4 | 5 | # golang.org/x/build/types 6 | 7 | Package types contains common types used by the Go continuous build system. 8 | -------------------------------------------------------------------------------- /cmd/gomote/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/gomote.svg)](https://pkg.go.dev/golang.org/x/build/cmd/gomote) 4 | 5 | # golang.org/x/build/cmd/gomote 6 | 7 | The gomote command is a client for the Go builder infrastructure. 8 | -------------------------------------------------------------------------------- /kubernetes/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/kubernetes.svg)](https://pkg.go.dev/golang.org/x/build/kubernetes) 4 | 5 | # golang.org/x/build/kubernetes 6 | 7 | Package kubernetes contains a minimal client for the Kubernetes API. 8 | -------------------------------------------------------------------------------- /kubernetes/api/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/kubernetes/api.svg)](https://pkg.go.dev/golang.org/x/build/kubernetes/api) 4 | 5 | # golang.org/x/build/kubernetes/api 6 | 7 | Package api contains the Kubernetes v1 API types. 8 | -------------------------------------------------------------------------------- /internal/relui/migrations/20220901160804_create_schedules.down.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2022 The Go Authors. All rights reserved. 2 | -- Use of this source code is governed by a BSD-style 3 | -- license that can be found in the LICENSE file. 4 | 5 | ALTER TABLE workflows 6 | DROP COLUMN schedule_id; 7 | 8 | DROP TABLE schedules; 9 | -------------------------------------------------------------------------------- /internal/relui/static/images/check_circle_green_24dp.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /maintner/maintq/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/maintner/maintq.svg)](https://pkg.go.dev/golang.org/x/build/maintner/maintq) 4 | 5 | # golang.org/x/build/maintner/maintq 6 | 7 | The maintq command queries a maintnerd gRPC server. 8 | -------------------------------------------------------------------------------- /env/linux-x86-vmx/README.md: -------------------------------------------------------------------------------- 1 | # linux-x86-vmx 2 | 3 | These scripts create a GCE VM image that acts like Container-Optimized 4 | Linux but uses a Debian 11 (Bullseye) kernel + userspace instead. We do 5 | this because Debian 11 includes CONFIG_KVM for nested virtualization, 6 | whereas that's not compiled in for Container-Optimized Linux. 7 | -------------------------------------------------------------------------------- /internal/httpdl/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/internal/httpdl.svg)](https://pkg.go.dev/golang.org/x/build/internal/httpdl) 4 | 5 | # golang.org/x/build/internal/httpdl 6 | 7 | Package httpdl downloads things from HTTP to local disk. 8 | -------------------------------------------------------------------------------- /internal/task/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/internal/task.svg)](https://pkg.go.dev/golang.org/x/build/internal/task) 4 | 5 | # golang.org/x/build/internal/task 6 | 7 | Package task implements tasks involved in making a Go release. 8 | -------------------------------------------------------------------------------- /cmd/buildstats/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/buildstats.svg)](https://pkg.go.dev/golang.org/x/build/cmd/buildstats) 4 | 5 | # golang.org/x/build/cmd/buildstats 6 | 7 | The buildstats command syncs build logs from Datastore to Bigquery. 8 | -------------------------------------------------------------------------------- /internal/diff/testdata/start.txt: -------------------------------------------------------------------------------- 1 | -- old -- 2 | e 3 | pi 4 | 4 5 | 5 6 | 6 7 | 7 8 | 8 9 | 9 10 | 10 11 | -- new -- 12 | 1 13 | 2 14 | 3 15 | 4 16 | 5 17 | 6 18 | 7 19 | 8 20 | 9 21 | 10 22 | -- diff -- 23 | diff old new 24 | --- old 25 | +++ new 26 | @@ -1,5 +1,6 @@ 27 | -e 28 | -pi 29 | +1 30 | +2 31 | +3 32 | 4 33 | 5 34 | 6 35 | -------------------------------------------------------------------------------- /internal/https/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/internal/https.svg)](https://pkg.go.dev/golang.org/x/build/internal/https) 4 | 5 | # golang.org/x/build/internal/https 6 | 7 | Package https contains helpers for starting an HTTP/HTTPS server. 8 | -------------------------------------------------------------------------------- /internal/spanlog/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/internal/spanlog.svg)](https://pkg.go.dev/golang.org/x/build/internal/spanlog) 4 | 5 | # golang.org/x/build/internal/spanlog 6 | 7 | Package spanlog provides span and event logger interfaces. 8 | -------------------------------------------------------------------------------- /maintner/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/maintner.svg)](https://pkg.go.dev/golang.org/x/build/maintner) 4 | 5 | # golang.org/x/build/maintner 6 | 7 | Package maintner mirrors, searches, syncs, and serves Git, Github, and Gerrit metadata. 8 | -------------------------------------------------------------------------------- /maintner/maintpb/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/maintner/maintpb.svg)](https://pkg.go.dev/golang.org/x/build/maintner/maintpb) 4 | 5 | # golang.org/x/build/maintner/maintpb 6 | 7 | Package maintpb is a generated protocol buffer package. 8 | -------------------------------------------------------------------------------- /cmd/greplogs/internal/logparse/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package logparse contains functions for parsing and analyzing build and test 6 | // logs produced by all.bash. 7 | package logparse 8 | -------------------------------------------------------------------------------- /env/linux-ppc64le/osuosl/install-docker.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Just the docker setup, ending at adding our regular user to the docker group. 4 | # The setup.bash script does everything else. 5 | 6 | set -e 7 | sudo apt-get update 8 | sudo apt-get --yes upgrade 9 | sudo apt-get --yes install docker.io 10 | sudo usermod -aG docker $USER 11 | -------------------------------------------------------------------------------- /maintner/maintwatch/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/maintner/maintwatch.svg)](https://pkg.go.dev/golang.org/x/build/maintner/maintwatch) 4 | 5 | # golang.org/x/build/maintner/maintwatch 6 | 7 | The maintwatch commands tails the maintner mutation log. 8 | -------------------------------------------------------------------------------- /cmd/docker2boot/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/docker2boot.svg)](https://pkg.go.dev/golang.org/x/build/cmd/docker2boot) 4 | 5 | # golang.org/x/build/cmd/docker2boot 6 | 7 | The docker2boot command converts a Docker image into a bootable GCE VM image. 8 | -------------------------------------------------------------------------------- /cmd/racebuild/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/racebuild.svg)](https://pkg.go.dev/golang.org/x/build/cmd/racebuild) 4 | 5 | # golang.org/x/build/cmd/racebuild 6 | 7 | racebuild builds the race runtime (syso files) on all supported OSes using gomote. 8 | -------------------------------------------------------------------------------- /internal/envutil/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/internal/envutil.svg)](https://pkg.go.dev/golang.org/x/build/internal/envutil) 4 | 5 | # golang.org/x/build/internal/envutil 6 | 7 | Package envutil provides utilities for working with environment variables. 8 | -------------------------------------------------------------------------------- /cmd/genbootstrap/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/genbootstrap.svg)](https://pkg.go.dev/golang.org/x/build/cmd/genbootstrap) 4 | 5 | # golang.org/x/build/cmd/genbootstrap 6 | 7 | Genbootstrap prepares GOROOT_BOOTSTRAP tarballs suitable for use on builders. 8 | -------------------------------------------------------------------------------- /cmd/greplogs/_embed/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/greplogs/_embed.svg)](https://pkg.go.dev/golang.org/x/build/cmd/greplogs/_embed) 4 | 5 | # golang.org/x/build/cmd/greplogs/_embed 6 | 7 | Command broken lists the current Go builders with known issues. 8 | -------------------------------------------------------------------------------- /env/linux-arm-qemu/buildlet-qemu: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Runs QEMU for buildlet, then halts the host machine. 3 | /usr/bin/qemu-system-arm -M vexpress-a9 -cpu cortex-a9 -nographic -no-reboot -sd /arm/root.img -kernel /arm/vmlinuz -append "root=/dev/mmcblk0 console=ttyAMA0 rw rootwait" -m 1024 -redir tcp:80::80 -redir tcp:443::443 -redir tcp:5936::5936 4 | /sbin/halt 5 | -------------------------------------------------------------------------------- /env/linux-arm/aws/rundockerbuildlet.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Run Buildlets in Docker 3 | After=network.target 4 | 5 | [Install] 6 | WantedBy=network-online.target 7 | 8 | [Service] 9 | Type=simple 10 | RemainAfterExit=true 11 | ExecStart=/usr/local/bin/rundockerbuildlet \ 12 | -env=host-linux-arm-aws \ 13 | -image=gobuilder-arm-aws 14 | -------------------------------------------------------------------------------- /internal/iapclient/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/internal/iapclient.svg)](https://pkg.go.dev/golang.org/x/build/internal/iapclient) 4 | 5 | # golang.org/x/build/internal/iapclient 6 | 7 | Package iapclient enables programmatic access to IAP-secured services. 8 | -------------------------------------------------------------------------------- /autocertcache/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/autocertcache.svg)](https://pkg.go.dev/golang.org/x/build/autocertcache) 4 | 5 | # golang.org/x/build/autocertcache 6 | 7 | Package autocertcache contains autocert.Cache implementations for golang.org/x/crypto/autocert. 8 | -------------------------------------------------------------------------------- /cmd/gomote/rdp.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package main 6 | 7 | import ( 8 | "fmt" 9 | ) 10 | 11 | func rdp(args []string) error { 12 | return fmt.Errorf("unimplemented. See go.dev/issue/53272") 13 | } 14 | -------------------------------------------------------------------------------- /internal/access/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/internal/access.svg)](https://pkg.go.dev/golang.org/x/build/internal/access) 4 | 5 | # golang.org/x/build/internal/access 6 | 7 | Package access provides primitives for implementing authentication and authorization. 8 | -------------------------------------------------------------------------------- /internal/diff/testdata/dups.txt: -------------------------------------------------------------------------------- 1 | -- old -- 2 | a 3 | 4 | b 5 | 6 | c 7 | 8 | d 9 | 10 | e 11 | 12 | f 13 | -- new -- 14 | a 15 | 16 | B 17 | 18 | C 19 | 20 | d 21 | 22 | e 23 | 24 | f 25 | -- diff -- 26 | diff old new 27 | --- old 28 | +++ new 29 | @@ -1,8 +1,8 @@ 30 | a 31 | $ 32 | -b 33 | - 34 | -c 35 | +B 36 | + 37 | +C 38 | $ 39 | d 40 | $ 41 | -------------------------------------------------------------------------------- /livelog/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/livelog.svg)](https://pkg.go.dev/golang.org/x/build/livelog) 4 | 5 | # golang.org/x/build/livelog 6 | 7 | Package livelog provides a buffer that can be simultaneously written to by one writer and read from by many readers. 8 | -------------------------------------------------------------------------------- /cmd/relui/.stylelintrc.yaml: -------------------------------------------------------------------------------- 1 | extends: 2 | - stylelint-config-standard 3 | - stylelint-prettier/recommended 4 | plugins: 5 | - stylelint-order 6 | rules: 7 | color-hex-case: lower 8 | order/properties-alphabetical-order: true 9 | unit-disallowed-list: 10 | - 'px' 11 | selector-class-pattern: '^[a-zA-Z\-]+$' 12 | rule-empty-line-before: never 13 | -------------------------------------------------------------------------------- /internal/buildgo/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/internal/buildgo.svg)](https://pkg.go.dev/golang.org/x/build/internal/buildgo) 4 | 5 | # golang.org/x/build/internal/buildgo 6 | 7 | Package buildgo provides tools for pushing and building the Go distribution on buildlets. 8 | -------------------------------------------------------------------------------- /internal/foreach/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/internal/foreach.svg)](https://pkg.go.dev/golang.org/x/build/internal/foreach) 4 | 5 | # golang.org/x/build/internal/foreach 6 | 7 | Package foreach provides allocation-conscious helpers for iterating over lines of text. 8 | -------------------------------------------------------------------------------- /internal/sourcecache/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/internal/sourcecache.svg)](https://pkg.go.dev/golang.org/x/build/internal/sourcecache) 4 | 5 | # golang.org/x/build/internal/sourcecache 6 | 7 | Package sourcecache provides a cache of code found in Git repositories. 8 | -------------------------------------------------------------------------------- /maintner/reclog/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/maintner/reclog.svg)](https://pkg.go.dev/golang.org/x/build/maintner/reclog) 4 | 5 | # golang.org/x/build/maintner/reclog 6 | 7 | Package reclog contains readers and writers for a record wrapper format used by maintner. 8 | -------------------------------------------------------------------------------- /cmd/debugnewvm/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/debugnewvm.svg)](https://pkg.go.dev/golang.org/x/build/cmd/debugnewvm) 4 | 5 | # golang.org/x/build/cmd/debugnewvm 6 | 7 | The debugnewvm command creates and destroys a VM-based buildlet with lots of logging for debugging. 8 | -------------------------------------------------------------------------------- /cmd/relnote/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/relnote.svg)](https://pkg.go.dev/golang.org/x/build/cmd/relnote) 4 | 5 | # golang.org/x/build/cmd/relnote 6 | 7 | The relnote command summarizes the Go changes in Gerrit marked with RELNOTE annotations for the release notes. 8 | -------------------------------------------------------------------------------- /internal/secret/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/internal/secret.svg)](https://pkg.go.dev/golang.org/x/build/internal/secret) 4 | 5 | # golang.org/x/build/internal/secret 6 | 7 | Package secret provides a client interface for interacting with the GCP Secret Management service. 8 | -------------------------------------------------------------------------------- /env/windows-arm64/azure/windows-arm64-stage0-loop.bat: -------------------------------------------------------------------------------- 1 | 2 | rem This simple script loops forever, invoking the stage0 buildlet. 3 | rem When stage0 runs, it will download a new copy of the main 4 | rem buildlet and execute it. 5 | 6 | :loop 7 | 8 | @echo Invoking bootstrap.exe at %date% %time% on %computername% 9 | 10 | C:\golang\bootstrap.exe 11 | 12 | goto loop 13 | 14 | -------------------------------------------------------------------------------- /internal/gomote/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/internal/gomote.svg)](https://pkg.go.dev/golang.org/x/build/internal/gomote) 4 | 5 | # golang.org/x/build/internal/gomote 6 | 7 | Package gomote contains all of the necessary components to implement and use the gomote functionality. 8 | -------------------------------------------------------------------------------- /internal/singleflight/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/internal/singleflight.svg)](https://pkg.go.dev/golang.org/x/build/internal/singleflight) 4 | 5 | # golang.org/x/build/internal/singleflight 6 | 7 | Package singleflight provides a duplicate function call suppression mechanism. 8 | -------------------------------------------------------------------------------- /internal/task/releaselet/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/internal/task/releaselet.svg)](https://pkg.go.dev/golang.org/x/build/internal/task/releaselet) 4 | 5 | # golang.org/x/build/internal/task/releaselet 6 | 7 | Command releaselet does buildlet-side release construction tasks. 8 | -------------------------------------------------------------------------------- /cmd/releaseschedule/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/releaseschedule.svg)](https://pkg.go.dev/golang.org/x/build/cmd/releaseschedule) 4 | 5 | # golang.org/x/build/cmd/releaseschedule 6 | 7 | Releaseschedule generates the release schedule diagram used on the release schedule wiki. 8 | -------------------------------------------------------------------------------- /internal/metrics/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/internal/metrics.svg)](https://pkg.go.dev/golang.org/x/build/internal/metrics) 4 | 5 | # golang.org/x/build/internal/metrics 6 | 7 | Package metrics provides a service for reporting metrics to Stackdriver, or locally during development. 8 | -------------------------------------------------------------------------------- /internal/relui/migrations/20211005180646_update_workflows_add_finished.down.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2021 The Go Authors. All rights reserved. 2 | -- Use of this source code is governed by a BSD-style 3 | -- license that can be found in the LICENSE file. 4 | 5 | BEGIN; 6 | 7 | ALTER TABLE workflows DROP COLUMN finished; 8 | ALTER TABLE workflows DROP COLUMN output; 9 | 10 | COMMIT; 11 | -------------------------------------------------------------------------------- /third_party/bandchart/fs.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package bandchart provides an embedded bandchart.js. 6 | package bandchart 7 | 8 | import ( 9 | "embed" 10 | ) 11 | 12 | //go:embed bandchart.js 13 | var FS embed.FS 14 | -------------------------------------------------------------------------------- /cmd/genbuilderkey/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/genbuilderkey.svg)](https://pkg.go.dev/golang.org/x/build/cmd/genbuilderkey) 4 | 5 | # golang.org/x/build/cmd/genbuilderkey 6 | 7 | The genbuilderkey binary generates a builder key or gomote user key from the build system's master key. 8 | -------------------------------------------------------------------------------- /cmd/pubsubhelper/pubsubtypes/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/pubsubhelper/pubsubtypes.svg)](https://pkg.go.dev/golang.org/x/build/cmd/pubsubhelper/pubsubtypes) 4 | 5 | # golang.org/x/build/cmd/pubsubhelper/pubsubtypes 6 | 7 | Package pubsubtypes contains types published by pubsubhelper. 8 | -------------------------------------------------------------------------------- /cmd/retrybuilds/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/retrybuilds.svg)](https://pkg.go.dev/golang.org/x/build/cmd/retrybuilds) 4 | 5 | # golang.org/x/build/cmd/retrybuilds 6 | 7 | The retrybuilds command clears build failures from the build.golang.org dashboard to force them to be rebuilt. 8 | -------------------------------------------------------------------------------- /env/darwin/aws/bootptab: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | %% 5 | # hostname hwtype hwaddr ipaddr bootfile 6 | builder-guest-1 1 52:54:00:c9:18:01 192.168.64.101 7 | builder-guest-2 1 52:54:00:c9:18:02 192.168.64.102 8 | -------------------------------------------------------------------------------- /internal/buildstats/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/internal/buildstats.svg)](https://pkg.go.dev/golang.org/x/build/internal/buildstats) 4 | 5 | # golang.org/x/build/internal/buildstats 6 | 7 | Package buildstats contains code to sync the coordinator's build logs from Datastore to BigQuery. 8 | -------------------------------------------------------------------------------- /internal/gitauth/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/internal/gitauth.svg)](https://pkg.go.dev/golang.org/x/build/internal/gitauth) 4 | 5 | # golang.org/x/build/internal/gitauth 6 | 7 | Package gitauth writes gitcookies files so git will authenticate to Gerrit as gopherbot for quota purposes. 8 | -------------------------------------------------------------------------------- /internal/relui/templates/scheduled_workflow_failure_email.txt: -------------------------------------------------------------------------------- 1 | {{- /*gotype: golang.org/x/build/internal/relui.scheduledFailureEmailBody*/ -}} 2 | The scheduled workflow "{{.Workflow.Name.String}}" ({{.Workflow.ID.String}}) failed at {{.Workflow.UpdatedAt.UTC.Format "2006/01/02 15:04 MST"}}. 3 | 4 | See the following page for details: 5 | 6 | {{baseLink "/workflows/" .Workflow.ID.String}} 7 | -------------------------------------------------------------------------------- /repos/repos_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package repos 6 | 7 | import "testing" 8 | 9 | func TestInitDoesNotPanic(t *testing.T) { 10 | // Verify that repos.go's init funcs don't panic when 11 | // validating the repos. 12 | } 13 | -------------------------------------------------------------------------------- /cmd/fetchlogs/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/fetchlogs.svg)](https://pkg.go.dev/golang.org/x/build/cmd/fetchlogs) 4 | 5 | # golang.org/x/build/cmd/fetchlogs 6 | 7 | Fetchlogs downloads build failure logs from the Go dashboard so they can be accessed and searched from the local file system. 8 | -------------------------------------------------------------------------------- /internal/datastore/fake/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/internal/datastore/fake.svg)](https://pkg.go.dev/golang.org/x/build/internal/datastore/fake) 4 | 5 | # golang.org/x/build/internal/datastore/fake 6 | 7 | Package fake provides a fake implementation of a Datastore client to use in testing. 8 | -------------------------------------------------------------------------------- /internal/diff/testdata/end.txt: -------------------------------------------------------------------------------- 1 | -- old -- 2 | 1 3 | 2 4 | 3 5 | 4 6 | 5 7 | 6 8 | 7 9 | eight 10 | nine 11 | ten 12 | eleven 13 | -- new -- 14 | 1 15 | 2 16 | 3 17 | 4 18 | 5 19 | 6 20 | 7 21 | 8 22 | 9 23 | 10 24 | -- diff -- 25 | diff old new 26 | --- old 27 | +++ new 28 | @@ -5,7 +5,6 @@ 29 | 5 30 | 6 31 | 7 32 | -eight 33 | -nine 34 | -ten 35 | -eleven 36 | +8 37 | +9 38 | +10 39 | -------------------------------------------------------------------------------- /internal/relui/migrations/20220622151222_add_ready_for_approval_to_tasks.down.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2022 The Go Authors. All rights reserved. 2 | -- Use of this source code is governed by a BSD-style 3 | -- license that can be found in the LICENSE file. 4 | 5 | -- Back-filling the name prefix would break workflows, as names are 6 | -- significant. 7 | ALTER TABLE tasks DROP COLUMN ready_for_approval; 8 | -------------------------------------------------------------------------------- /maintner/maintnerd/maintapi/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/maintner/maintnerd/maintapi.svg)](https://pkg.go.dev/golang.org/x/build/maintner/maintnerd/maintapi) 4 | 5 | # golang.org/x/build/maintner/maintnerd/maintapi 6 | 7 | Package maintapi exposes a gRPC maintner service for a given corpus. 8 | -------------------------------------------------------------------------------- /internal/gophers/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/internal/gophers.svg)](https://pkg.go.dev/golang.org/x/build/internal/gophers) 4 | 5 | # golang.org/x/build/internal/gophers 6 | 7 | Package gophers is a list of names, emails, and GitHub usernames of people from the Go git repos and issue trackers. 8 | -------------------------------------------------------------------------------- /internal/loghash/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/internal/loghash.svg)](https://pkg.go.dev/golang.org/x/build/internal/loghash) 4 | 5 | # golang.org/x/build/internal/loghash 6 | 7 | Package loghash provides the shared information for computing a log hash (as in https://build.golang.org/log/HASH). 8 | -------------------------------------------------------------------------------- /internal/coordinator/remote/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/internal/coordinator/remote.svg)](https://pkg.go.dev/golang.org/x/build/internal/coordinator/remote) 4 | 5 | # golang.org/x/build/internal/coordinator/remote 6 | 7 | Package remote provides remote access to resources in the build infrastructure. 8 | -------------------------------------------------------------------------------- /cmd/pubsubhelper/README.md: -------------------------------------------------------------------------------- 1 | # golang.org/x/build/cmd/pubsubhelper 2 | 3 | ## Running with Docker locally 4 | 5 | ```sh 6 | docker run --rm -it \ 7 | -p 80:80 \ 8 | -p 25:25 \ 9 | -p 443:443 \ 10 | gcr.io/go-dashboard-dev/pubsubhelper:latest [any additional pubsubhelper flags] 11 | ``` 12 | 13 | ## Deployment 14 | 15 | See the documentation on [deployment](../../doc/deployment.md). 16 | -------------------------------------------------------------------------------- /cmd/xb/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/xb.svg)](https://pkg.go.dev/golang.org/x/build/cmd/xb) 4 | 5 | # golang.org/x/build/cmd/xb 6 | 7 | The xb command wraps GCP deployment commands such as gcloud, kubectl, and docker push and verifies they're interacting with the intended prod-vs-staging environment. 8 | -------------------------------------------------------------------------------- /internal/gomote/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package gomote contains all of the necessary components to implement 6 | // and use the gomote functionality. Gomotes are instances which are dedicated 7 | // to an individual user or service. 8 | package gomote 9 | -------------------------------------------------------------------------------- /kubernetes/gke/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/kubernetes/gke.svg)](https://pkg.go.dev/golang.org/x/build/kubernetes/gke) 4 | 5 | # golang.org/x/build/kubernetes/gke 6 | 7 | Package gke contains code for interacting with Google Container Engine (GKE), the hosted version of Kubernetes on Google Cloud Platform. 8 | -------------------------------------------------------------------------------- /maintner/cmd/maintserve/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/maintner/cmd/maintserve.svg)](https://pkg.go.dev/golang.org/x/build/maintner/cmd/maintserve) 4 | 5 | # golang.org/x/build/maintner/cmd/maintserve 6 | 7 | maintserve is a program that serves Go issues and CLs over HTTP, so they can be viewed in a browser. 8 | -------------------------------------------------------------------------------- /cmd/rundockerbuildlet/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/rundockerbuildlet.svg)](https://pkg.go.dev/golang.org/x/build/cmd/rundockerbuildlet) 4 | 5 | # golang.org/x/build/cmd/rundockerbuildlet 6 | 7 | The rundockerbuildlet command loops forever and creates and cleans up Docker containers running reverse buildlets. 8 | -------------------------------------------------------------------------------- /internal/workflow/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/internal/workflow.svg)](https://pkg.go.dev/golang.org/x/build/internal/workflow) 4 | 5 | # golang.org/x/build/internal/workflow 6 | 7 | Package workflow declaratively defines computation graphs that support automatic parallelization, persistence, and monitoring. 8 | -------------------------------------------------------------------------------- /cmd/gitmirror/service.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | apiVersion: v1 6 | kind: Service 7 | metadata: 8 | name: gitmirror 9 | namespace: prod 10 | spec: 11 | ports: 12 | - port: 8585 13 | targetPort: 8585 14 | selector: 15 | app: gitmirror-serving 16 | -------------------------------------------------------------------------------- /maintner/maintnerd/gcslog/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/maintner/maintnerd/gcslog.svg)](https://pkg.go.dev/golang.org/x/build/maintner/maintnerd/gcslog) 4 | 5 | # golang.org/x/build/maintner/maintnerd/gcslog 6 | 7 | Package gcslog is an implementation of maintner.MutationSource and Logger for Google Cloud Storage. 8 | -------------------------------------------------------------------------------- /cmd/buildlet/stage0/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/buildlet/stage0.svg)](https://pkg.go.dev/golang.org/x/build/cmd/buildlet/stage0) 4 | 5 | # golang.org/x/build/cmd/buildlet/stage0 6 | 7 | The stage0 command looks up the buildlet's URL from its environment (GCE metadata service, EC2, etc), downloads it, and runs it. 8 | -------------------------------------------------------------------------------- /cmd/updatestd/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/updatestd.svg)](https://pkg.go.dev/golang.org/x/build/cmd/updatestd) 4 | 5 | # golang.org/x/build/cmd/updatestd 6 | 7 | updatestd is an experimental program that has been used to update the standard library modules as part of golang.org/issue/36905 in CL 255860 and CL 266898. 8 | -------------------------------------------------------------------------------- /cmd/perfrun/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/perfrun.svg)](https://pkg.go.dev/golang.org/x/build/cmd/perfrun) 4 | 5 | # golang.org/x/build/cmd/perfrun 6 | 7 | perfrun interacts with the buildlet coordinator to run the go1 benchmarks on a buildlet follower for the most recent successful commits according to the build dashboard. 8 | -------------------------------------------------------------------------------- /cloudfns/sendwikidiff/go.sum: -------------------------------------------------------------------------------- 1 | github.com/sendgrid/rest v2.4.1+incompatible h1:HDib/5xzQREPq34lN3YMhQtMkdXxS/qLp5G3k9a5++4= 2 | github.com/sendgrid/rest v2.4.1+incompatible/go.mod h1:kXX7q3jZtJXK5c5qK83bSGMdV6tsOE70KbHoqJls4lE= 3 | github.com/sendgrid/sendgrid-go v3.4.1+incompatible h1:jkXet0CDmdaMZctaF5qELIAFM7eeUx1nh3kMvLejAXk= 4 | github.com/sendgrid/sendgrid-go v3.4.1+incompatible/go.mod h1:QRQt+LX/NmgVEvmdRw0VT/QgUn499+iza2FnDca9fg8= 5 | -------------------------------------------------------------------------------- /cmd/greplogs/internal/logparse/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/greplogs/internal/logparse.svg)](https://pkg.go.dev/golang.org/x/build/cmd/greplogs/internal/logparse) 4 | 5 | # golang.org/x/build/cmd/greplogs/internal/logparse 6 | 7 | Package logparse contains functions for parsing and analyzing build and test logs produced by all.bash. 8 | -------------------------------------------------------------------------------- /maintner/maintnerd/maintapi/version/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/maintner/maintnerd/maintapi/version.svg)](https://pkg.go.dev/golang.org/x/build/maintner/maintnerd/maintapi/version) 4 | 5 | # golang.org/x/build/maintner/maintnerd/maintapi/version 6 | 7 | Package version implements logic to parse version of Go tags and release branches. 8 | -------------------------------------------------------------------------------- /cmd/buildlet/testssh/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/buildlet/testssh.svg)](https://pkg.go.dev/golang.org/x/build/cmd/buildlet/testssh) 4 | 5 | # golang.org/x/build/cmd/buildlet/testssh 6 | 7 | The testssh binary exists to verify that a buildlet container's ssh works, without running the whole coordinator binary in the staging environment. 8 | -------------------------------------------------------------------------------- /cmd/coordinator/internal/dashboard/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/coordinator/internal/dashboard.svg)](https://pkg.go.dev/golang.org/x/build/cmd/coordinator/internal/dashboard) 4 | 5 | # golang.org/x/build/cmd/coordinator/internal/dashboard 6 | 7 | Package dashboard contains the implementation of the build dashboard for the Coordinator. 8 | -------------------------------------------------------------------------------- /internal/task/testdata/pre-announce-minor-solo.txt: -------------------------------------------------------------------------------- 1 | Hello gophers, 2 | 3 | We plan to issue Go 1.18.4 during US business hours on Tuesday, July 12. 4 | 5 | This minor release includes PRIVATE security fixes to the toolchain, covering the following CVEs: 6 | 7 | - cve-1234 8 | 9 | - cve-5678 10 | 11 | Following our security policy, this is the pre-announcement of the release. 12 | 13 | Thanks, 14 | Alice and Bob for the Go team 15 | -------------------------------------------------------------------------------- /vcs-test/vcweb/deathclock_go121_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.22 6 | 7 | package main_test 8 | 9 | func init() { 10 | // When development begins for the Go 1.22 cycle, the supported Go 11 | // releases will be Go 1.20 and 1.21. 12 | go119Unsupported = true 13 | } 14 | -------------------------------------------------------------------------------- /internal/relui/migrations/20220622151222_add_ready_for_approval_to_tasks.up.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2022 The Go Authors. All rights reserved. 2 | -- Use of this source code is governed by a BSD-style 3 | -- license that can be found in the LICENSE file. 4 | 5 | ALTER TABLE tasks 6 | ADD COLUMN ready_for_approval bool NOT NULL DEFAULT FALSE; 7 | 8 | UPDATE tasks 9 | SET ready_for_approval = TRUE 10 | WHERE SUBSTRING(name FROM '^APPROVE-') != ''; 11 | -------------------------------------------------------------------------------- /internal/task/testdata/pre-announce-minor.txt: -------------------------------------------------------------------------------- 1 | Hello gophers, 2 | 3 | We plan to issue Go 1.18.4 and Go 1.17.12 during US business hours on Tuesday, July 12. 4 | 5 | These minor releases include PRIVATE security fixes to the standard library, covering the following CVEs: 6 | 7 | - cve-1234 8 | 9 | - cve-5678 10 | 11 | Following our security policy, this is the pre-announcement of those releases. 12 | 13 | Thanks, 14 | Alice for the Go team 15 | -------------------------------------------------------------------------------- /maintner/internal/robustio/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/maintner/internal/robustio.svg)](https://pkg.go.dev/golang.org/x/build/maintner/internal/robustio) 4 | 5 | # golang.org/x/build/maintner/internal/robustio 6 | 7 | Package robustio wraps I/O functions that are prone to failure on Windows, transparently retrying errors up to an arbitrary timeout. 8 | -------------------------------------------------------------------------------- /devapp/gzip.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package main 6 | 7 | import ( 8 | "io" 9 | "net/http" 10 | ) 11 | 12 | type gzipResponseWriter struct { 13 | http.ResponseWriter 14 | io.Writer 15 | } 16 | 17 | func (w *gzipResponseWriter) Write(b []byte) (int, error) { 18 | return w.Writer.Write(b) 19 | } 20 | -------------------------------------------------------------------------------- /internal/diff/testdata/basic.txt: -------------------------------------------------------------------------------- 1 | Example from Hunt and McIlroy, “An Algorithm for Differential File Comparison.” 2 | https://www.cs.dartmouth.edu/~doug/diff.pdf 3 | 4 | -- old -- 5 | a 6 | b 7 | c 8 | d 9 | e 10 | f 11 | g 12 | -- new -- 13 | w 14 | a 15 | b 16 | x 17 | y 18 | z 19 | e 20 | -- diff -- 21 | diff old new 22 | --- old 23 | +++ new 24 | @@ -1,7 +1,7 @@ 25 | +w 26 | a 27 | b 28 | -c 29 | -d 30 | +x 31 | +y 32 | +z 33 | e 34 | -f 35 | -g 36 | -------------------------------------------------------------------------------- /vcs-test/vcweb/bzr.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux 6 | // +build linux 7 | 8 | package main 9 | 10 | import ( 11 | "net/http" 12 | "path/filepath" 13 | ) 14 | 15 | func bzrHandler() http.Handler { 16 | return http.StripPrefix("/bzr/", http.FileServer(http.Dir(filepath.Join(*dir, "bzr")))) 17 | } 18 | -------------------------------------------------------------------------------- /cmd/coordinator/internal/legacydash/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/coordinator/internal/legacydash.svg)](https://pkg.go.dev/golang.org/x/build/cmd/coordinator/internal/legacydash) 4 | 5 | # golang.org/x/build/cmd/coordinator/internal/legacydash 6 | 7 | Package legacydash holds the serving code for the build dashboard (build.golang.org) and its remaining HTTP API endpoints. 8 | -------------------------------------------------------------------------------- /internal/task/testdata/pre-announce-minor-solo.html: -------------------------------------------------------------------------------- 1 |

Hello gophers,

2 |

We plan to issue Go 1.18.4 during US business hours on Tuesday, July 12.

3 |

This minor release includes PRIVATE security fixes to the toolchain, covering the following CVEs:

4 | 8 |

Following our security policy, this is the pre-announcement of the release.

9 |

Thanks,
10 | Alice and Bob for the Go team

11 | -------------------------------------------------------------------------------- /maintner/godata/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/maintner/godata.svg)](https://pkg.go.dev/golang.org/x/build/maintner/godata) 4 | 5 | # golang.org/x/build/maintner/godata 6 | 7 | Package godata loads the Go project's corpus of Git, Github, and Gerrit activity into memory to allow easy analysis without worrying about APIs and their pagination, quotas, and other nuisances and limitations. 8 | -------------------------------------------------------------------------------- /internal/task/testdata/pre-announce-minor.html: -------------------------------------------------------------------------------- 1 |

Hello gophers,

2 |

We plan to issue Go 1.18.4 and Go 1.17.12 during US business hours on Tuesday, July 12.

3 |

These minor releases include PRIVATE security fixes to the standard library, covering the following CVEs:

4 | 8 |

Following our security policy, this is the pre-announcement of those releases.

9 |

Thanks,
10 | Alice for the Go team

11 | -------------------------------------------------------------------------------- /perfdata/db/export_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package db 6 | 7 | import ( 8 | "database/sql" 9 | "time" 10 | ) 11 | 12 | func DBSQL(db *DB) *sql.DB { 13 | return db.sql 14 | } 15 | 16 | func SetNow(t time.Time) { 17 | if t.IsZero() { 18 | now = time.Now 19 | return 20 | } 21 | now = func() time.Time { return t } 22 | } 23 | -------------------------------------------------------------------------------- /cmd/relui/Dockerfile.test: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | FROM golang:1.18 AS build 6 | 7 | COPY go.mod /app/go.mod 8 | COPY go.sum /app/go.sum 9 | 10 | WORKDIR /app 11 | 12 | RUN go mod download 13 | 14 | COPY . /app 15 | 16 | RUN go build golang.org/x/build/cmd/relui 17 | 18 | ENTRYPOINT go test -v ./cmd/relui/... ./internal/relui/... ./internal/workflow/... 19 | -------------------------------------------------------------------------------- /cmd/runqemubuildlet/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/runqemubuildlet.svg)](https://pkg.go.dev/golang.org/x/build/cmd/runqemubuildlet) 4 | 5 | # golang.org/x/build/cmd/runqemubuildlet 6 | 7 | Binary runqemubuildlet runs a single VM-based buildlet in a loop. 8 | 9 | 10 | ## Windows/ARM on Darwin/ARM 11 | 12 | See image packaging notes at: x/build/env/windows-arm64/README.md 13 | -------------------------------------------------------------------------------- /maintner/maintnerd/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/maintner/maintnerd.svg)](https://pkg.go.dev/golang.org/x/build/maintner/maintnerd) 4 | 5 | # golang.org/x/build/maintner/maintnerd 6 | 7 | The maintnerd command serves project maintainer data from Git, Github, and/or Gerrit. 8 | 9 | 10 | ## Deployment 11 | 12 | See the documentation on [deployment](../../doc/deployment.md). 13 | -------------------------------------------------------------------------------- /perfdata/db/dbtest/nocloud.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !cloud && !plan9 6 | // +build !cloud,!plan9 7 | 8 | package dbtest 9 | 10 | import ( 11 | "testing" 12 | ) 13 | 14 | // createEmptyDB makes a new, empty database for the test. 15 | func createEmptyDB(t *testing.T) (driver, dsn string, cleanup func()) { 16 | return "sqlite3", ":memory:", nil 17 | } 18 | -------------------------------------------------------------------------------- /cmd/gerritbot/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/gerritbot.svg)](https://pkg.go.dev/golang.org/x/build/cmd/gerritbot) 4 | 5 | # golang.org/x/build/cmd/gerritbot 6 | 7 | The gerritbot binary converts GitHub Pull Requests to Gerrit Changes, updating the PR and Gerrit Change as appropriate. 8 | 9 | 10 | ## Deployment 11 | 12 | See the documentation on [deployment](../../doc/deployment.md). 13 | -------------------------------------------------------------------------------- /cmd/gitmirror/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/gitmirror.svg)](https://pkg.go.dev/golang.org/x/build/cmd/gitmirror) 4 | 5 | # golang.org/x/build/cmd/gitmirror 6 | 7 | The gitmirror binary watches the specified Gerrit repositories for new commits and syncs them to mirror repositories. 8 | 9 | 10 | ## Deployment 11 | 12 | See the documentation on [deployment](../../doc/deployment.md). 13 | -------------------------------------------------------------------------------- /devapp/service-staging.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | apiVersion: v1 6 | kind: Service 7 | metadata: 8 | name: devapp 9 | spec: 10 | ports: 11 | - port: 80 12 | targetPort: 80 13 | name: http 14 | - port: 443 15 | targetPort: 443 16 | name: https 17 | selector: 18 | app: devapp 19 | type: LoadBalancer 20 | loadBalancerIP: 104.198.248.179 21 | -------------------------------------------------------------------------------- /env/wasip1-wasm-wazero/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2023 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | ARG REPO 6 | 7 | FROM golang:latest as builder 8 | LABEL maintainer="golang-dev@googlegroups.com" 9 | 10 | RUN go install github.com/tetratelabs/wazero/cmd/wazero@v1.0.1 11 | 12 | FROM ${REPO}/linux-x86-sid:20221109 13 | 14 | COPY --from=builder /go/bin/wazero /usr/local/bin/wazero 15 | 16 | CMD ["/usr/local/bin/stage0"] 17 | -------------------------------------------------------------------------------- /revdial/v2/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/revdial/v2.svg)](https://pkg.go.dev/golang.org/x/build/revdial/v2) 4 | 5 | # golang.org/x/build/revdial/v2 6 | 7 | Package revdial implements a Dialer and Listener which work together to turn an accepted connection (for instance, a Hijacked HTTP request) into a Dialer which can then create net.Conns connecting back to the original dialer, which then gets a net.Listener accepting those conns. 8 | -------------------------------------------------------------------------------- /cmd/buildlet/README: -------------------------------------------------------------------------------- 1 | Local development notes: 2 | 3 | Server: (TLS stuff is optional) 4 | $ go run $GOROOT/src/crypto/tls/generate_cert.go --host=example.com 5 | $ GCEMETA_password=foo GCEMETA_tls_cert=@cert.pem GCEMETA_tls_key='@key.pem' ./buildlet 6 | 7 | Client: 8 | $ curl -O https://go.googlesource.com/go/+archive/3b76b017cabb.tar.gz 9 | $ curl -k --user :foo -X PUT --data-binary "@go-3b76b017cabb.tar.gz" https://localhost:5936/writetgz 10 | $ curl -k --user :foo -d "cmd=src/make.bash" http://127.0.0.1:5937/exec 11 | etc 12 | 13 | -------------------------------------------------------------------------------- /cmd/coordinator/protos/protos.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | package protos 5 | 6 | // Run "go generate" in this directory to update. You need to have: 7 | // 8 | // - a protoc binary (see https://github.com/golang/protobuf#installation) 9 | // - go get -u github.com/golang/protobuf/protoc-gen-go 10 | 11 | //go:generate protoc --proto_path=$GOPATH/src:. --go_out=plugins=grpc:. coordinator.proto 12 | -------------------------------------------------------------------------------- /env/corellium/README.md: -------------------------------------------------------------------------------- 1 | Builders running on the [Corellium](https://corellium.com/) 2 | infrastructure. 3 | 4 | The ios and android directories contain scripts and supporting files 5 | for setting up a newly created virtual device. 6 | 7 | The current builders run on the https://go.enterprise.corellium.com account, 8 | kindly provided by [Zenly](https://zen.ly/). Contact: steeve@zen.ly. 9 | 10 | New devices are set up through the Corellium 11 | [dashboard](https://go.corellium.com). Stuck devices are reset through 12 | the dashboard as well. 13 | -------------------------------------------------------------------------------- /app/appengine/index.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | indexes: 6 | 7 | - kind: Commit 8 | ancestor: yes 9 | properties: 10 | - name: Num 11 | direction: desc 12 | 13 | - kind: Commit 14 | ancestor: yes 15 | properties: 16 | - name: Branch 17 | - name: Num 18 | direction: desc 19 | 20 | - kind: Commit 21 | ancestor: yes 22 | properties: 23 | - name: Time 24 | direction: desc 25 | -------------------------------------------------------------------------------- /env/darwin/aws/start-mutable.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright 2022 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | 6 | # Start macOS VM from installed disk image. Changes written back to disk image. 7 | 8 | if [[ $# != 2 ]]; then 9 | echo "Usage: $0 " 10 | exit 1 11 | fi 12 | 13 | DISK=$1 14 | OSK=$2 15 | PORT=1 16 | 17 | args=( 18 | "$DISK" 19 | "$OSK" 20 | "$PORT" 21 | ) 22 | 23 | $HOME/qemu.sh "${args[@]}" 24 | -------------------------------------------------------------------------------- /env/linux-ppc64le/osuosl/p10.patch: -------------------------------------------------------------------------------- 1 | diff --git a/src/internal/buildcfg/cfg.go b/src/internal/buildcfg/cfg.go 2 | index 1cc3d3d..e8553e8 100644 3 | --- a/src/internal/buildcfg/cfg.go 4 | +++ b/src/internal/buildcfg/cfg.go 5 | @@ -110,8 +110,10 @@ 6 | return 8 7 | case "power9": 8 | return 9 9 | + case "power10": 10 | + return 10 11 | } 12 | - Error = fmt.Errorf("invalid GOPPC64: must be power8, power9") 13 | + Error = fmt.Errorf("invalid GOPPC64: must be power8, power9, power10") 14 | return int(defaultGOPPC64[len("power")] - '0') 15 | } 16 | 17 | -------------------------------------------------------------------------------- /gerrit/example_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package gerrit_test 6 | 7 | import ( 8 | "context" 9 | "fmt" 10 | 11 | "golang.org/x/build/gerrit" 12 | ) 13 | 14 | func Example() { 15 | c := gerrit.NewClient("https://go-review.googlesource.com", gerrit.NoAuth) 16 | info, err := c.GetProjectInfo(context.TODO(), "go") 17 | if err != nil { 18 | panic(err) 19 | } 20 | fmt.Println(info.Description) 21 | } 22 | -------------------------------------------------------------------------------- /internal/relui/migrations/20220609175710_remove_corrupt_workflow.up.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2021 The Go Authors. All rights reserved. 2 | -- Use of this source code is governed by a BSD-style 3 | -- license that can be found in the LICENSE file. 4 | 5 | BEGIN; 6 | 7 | DELETE 8 | FROM task_logs 9 | WHERE workflow_id = 'e7cb64ec-91b1-47fa-b962-2b2f034c458c'; 10 | 11 | DELETE 12 | FROM tasks 13 | WHERE workflow_id = 'e7cb64ec-91b1-47fa-b962-2b2f034c458c'; 14 | 15 | DELETE 16 | FROM workflows 17 | WHERE id = 'e7cb64ec-91b1-47fa-b962-2b2f034c458c'; 18 | 19 | COMMIT; 20 | -------------------------------------------------------------------------------- /internal/diff/testdata/triv.txt: -------------------------------------------------------------------------------- 1 | Another example from Hunt and McIlroy, 2 | “An Algorithm for Differential File Comparison.” 3 | https://www.cs.dartmouth.edu/~doug/diff.pdf 4 | 5 | Anchored diff gives up on finding anything, 6 | since there are no unique lines. 7 | 8 | -- old -- 9 | a 10 | b 11 | c 12 | a 13 | b 14 | b 15 | a 16 | -- new -- 17 | c 18 | a 19 | b 20 | a 21 | b 22 | c 23 | -- diff -- 24 | diff old new 25 | --- old 26 | +++ new 27 | @@ -1,7 +1,6 @@ 28 | -a 29 | -b 30 | -c 31 | -a 32 | -b 33 | -b 34 | -a 35 | +c 36 | +a 37 | +b 38 | +a 39 | +b 40 | +c 41 | -------------------------------------------------------------------------------- /env/linux-ppc64le/osuosl/rundockerbuildlet.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Run Buildlets in Docker 3 | After=network.target 4 | 5 | [Install] 6 | WantedBy=network-online.target 7 | 8 | [Service] 9 | Type=simple 10 | # The (-n * -cpu) values must currently be <= number of host cores. 11 | # The host has 20 cores 32GB ram, so the -n=5 (five containers) * -cpu=4 (four CPUs per container) == 20. 12 | ExecStart=/usr/local/bin/rundockerbuildlet -basename=power_ -image=golang/builder -n=5 -cpu=4 -memory=6g --env=XXX 13 | Restart=always 14 | RestartSec=2 15 | StartLimitInterval=0 16 | -------------------------------------------------------------------------------- /internal/diff/testdata/long.txt: -------------------------------------------------------------------------------- 1 | -- old -- 2 | 1 3 | 2 4 | 3 5 | 4 6 | 5 7 | 6 8 | 7 9 | 8 10 | 9 11 | 10 12 | 11 13 | 12 14 | 13 15 | 14 16 | 14½ 17 | 15 18 | 16 19 | 17 20 | 18 21 | 19 22 | 20 23 | -- new -- 24 | 1 25 | 2 26 | 3 27 | 4 28 | 5 29 | 6 30 | 8 31 | 9 32 | 10 33 | 11 34 | 12 35 | 13 36 | 14 37 | 17 38 | 18 39 | 19 40 | 20 41 | -- diff -- 42 | diff old new 43 | --- old 44 | +++ new 45 | @@ -4,7 +4,6 @@ 46 | 4 47 | 5 48 | 6 49 | -7 50 | 8 51 | 9 52 | 10 53 | @@ -12,9 +11,6 @@ 54 | 12 55 | 13 56 | 14 57 | -14½ 58 | -15 59 | -16 60 | 17 61 | 18 62 | 19 63 | -------------------------------------------------------------------------------- /env/darwin/aws/start-snapshot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright 2022 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | 6 | # Start macOS VM from installed disk image. Changes discarded on exit. 7 | 8 | if [[ $# != 3 ]]; then 9 | echo "Usage: $0 " 10 | exit 1 11 | fi 12 | 13 | DISK=$1 14 | OSK=$2 15 | PORT=$3 16 | 17 | args=( 18 | "$DISK" 19 | "$OSK" 20 | "$PORT" 21 | -snapshot 22 | ) 23 | 24 | $HOME/qemu.sh "${args[@]}" 25 | -------------------------------------------------------------------------------- /env/js-wasm/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2018 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | FROM {{REPO}}/linux-x86-sid:latest 6 | MAINTAINER golang-dev 7 | 8 | ENV DEBIAN_FRONTEND noninteractive 9 | 10 | # A copy of https://deb.nodesource.com/setup_14.x. 11 | COPY setup_14.x setup_14.x 12 | 13 | RUN bash setup_14.x && \ 14 | apt-get install -y nodejs && \ 15 | rm -rf setup_14.x /var/lib/apt/lists/* 16 | 17 | CMD ["/usr/local/bin/stage0"] 18 | -------------------------------------------------------------------------------- /env/js-wasm-node18/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | FROM {{REPO}}/linux-x86-sid:20221109 6 | LABEL maintainer="golang-dev@googlegroups.com" 7 | 8 | ENV DEBIAN_FRONTEND noninteractive 9 | 10 | # A copy of https://deb.nodesource.com/setup_18.x. 11 | COPY setup_18.x setup_18.x 12 | 13 | RUN bash setup_18.x && \ 14 | apt-get install -y nodejs && \ 15 | rm -rf setup_18.x /var/lib/apt/lists/* 16 | 17 | CMD ["/usr/local/bin/stage0"] 18 | -------------------------------------------------------------------------------- /internal/task/testdata/announce-minor.txt: -------------------------------------------------------------------------------- 1 | Hello gophers, 2 | 3 | We have just released Go versions 1.18.1 and 1.17.9, minor point releases. 4 | 5 | View the release notes for more information: 6 | https://go.dev/doc/devel/release#go1.18.1 7 | 8 | You can download binary and source distributions from the Go website: 9 | https://go.dev/dl/ 10 | 11 | To compile from source using a Git clone, update to the release with 12 | git checkout go1.18.1 and build as usual. 13 | 14 | Thanks to everyone who contributed to the releases. 15 | 16 | Cheers, 17 | Alice, Bob, and Charlie for the Go team 18 | -------------------------------------------------------------------------------- /env/linux-ppc64/osuosl/rundockerbuildlet.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Run Buildlets in Docker 3 | After=network.target 4 | 5 | [Install] 6 | WantedBy=network-online.target 7 | 8 | [Service] 9 | Type=simple 10 | # The (-n * -cpu) values must currently be <= number of host cores. 11 | # The host has 20 cores 32GB ram, so the -n=5 (five containers) * -cpu=4 (four CPUs per container) == 20. 12 | ExecStart=/usr/local/bin/rundockerbuildlet -basename=power_ -image=golang/buildlet-stage0 -n=5 -cpu=4 -memory=6g --env=host-linux-ppc64-sid 13 | Restart=always 14 | RestartSec=2 15 | StartLimitInterval=0 16 | -------------------------------------------------------------------------------- /maintner/internal/robustio/robustio_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package robustio 6 | 7 | import ( 8 | "errors" 9 | "syscall" 10 | ) 11 | 12 | const errFileNotFound = syscall.ENOENT 13 | 14 | // isEphemeralError returns true if err may be resolved by waiting. 15 | func isEphemeralError(err error) bool { 16 | var errno syscall.Errno 17 | if errors.As(err, &errno) { 18 | return errno == errFileNotFound 19 | } 20 | return false 21 | } 22 | -------------------------------------------------------------------------------- /env/linux-x86-sid/cloudbuild.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | steps: 6 | - name: 'gcr.io/cloud-builders/docker' 7 | args: [ 'build', '-t', 'golang/buildlet-stage0:latest', '-f', 'cmd/buildlet/stage0/Dockerfile', '.'] 8 | - name: 'gcr.io/cloud-builders/docker' 9 | args: [ 'build', '-t', 'gcr.io/symbolic-datum-552/linux-x86-sid:cloudbuild', '-f', 'env/linux-x86-sid/Dockerfile', '.'] 10 | images: 11 | - 'gcr.io/symbolic-datum-552/linux-x86-sid:cloudbuild' 12 | -------------------------------------------------------------------------------- /influx/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | FROM golang:1.18 AS build 6 | 7 | COPY go.mod /app/go.mod 8 | COPY go.sum /app/go.sum 9 | 10 | WORKDIR /app 11 | 12 | RUN go mod download 13 | 14 | COPY . /app 15 | 16 | RUN go build -o run-influx golang.org/x/build/influx 17 | 18 | FROM marketplace.gcr.io/google/influxdb2:latest 19 | 20 | COPY --from=build /app/run-influx /run-influx 21 | 22 | ENTRYPOINT ["/bin/sh"] 23 | CMD ["-c", "/run-influx -listen-http=:80"] 24 | -------------------------------------------------------------------------------- /maintner/maintpb/maintpb.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package maintpb 6 | 7 | // Run "go generate" in this directory to update. You need to: 8 | // 9 | // - have the protoc binary in your $PATH 10 | // - go get grpc-codegen.go4.org/protoc-gen-go4grpc 11 | // 12 | // See https://github.com/golang/protobuf#installation for how to install 13 | // the protoc binary. 14 | 15 | //go:generate protoc --proto_path=$GOPATH/src:. --go4grpc_out=plugins=grpc:. maintner.proto 16 | -------------------------------------------------------------------------------- /cmd/coordinator/service-staging.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | apiVersion: v1 6 | kind: Service 7 | metadata: 8 | name: coordinator 9 | spec: 10 | ports: 11 | - port: 80 12 | targetPort: 80 13 | name: http 14 | - port: 443 15 | targetPort: 443 16 | name: https 17 | - port: 2222 18 | targetPort: 2222 19 | name: ssh 20 | selector: 21 | app: coordinator 22 | type: LoadBalancer 23 | loadBalancerIP: 104.154.113.235 24 | -------------------------------------------------------------------------------- /internal/loghash/loghash.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package loghash provides the shared information for computing 6 | // a log hash (as in https://build.golang.org/log/HASH). 7 | package loghash 8 | 9 | import ( 10 | "crypto/sha1" 11 | "fmt" 12 | "io" 13 | ) 14 | 15 | // New returns a new hash for the given log text. 16 | func New(text string) (hash string) { 17 | h := sha1.New() 18 | io.WriteString(h, text) 19 | return fmt.Sprintf("%x", h.Sum(nil)) 20 | } 21 | -------------------------------------------------------------------------------- /internal/relui/content.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package relui 6 | 7 | import ( 8 | "embed" 9 | ) 10 | 11 | // static is our static web server content. 12 | // 13 | //go:embed static 14 | var static embed.FS 15 | 16 | // templates are our template files. 17 | // 18 | //go:embed templates 19 | var templates embed.FS 20 | 21 | // migrations are database migration SQL files generated by 22 | // golang-migrate. 23 | // 24 | //go:embed migrations 25 | var migrations embed.FS 26 | -------------------------------------------------------------------------------- /env/corellium/android/files/exec.sh: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | # Copyright 2022 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | 6 | 7 | # Executes command with the Termux environment. 8 | 9 | export PREFIX='/data/data/com.termux/files/usr' 10 | export HOME='/data/data/com.termux/files/home' 11 | export LD_LIBRARY_PATH='/data/data/com.termux/files/usr/lib' 12 | export PATH="/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/bin/applets:$PATH" 13 | export TMPDIR=$HOME/tmpdir 14 | 15 | cd $HOME 16 | 17 | exec "$@" 18 | -------------------------------------------------------------------------------- /internal/relui/migrations/20210928195553_create_task_logs_table.up.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2021 The Go Authors. All rights reserved. 2 | -- Use of this source code is governed by a BSD-style 3 | -- license that can be found in the LICENSE file. 4 | 5 | CREATE TABLE task_logs ( 6 | id SERIAL PRIMARY KEY, 7 | workflow_id uuid NOT NULL, 8 | task_name text NOT NULL, 9 | body text NOT NULL, 10 | created_at timestamp with time zone NOT NULL default current_timestamp, 11 | updated_at timestamp with time zone NOT NULL default current_timestamp, 12 | FOREIGN KEY (workflow_id, task_name) REFERENCES tasks (workflow_id, name) 13 | ); 14 | -------------------------------------------------------------------------------- /internal/relui/static/images/pending_grey_24dp.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /env/corellium/ios/files/builder.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright 2022 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | 6 | 7 | export HOME=/var/root 8 | export CC=$HOME/bin/clangwrap 9 | export GO_BUILDER_ENV=host-ios-arm64-corellium-ios 10 | export GOROOT_BOOTSTRAP=$HOME/go-ios-arm64-bootstrap 11 | export PATH=$HOME/bin:$PATH 12 | while true; do 13 | $GOROOT_BOOTSTRAP/bin/go install golang.org/x/build/cmd/buildlet@latest 14 | $HOME/go/bin/buildlet -reverse-type host-ios-arm64-corellium-ios -coordinator farmer.golang.org 15 | sleep 1 16 | done 17 | -------------------------------------------------------------------------------- /env/linux-arm-qemu/stage2: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | # Finish debootstrap 4 | mount -t proc proc /proc 5 | /debootstrap/debootstrap --second-stage 6 | 7 | # Enable the buildlet service. 8 | systemctl enable /etc/systemd/system/buildlet.service 9 | 10 | # Disable logind (which fails without dbus). 11 | rm -f /lib/systemd/system/multi-user.target.wants/systemd-logind.service 12 | 13 | # Slim the image down a bit. 14 | apt-get clean 15 | rm -rf /var/lib/apt/lists /usr/share/doc 16 | (cd /usr/share/locale/ && ls -1 | grep -v en | xargs rm -rf) 17 | rm -rf /var/cache/debconf/* 18 | rm -rf /usr/share/man 19 | 20 | rm /stage2 21 | sync 22 | reboot -f 23 | -------------------------------------------------------------------------------- /internal/relui/static/images/pending_yellow_24dp.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /perfdata/app/appengine.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build appengine 6 | // +build appengine 7 | 8 | package app 9 | 10 | import ( 11 | "context" 12 | "net/http" 13 | 14 | "google.golang.org/appengine" 15 | "google.golang.org/appengine/log" 16 | ) 17 | 18 | // requestContext returns the Context object for a given request. 19 | func requestContext(r *http.Request) context.Context { 20 | return appengine.NewContext(r) 21 | } 22 | 23 | var infof = log.Infof 24 | var errorf = log.Errorf 25 | -------------------------------------------------------------------------------- /cmd/coordinator/templates/base.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | {{define "build-header"}}
8 |

9 | Go Build Coordinator 10 |

11 | 18 |
19 |
{{end}} 20 | -------------------------------------------------------------------------------- /internal/relui/db/pgdbtx.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package db 6 | 7 | import ( 8 | "context" 9 | 10 | "github.com/jackc/pgconn" 11 | "github.com/jackc/pgx/v4" 12 | ) 13 | 14 | type PGDBTX interface { 15 | Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) 16 | Query(context.Context, string, ...interface{}) (pgx.Rows, error) 17 | QueryRow(context.Context, string, ...interface{}) pgx.Row 18 | BeginFunc(ctx context.Context, f func(pgx.Tx) error) error 19 | Close() 20 | } 21 | -------------------------------------------------------------------------------- /perfdata/app/local.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !appengine 6 | // +build !appengine 7 | 8 | package app 9 | 10 | import ( 11 | "context" 12 | "log" 13 | "net/http" 14 | ) 15 | 16 | // requestContext returns the Context object for a given request. 17 | func requestContext(r *http.Request) context.Context { 18 | return r.Context() 19 | } 20 | 21 | func infof(_ context.Context, format string, args ...interface{}) { 22 | log.Printf(format, args...) 23 | } 24 | 25 | var errorf = infof 26 | -------------------------------------------------------------------------------- /env/wasip1-wasm-wasmtime/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | ARG REPO 6 | 7 | FROM debian:latest as builder 8 | LABEL maintainer="golang-dev@googlegroups.com" 9 | 10 | RUN apt-get update && apt-get -y install curl xz-utils 11 | 12 | # A copy of https://wasmtime.dev/install.sh. 13 | COPY install.sh install.sh 14 | 15 | RUN bash install.sh --version v7.0.0 16 | 17 | FROM ${REPO}/linux-x86-sid:20221109 18 | 19 | COPY --from=builder /root/.wasmtime/bin/wasmtime /usr/local/bin/wasmtime 20 | 21 | CMD ["/usr/local/bin/stage0"] 22 | -------------------------------------------------------------------------------- /internal/logparser/testdata/12.fail: -------------------------------------------------------------------------------- 1 | Section: "go test -short ./..." 2 | Pkg: "golang.org/x/vuln/cmd/govulncheck" 3 | Test: "TestCommand" 4 | Mode: "test" 5 | Snippet: 6 | novuln.go:6:2: golang.org/x/text@v0.3.7: Get "https://proxy.golang.com.cn/golang.org/x/text/@v/v0.3.7.zip": proxyconnect tcp: dial tcp 205.185.121.87:54288: i/o timeout 7 | --- FAIL: TestCommand (18.23s) 8 | buildtest.go:74: exit status 1 9 | Output: 10 | novuln.go:6:2: golang.org/x/text@v0.3.7: Get "https://proxy.golang.com.cn/golang.org/x/text/@v/v0.3.7.zip": proxyconnect tcp: dial tcp 205.185.121.87:54288: i/o timeout 11 | --- FAIL: TestCommand (18.23s) 12 | buildtest.go:74: exit status 1 13 | -------------------------------------------------------------------------------- /cmd/relui/.eslintrc.yaml: -------------------------------------------------------------------------------- 1 | root: true 2 | extends: google 3 | parserOptions: 4 | ecmaVersion: 2018 5 | rules: 6 | require-jsdoc: 'off' 7 | indent: 'off' 8 | arrow-parens: 'off' 9 | overrides: 10 | - files: 11 | - "*.js" 12 | env: 13 | browser: true 14 | extends: 15 | - eslint:recommended 16 | - plugin:prettier/recommended 17 | rules: 18 | func-style: 19 | - error 20 | - "expression" 21 | prettier/prettier: 22 | - error 23 | - printWidth: 120 24 | valid-jsdoc: 25 | - error 26 | - requireParamType: false 27 | requireReturnType: false 28 | requireReturn: false 29 | -------------------------------------------------------------------------------- /vcs-test/vcweb/svn.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux 6 | // +build linux 7 | 8 | package main 9 | 10 | import ( 11 | "log" 12 | "net/http" 13 | "net/http/httputil" 14 | "net/url" 15 | ) 16 | 17 | // Subversion is so complicated it can only run from inside Apache. 18 | // Assume an appropriately configured Apache is on 8888. 19 | func svnHandler() http.Handler { 20 | u, err := url.Parse("http://127.0.0.1:8888/") 21 | if err != nil { 22 | log.Fatal(err) 23 | } 24 | return httputil.NewSingleHostReverseProxy(u) 25 | } 26 | -------------------------------------------------------------------------------- /env/corellium/android/files/builder.sh: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | export CC=$HOME/clangwrap 6 | export GO_BUILDER_ENV=host-android-arm64-corellium-android 7 | ( 8 | flock -n 9 || exit 0 9 | while true; do 10 | go install golang.org/x/build/cmd/buildlet@latest 11 | # unset LD_PRELOAD libtermux-exec for 32-bit binaries 12 | (unset LD_PRELOAD && 13 | $HOME/go/bin/buildlet -reverse-type host-android-arm64-corellium-android -coordinator farmer.golang.org) 14 | sleep 1 15 | #/system/bin/reboot 16 | done 17 | ) 9>$PREFIX/tmp/builder.lock 18 | -------------------------------------------------------------------------------- /perfdata/appengine/app.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | runtime: go113 6 | service: perfdata 7 | instance_class: F4_HIGHMEM 8 | 9 | handlers: 10 | - url: /_ah/remote_api 11 | script: auto 12 | - url: /.* 13 | script: auto 14 | secure: always 15 | env_variables: 16 | CLOUDSQL_CONNECTION_NAME: 'golang-org:us-central1:golang-org' 17 | CLOUDSQL_USER: 'root' 18 | CLOUDSQL_PASSWORD: '' 19 | CLOUDSQL_DATABASE: 'perfdata' 20 | GCS_BUCKET: 'golang-perfdata' 21 | PERFDATA_VIEW_URL_BASE: 'https://perf.golang.org/search?q=upload:' 22 | -------------------------------------------------------------------------------- /internal/relui/protos/proto.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package protos 6 | 7 | // Run "go generate" in this directory to update. You need to have: 8 | // 9 | // a protoc binary (see https://github.com/protocolbuffers/protobuf/releases) 10 | // protocol compiler plugins for Go: 11 | // go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.27 12 | // go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1 13 | 14 | //go:generate protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative relui.proto 15 | -------------------------------------------------------------------------------- /internal/task/testdata/announce-major.txt: -------------------------------------------------------------------------------- 1 | Hello gophers, 2 | 3 | We have just released Go 1.19. 4 | 5 | To find out what has changed in Go 1.19, read the release notes: 6 | https://go.dev/doc/go1.19 7 | 8 | You can download binary and source distributions from our download page: 9 | https://go.dev/dl/#go1.19 10 | 11 | If you have Go installed already, an easy way to try go1.19 12 | is by using the go command: 13 | $ go install golang.org/dl/go1.19@latest 14 | $ go1.19 download 15 | 16 | To compile from source using a Git clone, update to the release with 17 | git checkout go1.19 and build as usual. 18 | 19 | Thanks to everyone who contributed to the release! 20 | 21 | Cheers, 22 | The Go team 23 | -------------------------------------------------------------------------------- /maintner/maintnerd/apipb/apipb.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package apipb 6 | 7 | // Run "go generate" in this directory to update. You need to have: 8 | // 9 | // a protoc binary (see https://github.com/protocolbuffers/protobuf/releases) 10 | // protocol compiler plugins for Go: 11 | // go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.26 12 | // go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1 13 | 14 | //go:generate protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative api.proto 15 | -------------------------------------------------------------------------------- /cmd/greplogs/_embed/broken.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Command broken lists the current Go builders with known issues. 6 | // 7 | // To test this program, cd to its directory and run: 8 | // 9 | // go mod init 10 | // go get golang.org/x/build/dashboard@HEAD 11 | // go run . 12 | // rm go.mod go.sum 13 | package main 14 | 15 | import ( 16 | "fmt" 17 | 18 | "golang.org/x/build/dashboard" 19 | ) 20 | 21 | func main() { 22 | for _, b := range dashboard.Builders { 23 | if len(b.KnownIssues) > 0 { 24 | fmt.Println(b.Name) 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /internal/gomote/protos/protos.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package protos 6 | 7 | // Run "go generate" in this directory to update. You need to have: 8 | // 9 | // a protoc binary (see https://github.com/protocolbuffers/protobuf/releases) 10 | // protocol compiler plugins for Go: 11 | // go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.26 12 | // go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1 13 | 14 | //go:generate protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative gomote.proto 15 | -------------------------------------------------------------------------------- /maintner/internal/robustio/robustio_other.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !windows && !darwin 6 | // +build !windows,!darwin 7 | 8 | package robustio 9 | 10 | import ( 11 | "os" 12 | ) 13 | 14 | func rename(oldpath, newpath string) error { 15 | return os.Rename(oldpath, newpath) 16 | } 17 | 18 | func readFile(filename string) ([]byte, error) { 19 | return os.ReadFile(filename) 20 | } 21 | 22 | func removeAll(path string) error { 23 | return os.RemoveAll(path) 24 | } 25 | 26 | func isEphemeralError(err error) bool { 27 | return false 28 | } 29 | -------------------------------------------------------------------------------- /vcs-test/Dockerfile.apache: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | FROM debian:stable 6 | LABEL maintainer="golang-dev@googlegroups.com" 7 | 8 | # For interacting with the Go source & subrepos 9 | RUN apt-get update && apt-get install -y \ 10 | --no-install-recommends \ 11 | apache2 \ 12 | libapache2-mod-svn \ 13 | subversion \ 14 | && rm -rf /var/lib/apt/lists/* 15 | 16 | RUN sed -i 's/80/8888/' /etc/apache2/ports.conf 17 | 18 | COPY vcs-test/dav_svn.conf /etc/apache2/mods-enabled/dav_svn.conf 19 | 20 | ENTRYPOINT ["apachectl", "-D", "FOREGROUND"] -------------------------------------------------------------------------------- /perfdata/appengine/static/upload.html: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | Upload Performance Results 11 | 12 | 13 |

Upload one or more benchmark files.

14 |
15 |
16 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /internal/relui/db/db.go: -------------------------------------------------------------------------------- 1 | // Code generated by sqlc. DO NOT EDIT. 2 | // versions: 3 | // sqlc v1.15.0 4 | 5 | package db 6 | 7 | import ( 8 | "context" 9 | 10 | "github.com/jackc/pgconn" 11 | "github.com/jackc/pgx/v4" 12 | ) 13 | 14 | type DBTX interface { 15 | Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) 16 | Query(context.Context, string, ...interface{}) (pgx.Rows, error) 17 | QueryRow(context.Context, string, ...interface{}) pgx.Row 18 | } 19 | 20 | func New(db DBTX) *Queries { 21 | return &Queries{db: db} 22 | } 23 | 24 | type Queries struct { 25 | db DBTX 26 | } 27 | 28 | func (q *Queries) WithTx(tx pgx.Tx) *Queries { 29 | return &Queries{ 30 | db: tx, 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /internal/task/testdata/announce-minor.html: -------------------------------------------------------------------------------- 1 |

Hello gophers,

2 |

We have just released Go versions 1.18.1 and 1.17.9, minor point releases.

3 |

View the release notes for more information:
4 | https://go.dev/doc/devel/release#go1.18.1

5 |

You can download binary and source distributions from the Go website:
6 | https://go.dev/dl/

7 |

To compile from source using a Git clone, update to the release with
8 | git checkout go1.18.1 and build as usual.

9 |

Thanks to everyone who contributed to the releases.

10 |

Cheers,
11 | Alice, Bob, and Charlie for the Go team

12 | -------------------------------------------------------------------------------- /perf/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | FROM golang:1.18 AS builder 6 | 7 | COPY go.mod /app/go.mod 8 | COPY go.sum /app/go.sum 9 | 10 | WORKDIR /app 11 | 12 | RUN go mod download 13 | 14 | COPY . /app 15 | RUN go build -o perf golang.org/x/build/perf 16 | 17 | FROM debian:bullseye 18 | 19 | # netbase and ca-certificates are needed for dialing TLS. 20 | RUN apt-get update && apt-get install -y \ 21 | --no-install-recommends \ 22 | netbase \ 23 | ca-certificates \ 24 | && rm -rf /var/lib/apt/lists/* 25 | 26 | COPY --from=builder /app/perf / 27 | ENTRYPOINT ["/perf"] 28 | -------------------------------------------------------------------------------- /cmd/coordinator/builders_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.16 && (linux || darwin) 6 | // +build go1.16 7 | // +build linux darwin 8 | 9 | package main 10 | 11 | import ( 12 | "net/http/httptest" 13 | "testing" 14 | ) 15 | 16 | func TestHandleBuilders(t *testing.T) { 17 | rec := httptest.NewRecorder() 18 | handleBuilders(rec, httptest.NewRequest("GET", "/builders", nil)) 19 | res := rec.Result() 20 | if res.StatusCode != 200 { 21 | t.Fatalf("Want 200 OK. Got status: %v, %s", res.Status, rec.Body.Bytes()) 22 | } 23 | t.Logf("Got: %s", rec.Body.Bytes()) 24 | } 25 | -------------------------------------------------------------------------------- /cmd/coordinator/version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Copyright 2017 The Go Authors. All rights reserved. 4 | # Use of this source code is governed by a BSD-style 5 | # license that can be found in the LICENSE file. 6 | 7 | VERSION=$(git rev-parse HEAD) 8 | CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) 9 | if ! git diff-index HEAD --quiet || ! git diff-files --quiet; then 10 | VERSION=$VERSION-dirty 11 | dirty=1 12 | fi 13 | if [ -n "$dirty" ] || [ -z "$(git config --get-all "branch.${CURRENT_BRANCH}.remote")" ] || [ -n "$(git rev-list '@{upstream}..HEAD')" ]; then 14 | # Append -user-20190509T023926 15 | VERSION=$VERSION-$USER-$(git show --quiet --pretty=%cI HEAD | perl -npe 's/[^\dT]//g;$_=substr($_,0,15)') 16 | fi 17 | echo "$VERSION" 18 | -------------------------------------------------------------------------------- /cmd/relui/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | FROM golang:1.18 AS build 6 | 7 | COPY go.mod /app/go.mod 8 | COPY go.sum /app/go.sum 9 | 10 | WORKDIR /app 11 | 12 | RUN go mod download 13 | 14 | COPY . /app 15 | 16 | RUN go build golang.org/x/build/cmd/relui 17 | 18 | FROM marketplace.gcr.io/google/debian11:latest 19 | 20 | RUN apt-get update && apt-get install -y \ 21 | --no-install-recommends \ 22 | tini 23 | 24 | ARG PORT=8080 25 | ENV PORT=${PORT} 26 | EXPOSE ${PORT} 27 | 28 | COPY --from=build /app/relui /app/relui 29 | WORKDIR /app 30 | ENTRYPOINT ["/usr/bin/tini", "--", "./relui"] 31 | -------------------------------------------------------------------------------- /internal/task/testdata/announce-minor-solo.txt: -------------------------------------------------------------------------------- 1 | Hello gophers, 2 | 3 | We have just released Go version 1.11.1, a minor point release. 4 | 5 | This minor release includes 2 security fixes following the security policy : 6 | 7 | - abc: security fix 1 8 | 9 | - xyz: security fix 2 10 | 11 | View the release notes for more information: 12 | https://go.dev/doc/devel/release#go1.11.1 13 | 14 | You can download binary and source distributions from the Go website: 15 | https://go.dev/dl/ 16 | 17 | To compile from source using a Git clone, update to the release with 18 | git checkout go1.11.1 and build as usual. 19 | 20 | Thanks to everyone who contributed to the release. 21 | 22 | Cheers, 23 | Alice for the Go team 24 | -------------------------------------------------------------------------------- /vcs-test/vcweb/deathclock_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package main_test 6 | 7 | import "testing" 8 | 9 | var go119Unsupported = false 10 | 11 | var turndownMsg = ` 12 | Since Go 1.19 is not longer supported, vcs-test.golang.org is no 13 | longer needed for testing any release branch and should be turned 14 | down, and x/build/vcs-test/... should be deleted. 15 | (See https://go.dev/issue/27494.)` 16 | 17 | func TestTurnDownVCSTest(t *testing.T) { 18 | if !go119Unsupported { 19 | return 20 | } 21 | 22 | if testing.Short() { 23 | t.Log(turndownMsg) 24 | } else { 25 | t.Fatal(turndownMsg) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /internal/relui/migrations/20220621201140_add_approved_at_to_tasks.up.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2022 The Go Authors. All rights reserved. 2 | -- Use of this source code is governed by a BSD-style 3 | -- license that can be found in the LICENSE file. 4 | 5 | BEGIN; 6 | 7 | ALTER TABLE tasks 8 | ADD COLUMN approved_at timestamp WITH TIME ZONE NULL; 9 | 10 | WITH approved_tasks AS ( 11 | SELECT workflow_id, task_name, max(created_at) AS created_at 12 | FROM task_logs 13 | WHERE body = 'USER-APPROVED' 14 | GROUP BY workflow_id, task_name 15 | ) 16 | 17 | UPDATE tasks 18 | SET approved_at = approved_tasks.created_at 19 | FROM approved_tasks 20 | WHERE tasks.workflow_id = approved_tasks.workflow_id 21 | AND tasks.name = approved_tasks.task_name; 22 | 23 | COMMIT; 24 | -------------------------------------------------------------------------------- /cmd/coordinator/protos/coordinator.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | syntax = "proto3"; 6 | 7 | package protos; 8 | 9 | service Coordinator { 10 | // ClearResults clears build failures from the coordinator to force them to rebuild. 11 | rpc ClearResults(ClearResultsRequest) returns (ClearResultsResponse) {} 12 | } 13 | 14 | // ClearResultsRequest specifies the data needed to clear a result. 15 | message ClearResultsRequest { 16 | // builder is the builder to clear results. 17 | string builder = 1; 18 | // hash is the commit hash to clear results. 19 | string hash = 2; 20 | } 21 | 22 | message ClearResultsResponse {} 23 | -------------------------------------------------------------------------------- /env/windows/rdp.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2017 The Go Authors. All rights reserved. 4 | # Use of this source code is governed by a BSD-style 5 | # license that can be found in the LICENSE file. 6 | 7 | set -eu 8 | 9 | ZONE=us-central1-f 10 | INSTANCE_NAME="${1:-golang-buildlet}" 11 | 12 | # Set, fetch credentials 13 | echo "" 14 | echo "Connecting to instance: " 15 | echo "" 16 | 17 | username="gopher" 18 | password="gopher" 19 | ip=$(gcloud compute instances describe "${INSTANCE_NAME}" --project="${PROJECT_ID}" --zone="${ZONE}" --format="value(networkInterfaces[0].networkIP)") 20 | 21 | echo xfreerdp -u "${username}" -p "'${password}'" -n "${ip}" --ignore-certificate "${ip}" 22 | xfreerdp -u "${username}" -p "${password}" -n "${ip}" --ignore-certificate "${ip}" 23 | -------------------------------------------------------------------------------- /env/windows/ssh.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2017 The Go Authors. All rights reserved. 4 | # Use of this source code is governed by a BSD-style 5 | # license that can be found in the LICENSE file. 6 | 7 | set -eu 8 | 9 | ZONE=us-central1-f 10 | INSTANCE_NAME="${1:-golang-buildlet}" 11 | 12 | username="gopher" 13 | password="gopher" 14 | ip=$(gcloud compute instances describe "${INSTANCE_NAME}" --project="${PROJECT_ID}" --zone="${ZONE}" --format="value(networkInterfaces[0].networkIP)") 15 | 16 | echo "" 17 | echo "Connecting to instance ${INSTANCE_NAME}" 18 | echo "" 19 | echo "When prompted for password, use: ${password}" 20 | echo "" 21 | ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no gopher@${ip} 22 | -------------------------------------------------------------------------------- /internal/influx/influx.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package influx provides common constants for setting up and access the 6 | // performance monitoring InfluxDB instance. 7 | package influx 8 | 9 | const ( 10 | // Org is the Influx organization name. 11 | Org = "golang" 12 | 13 | // Bucker is the Influx bucket name. 14 | Bucket = "perf" 15 | ) 16 | 17 | // The names of the password/token secrets in Google Secret Manager. 18 | const ( 19 | AdminPassSecretName = "influx-admin-pass" 20 | AdminTokenSecretName = "influx-admin-token" 21 | ReaderPassSecretName = "influx-reader-pass" 22 | ReaderTokenSecretName = "influx-reader-token" 23 | ) 24 | -------------------------------------------------------------------------------- /third_party/bandchart/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2018–2021 Observable, Inc. 2 | 3 | Permission to use, copy, modify, and/or distribute this software for any 4 | purpose with or without fee is hereby granted, provided that the above 5 | copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 10 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 12 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 13 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 | -------------------------------------------------------------------------------- /vcs-test/vcweb/git.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux 6 | // +build linux 7 | 8 | package main 9 | 10 | import ( 11 | "log" 12 | "net/http" 13 | "net/http/cgi" 14 | "os" 15 | "os/exec" 16 | "path/filepath" 17 | ) 18 | 19 | func gitHandler() http.Handler { 20 | os.Mkdir(filepath.Join(*dir, "git"), 0777) 21 | path, err := exec.LookPath("git") 22 | if err != nil { 23 | log.Fatal(err) 24 | } 25 | return &cgi.Handler{ 26 | Path: path, 27 | Args: []string{"http-backend"}, 28 | Dir: filepath.Join(*dir, "git"), 29 | Env: []string{ 30 | "GIT_PROJECT_ROOT=" + filepath.Join(*dir), 31 | "GIT_HTTP_EXPORT_ALL=1", 32 | }, 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /perfdata/appengine/.gcloudignore: -------------------------------------------------------------------------------- 1 | # This file specifies files that are *not* uploaded to Google Cloud Platform 2 | # using gcloud. It follows the same syntax as .gitignore, with the addition of 3 | # "#!include" directives (which insert the entries of the given .gitignore-style 4 | # file at that point). 5 | # 6 | # For more information, run: 7 | # $ gcloud topic gcloudignore 8 | # 9 | .gcloudignore 10 | # If you would like to upload your .git directory, .gitignore file or files 11 | # from your .gitignore file, remove the corresponding line 12 | # below: 13 | .git 14 | .gitignore 15 | 16 | # Binaries for programs and plugins 17 | *.exe 18 | *.exe~ 19 | *.dll 20 | *.so 21 | *.dylib 22 | # Test binary, build with `go test -c` 23 | *.test 24 | # Output of the go coverage tool, specifically when used with LiteIDE 25 | *.out -------------------------------------------------------------------------------- /env/darwin/aws/start-installer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright 2022 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | 6 | # Start macOS installer to install to disk image. 7 | 8 | if [[ $# != 4 ]]; then 9 | echo "Usage: $0 " 10 | exit 1 11 | fi 12 | 13 | DISK=$1 14 | OPENCORE=$2 15 | RECOVERY=$3 16 | OSK=$4 17 | PORT=1 18 | 19 | args=( 20 | "$DISK" 21 | "$OSK" 22 | "$PORT" 23 | -drive id=OpenCoreBoot,if=none,format=raw,file="$OPENCORE" 24 | -device ide-hd,bus=sata.3,drive=OpenCoreBoot 25 | -drive id=InstallMedia,if=none,format=raw,file="$RECOVERY" 26 | -device ide-hd,bus=sata.4,drive=InstallMedia 27 | ) 28 | 29 | $HOME/qemu.sh "${args[@]}" 30 | -------------------------------------------------------------------------------- /internal/relui/migrations/20211005180646_update_workflows_add_finished.up.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2021 The Go Authors. All rights reserved. 2 | -- Use of this source code is governed by a BSD-style 3 | -- license that can be found in the LICENSE file. 4 | 5 | BEGIN; 6 | 7 | ALTER TABLE workflows 8 | ADD COLUMN finished bool NOT NULL DEFAULT false; 9 | 10 | CREATE INDEX workflows_finished_ix ON workflows (finished) WHERE finished = false; 11 | 12 | ALTER TABLE workflows 13 | ADD COLUMN output jsonb NOT NULL DEFAULT jsonb_build_object(); 14 | 15 | ALTER TABLE workflows 16 | ADD COLUMN error text NOT NULL DEFAULT ''; 17 | 18 | UPDATE workflows 19 | SET finished = true 20 | WHERE workflows.id NOT IN ( 21 | SELECT DISTINCT tasks.workflow_id 22 | FROM tasks 23 | WHERE finished = false 24 | ); 25 | 26 | COMMIT; 27 | -------------------------------------------------------------------------------- /env/dragonfly-amd64/phase2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Phase 2 of the DragonflyBSD installation: update pkg database. 4 | 5 | set -ex 6 | 7 | echo >&2 phase2.sh starting 8 | 9 | # Make pfi look for CD again when booting for phase3. 10 | # Normally /etc/pfi.conf is left behind and stops future checks. 11 | # Edit /etc/rc.d/pfi to remove /etc/pfi.conf each time it starts running. 12 | echo '/REQUIRE/a 13 | rm -f /etc/pfi.conf 14 | . 15 | w 16 | q' | ed /etc/rc.d/pfi 17 | 18 | # pfi startup does not have full path that a root login does. 19 | export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/pkg/sbin:/usr/pkg/bin:/root/bin 20 | 21 | # Update pkg database and install extras we need. 22 | pkg install -y bash curl git gdb 23 | 24 | echo 'DONE WITH PHASE 2.' 25 | sync 26 | poweroff 27 | sleep 86400 28 | -------------------------------------------------------------------------------- /env/windows/make.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2017 The Go Authors. All rights reserved. 4 | # Use of this source code is governed by a BSD-style 5 | # license that can be found in the LICENSE file. 6 | 7 | set -e -u 8 | 9 | declare -A public_images 10 | 11 | public_images=( 12 | ['server-2016-v8']='windows-server-2016-dc-core-v20220513' 13 | ['server-2008r2-v8']='windows-server-2008-r2-dc-v20200114' 14 | ['server-2012r2-v8']='windows-server-2012-r2-dc-core-v20220513' 15 | ) 16 | 17 | mkdir -p out 18 | 19 | for image in "${!public_images[@]}"; do 20 | prefix=$image 21 | base_image=${public_images[$image]} 22 | 23 | CAPTURE_IMAGE=true BASE_IMAGE="$base_image" IMAGE_PROJECT='windows-cloud' ./build.bash "$prefix" |& tee "out/${base_image}.txt" & 24 | done 25 | 26 | 27 | wait 28 | -------------------------------------------------------------------------------- /internal/task/testdata/announce-major.html: -------------------------------------------------------------------------------- 1 |

Hello gophers,

2 |

We have just released Go 1.19.

3 |

To find out what has changed in Go 1.19, read the release notes:
4 | https://go.dev/doc/go1.19

5 |

You can download binary and source distributions from our download page:
6 | https://go.dev/dl/#go1.19

7 |

If you have Go installed already, an easy way to try go1.19
8 | is by using the go command:
9 | $ go install golang.org/dl/go1.19@latest
10 | $ go1.19 download

11 |

To compile from source using a Git clone, update to the release with
12 | git checkout go1.19 and build as usual.

13 |

Thanks to everyone who contributed to the release!

14 |

Cheers,
15 | The Go team

16 | -------------------------------------------------------------------------------- /internal/task/gerrit_test.go: -------------------------------------------------------------------------------- 1 | package task 2 | 3 | import ( 4 | "context" 5 | "testing" 6 | 7 | "golang.org/x/build/gerrit" 8 | ) 9 | 10 | func TestNoOpCL(t *testing.T) { 11 | if !*flagRunVersionTest { 12 | t.Skip("Not enabled by flags") 13 | } 14 | cl := gerrit.NewClient("https://go-review.googlesource.com", gerrit.GitCookiesAuth()) 15 | gcl := &RealGerritClient{Client: cl} 16 | 17 | ctx := context.Background() 18 | changeID, err := gcl.CreateAutoSubmitChange(ctx, gerrit.ChangeInput{ 19 | Project: "scratch", 20 | Branch: "master", 21 | Subject: "no-op CL test", 22 | }, nil, map[string]string{"NONEXISTANT_FILE": ""}) 23 | if err != nil { 24 | t.Fatal(err) 25 | } 26 | if changeID != "" { 27 | t.Fatalf("creating no-op change resulted in a CL %v (%q), wanted none", ChangeLink(changeID), changeID) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /internal/task/template/pre-announce-minor.md: -------------------------------------------------------------------------------- 1 | Subject: [security] Go {{short .Version}}{{with .SecondaryVersion}} and Go {{. | short}}{{end}} pre-announcement 2 | 3 | Hello gophers, 4 | 5 | We plan to issue Go {{short .Version}}{{with .SecondaryVersion}} and Go {{. | short}}{{end}} during US business hours on {{.Target.Format "Monday, January 2"}}. 6 | 7 | {{if .SecondaryVersion -}} 8 | These minor releases include 9 | {{- else -}} 10 | This minor release includes{{end}} PRIVATE security fixes to {{.Security}}, covering the following CVE{{if gt (len .CVEs) 1}}s{{end}}: 11 | 12 | {{range .CVEs}}- {{.}} 13 | {{end}} 14 | 15 | Following our security policy, this is the pre-announcement of {{if .SecondaryVersion}}those releases{{else}}the release{{end}}. 16 | 17 | Thanks, 18 | {{with .Names}}{{join .}} for the{{else}}The{{end}} Go team 19 | -------------------------------------------------------------------------------- /maintner/internal/robustio/robustio_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package robustio 6 | 7 | import ( 8 | "errors" 9 | "syscall" 10 | ) 11 | 12 | const errFileNotFound = syscall.ERROR_FILE_NOT_FOUND 13 | const errSharingViolation syscall.Errno = 32 // Copied from internal/syscall/windows.ERROR_SHARING_VIOLATION 14 | 15 | // isEphemeralError returns true if err may be resolved by waiting. 16 | func isEphemeralError(err error) bool { 17 | var errno syscall.Errno 18 | if errors.As(err, &errno) { 19 | switch errno { 20 | case syscall.ERROR_ACCESS_DENIED, 21 | syscall.ERROR_FILE_NOT_FOUND, 22 | errSharingViolation: 23 | return true 24 | } 25 | } 26 | return false 27 | } 28 | -------------------------------------------------------------------------------- /cmd/coordinator/cloudbuild.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2023 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | steps: 6 | - name: 'gcr.io/cloud-builders/docker' 7 | args: 8 | - 'build' 9 | - '-f' 10 | - 'cmd/coordinator/Dockerfile' 11 | - '--build-arg' 12 | - 'version=${TAG_NAME}' 13 | - '-t' 14 | - 'gcr.io/symbolic-datum-552/coordinator:${TAG_NAME}' 15 | - '-t' 16 | - 'gcr.io/symbolic-datum-552/coordinator:latest' 17 | - '.' 18 | - name: 'gcr.io/cloud-builders/docker' 19 | args: ['push', 'gcr.io/symbolic-datum-552/coordinator:${TAG_NAME}'] 20 | images: 21 | - 'gcr.io/symbolic-datum-552/coordinator:${TAG_NAME}' 22 | - 'gcr.io/symbolic-datum-552/coordinator:latest' 23 | options: 24 | logging: CLOUD_LOGGING_ONLY 25 | -------------------------------------------------------------------------------- /cloudfns/wikiwebhook/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cloudfns/wikiwebhook.svg)](https://pkg.go.dev/golang.org/x/build/cloudfns/wikiwebhook) 4 | 5 | # golang.org/x/build/cloudfns/wikiwebhook 6 | 7 | Package wikiwebhook implements an Google Cloud Function HTTP handler that expects GitHub webhook change events. 8 | 9 | 10 | ## Deploying 11 | 12 | ```sh 13 | gcloud functions deploy GitHubWikiChangeWebHook \ 14 | --project=symbolic-datum-552 \ 15 | --runtime go113 \ 16 | --trigger-http \ 17 | --set-env-vars="PUBSUB_TOPIC=github.webhooks.golang.go.wiki,GCP_PROJECT=symbolic-datum-552,GITHUB_WEBHOOK_SECRET=$(gcloud --project=symbolic-datum-552 secrets versions access latest --secret=github-webhook-secret)" 18 | ``` 19 | -------------------------------------------------------------------------------- /cmd/relui/cloudbuild.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | steps: 6 | - name: gcr.io/cloud-builders/docker 7 | args: [ 'run', '-d', '--network=cloudbuild', '--env=POSTGRES_HOST_AUTH_METHOD=trust', '--name=postgres', 'postgres:13' ] 8 | - name: postgres 9 | timeout: 120s 10 | args: ['bash', '-c', 'while ! timeout 1 psql --host=postgres --user=postgres --command "select 1"; do sleep 1; done'] 11 | - name: gcr.io/cloud-builders/docker 12 | args: [ 'build', '-f', 'cmd/relui/Dockerfile.test', '-t', 'golang/relui-test', '.' ] 13 | - name: gcr.io/cloud-builders/docker 14 | args: [ 'run', '--rm', '--network=cloudbuild', '-e', 'PGHOST=postgres', '-e', 'PGUSER=postgres', '-t', 'golang/relui-test', ] 15 | -------------------------------------------------------------------------------- /internal/task/template/announce-major.md: -------------------------------------------------------------------------------- 1 | Subject: Go {{short .Version}} is released 2 | 3 | Hello gophers, 4 | 5 | We have just released Go {{short .Version}}. 6 | 7 | To find out what has changed in Go {{short .Version}}, read the release notes: 8 | https://go.dev/doc/{{.Version}} 9 | 10 | You can download binary and source distributions from our download page: 11 | https://go.dev/dl/#{{.Version}} 12 | 13 | If you have Go installed already, an easy way to try {{.Version}} 14 | is by using the go command: 15 | $ go install golang.org/dl/{{.Version}}@latest 16 | $ {{.Version}} download 17 | 18 | To compile from source using a Git clone, update to the release with 19 | `git checkout {{.Version}}` and build as usual. 20 | 21 | Thanks to everyone who contributed to the release! 22 | 23 | Cheers, 24 | {{with .Names}}{{join .}} for the{{else}}The{{end}} Go team 25 | -------------------------------------------------------------------------------- /cloudfns/sendwikidiff/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cloudfns/sendwikidiff.svg)](https://pkg.go.dev/golang.org/x/build/cloudfns/sendwikidiff) 4 | 5 | # golang.org/x/build/cloudfns/sendwikidiff 6 | 7 | Package sendwikidiff implements a Google Cloud background function that reacts to a pubsub message containing a GitHub webhook change payload. 8 | 9 | 10 | ## Deploying 11 | 12 | ```sh 13 | gcloud functions deploy HandleWikiChangePubSub \ 14 | --project=symbolic-datum-552 \ 15 | --runtime go113 \ 16 | --trigger-topic github.webhooks.golang.go.wiki \ 17 | --memory 1024 \ 18 | --set-env-vars="SENDGRID_API_KEY=$(gcloud --project=symbolic-datum-552 secrets versions access latest --secret=sendgrid-sendonly-api-key)" 19 | ``` 20 | -------------------------------------------------------------------------------- /cmd/gopherbot/README.md: -------------------------------------------------------------------------------- 1 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cmd/gopherbot.svg)](https://pkg.go.dev/golang.org/x/build/cmd/gopherbot) 2 | 3 | # golang.org/x/build/cmd/gopherbot 4 | 5 | The gopherbot command runs Go's gopherbot role account on GitHub and Gerrit. 6 | 7 | ## Development 8 | 9 | To test changes locally, run: 10 | 11 | ```sh 12 | $ go run . -dry-run 13 | ``` 14 | 15 | To connect gopherbot to development instances of, e.g. devapp, modify the 16 | source code to point at those instances. 17 | 18 | ## Development with Docker 19 | 20 | ``` 21 | make docker-image 22 | docker volume create golang-maintner 23 | docker run -v golang-maintner:/.cache/golang-maintner \ 24 | -it --rm gcr.io/go-dashboard-dev/gopherbot --dry-run 25 | ``` 26 | 27 | ## Deployment 28 | 29 | See the documentation on [deployment](../../doc/deployment.md). 30 | -------------------------------------------------------------------------------- /devapp/gophercon_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | package main 5 | 6 | import "testing" 7 | 8 | func TestIntFromStr(t *testing.T) { 9 | testcases := []struct { 10 | s string 11 | i int 12 | }{ 13 | {"123", 123}, 14 | {"User ID: 98403", 98403}, 15 | {"1234 User 5431 ID", 1234}, 16 | {"Stardate 153.2415", 153}, 17 | } 18 | for _, tc := range testcases { 19 | r, ok := intFromStr(tc.s) 20 | if !ok { 21 | t.Errorf("intFromStr(%q) = %v", tc.s, ok) 22 | } 23 | if r != tc.i { 24 | t.Errorf("intFromStr(%q) = %d; want %d", tc.s, r, tc.i) 25 | } 26 | } 27 | noInt := "hello there" 28 | _, ok := intFromStr(noInt) 29 | if ok { 30 | t.Errorf("intFromStr(%q) = %v; want false", noInt, ok) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /maintner/godata/example_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package godata_test 6 | 7 | import ( 8 | "context" 9 | "fmt" 10 | "log" 11 | 12 | "golang.org/x/build/maintner" 13 | "golang.org/x/build/maintner/godata" 14 | ) 15 | 16 | func ExampleGet_numComments() { 17 | corpus, err := godata.Get(context.Background()) 18 | if err != nil { 19 | log.Fatal(err) 20 | } 21 | num := 0 22 | corpus.GitHub().ForeachRepo(func(gr *maintner.GitHubRepo) error { 23 | return gr.ForeachIssue(func(gi *maintner.GitHubIssue) error { 24 | return gi.ForeachComment(func(*maintner.GitHubComment) error { 25 | num++ 26 | return nil 27 | }) 28 | }) 29 | }) 30 | fmt.Printf("%d GitHub comments on Go repos.\n", num) 31 | } 32 | -------------------------------------------------------------------------------- /perfdata/db/sqlite3/sqlite3.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build cgo 6 | // +build cgo 7 | 8 | // Package sqlite3 provides the sqlite3 driver for 9 | // x/build/perfdata/db. It must be imported instead of go-sqlite3 to 10 | // ensure foreign keys are properly honored. 11 | package sqlite3 12 | 13 | import ( 14 | "database/sql" 15 | 16 | sqlite3 "github.com/mattn/go-sqlite3" 17 | "golang.org/x/build/perfdata/db" 18 | ) 19 | 20 | func init() { 21 | db.RegisterOpenHook("sqlite3", func(db *sql.DB) error { 22 | db.Driver().(*sqlite3.SQLiteDriver).ConnectHook = func(c *sqlite3.SQLiteConn) error { 23 | _, err := c.Exec("PRAGMA foreign_keys = ON;", nil) 24 | return err 25 | } 26 | return nil 27 | }) 28 | } 29 | -------------------------------------------------------------------------------- /internal/task/testdata/announce-beta.txt: -------------------------------------------------------------------------------- 1 | Hello gophers, 2 | 3 | We have just released go1.19beta5, a beta version of Go 1.19. 4 | It is cut from the master branch at the revision tagged go1.19beta5. 5 | 6 | Please try your production load tests and unit tests with the new version. 7 | Your help testing these pre-release versions is invaluable. 8 | 9 | Report any problems using the issue tracker: 10 | https://go.dev/issue/new 11 | 12 | If you have Go installed already, an easy way to try go1.19beta5 13 | is by using the go command: 14 | $ go install golang.org/dl/go1.19beta5@latest 15 | $ go1.19beta5 download 16 | 17 | You can download binary and source distributions from the usual place: 18 | https://go.dev/dl/#go1.19beta5 19 | 20 | To find out what has changed in Go 1.19, read the draft release notes: 21 | https://tip.golang.org/doc/go1.19 22 | 23 | Cheers, 24 | The Go team 25 | -------------------------------------------------------------------------------- /env/linux-arm/aws/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2020 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | # Run on a arm64 or arm instance. 6 | prod-build: Dockerfile 7 | sudo docker build -t gcr.io/symbolic-datum-552/gobuilder-arm-aws:latest . 8 | 9 | # Run on a arm64 or arm instance. 10 | prod-push: prod-build 11 | sudo docker login -u oauth2accesstoken https://gcr.io 12 | sudo docker push gcr.io/symbolic-datum-552/gobuilder-arm-aws:latest 13 | sudo rm /root/.docker/config.json 14 | 15 | env-var-check: 16 | ifndef AWS_ACCESS_KEY_ID 17 | $(error AWS_ACCESS_KEY_ID env var is not set) 18 | endif 19 | 20 | ifndef AWS_SECRET_ACCESS_KEY 21 | $(error AWS_SECRET_ACCESS_KEY env var is not set) 22 | endif 23 | 24 | create-aws-image: env-var-check 25 | packer build packer_image_aws_arm.json 26 | -------------------------------------------------------------------------------- /internal/task/testdata/announce-rc.txt: -------------------------------------------------------------------------------- 1 | Hello gophers, 2 | 3 | We have just released go1.19rc6, a release candidate version of Go 1.19. 4 | It is cut from release-branch.go1.19 at the revision tagged go1.19rc6. 5 | 6 | Please try your production load tests and unit tests with the new version. 7 | Your help testing these pre-release versions is invaluable. 8 | 9 | Report any problems using the issue tracker: 10 | https://go.dev/issue/new 11 | 12 | If you have Go installed already, an easy way to try go1.19rc6 13 | is by using the go command: 14 | $ go install golang.org/dl/go1.19rc6@latest 15 | $ go1.19rc6 download 16 | 17 | You can download binary and source distributions from the usual place: 18 | https://go.dev/dl/#go1.19rc6 19 | 20 | To find out what has changed in Go 1.19, read the draft release notes: 21 | https://tip.golang.org/doc/go1.19 22 | 23 | Cheers, 24 | The Go team 25 | -------------------------------------------------------------------------------- /perfdata/query/query_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package query 6 | 7 | import ( 8 | "reflect" 9 | "testing" 10 | ) 11 | 12 | func TestSplitQueryWords(t *testing.T) { 13 | for _, test := range []struct { 14 | q string 15 | want []string 16 | }{ 17 | {"hello world", []string{"hello", "world"}}, 18 | {"hello\\ world", []string{"hello world"}}, 19 | {`"key:value two" and\ more`, []string{"key:value two", "and more"}}, 20 | {`one" two"\ three four`, []string{"one two three", "four"}}, 21 | {`"4'7\""`, []string{`4'7"`}}, 22 | } { 23 | have := SplitWords(test.q) 24 | if !reflect.DeepEqual(have, test.want) { 25 | t.Errorf("splitQueryWords(%q) = %+v, want %+v", test.q, have, test.want) 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /dashboard/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/dashboard.svg)](https://pkg.go.dev/golang.org/x/build/dashboard) 4 | 5 | # golang.org/x/build/dashboard 6 | 7 | Package dashboard contains shared configuration and logic used by various pieces of the Go continuous build system. 8 | 9 | 10 | ## Deploying 11 | 12 | When adding or removing builders, or changing a builder's build policy 13 | (which repos/branches get tested), you need to deploy the 14 | `x/build/cmd/coordinator` binary. Additionally, you usually want to 15 | re-deploy the `x/build/app/appengine` code to update 16 | https://build.golang.org/. The latter is only for humans (forcing 17 | columns to show up and adding the little black dots on cells that 18 | aren't built), but doesn't affect what gets built. 19 | -------------------------------------------------------------------------------- /internal/relui/migrations/20210909141405_create_workflows_table.up.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2021 The Go Authors. All rights reserved. 2 | -- Use of this source code is governed by a BSD-style 3 | -- license that can be found in the LICENSE file. 4 | 5 | CREATE TABLE workflows ( 6 | id uuid PRIMARY KEY, 7 | params jsonb, 8 | name text, 9 | created_at timestamp with time zone NOT NULL default current_timestamp, 10 | updated_at timestamp with time zone NOT NULL default current_timestamp 11 | ); 12 | 13 | CREATE TABLE tasks ( 14 | workflow_id uuid REFERENCES workflows (id), 15 | name text, 16 | finished bool NOT NULL DEFAULT false, 17 | result jsonb, 18 | error text, 19 | created_at timestamp with time zone NOT NULL default current_timestamp, 20 | updated_at timestamp with time zone NOT NULL default current_timestamp, 21 | PRIMARY KEY (workflow_id, name) 22 | ); 23 | -------------------------------------------------------------------------------- /internal/relui/migrations/20220621201140_add_approved_at_to_tasks.down.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2022 The Go Authors. All rights reserved. 2 | -- Use of this source code is governed by a BSD-style 3 | -- license that can be found in the LICENSE file. 4 | 5 | BEGIN; 6 | 7 | WITH approved_task_logs AS ( 8 | SELECT DISTINCT workflow_id, task_name 9 | FROM task_logs 10 | WHERE body = 'USER-APPROVED' 11 | ) 12 | 13 | INSERT 14 | INTO task_logs (workflow_id, task_name, body, created_at, updated_at) 15 | SELECT tasks.workflow_id, tasks.name, 'USER-APPROVED', tasks.approved_at, tasks.approved_at 16 | FROM tasks 17 | WHERE tasks.approved_at IS NOT NULL 18 | AND NOT EXISTS( 19 | SELECT DISTINCT 1 20 | FROM approved_task_logs atl 21 | WHERE atl.workflow_id = tasks.workflow_id 22 | AND atl.task_name = tasks.name 23 | ) 24 | ; 25 | 26 | ALTER TABLE tasks 27 | DROP COLUMN approved_at; 28 | 29 | COMMIT; 30 | -------------------------------------------------------------------------------- /vcs-test/vcweb/insecure.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux 6 | // +build linux 7 | 8 | package main 9 | 10 | import ( 11 | "net/http" 12 | "strings" 13 | ) 14 | 15 | func insecureRedirectHandler() http.Handler { 16 | return http.HandlerFunc(insecureRedirectDispatch) 17 | } 18 | 19 | func insecureRedirectDispatch(w http.ResponseWriter, r *http.Request) { 20 | if !strings.HasPrefix(r.URL.Path, "/insecure/") { 21 | http.Error(w, "path does not start with /insecure/", http.StatusInternalServerError) 22 | return 23 | } 24 | 25 | url := *r.URL 26 | url.Scheme = "http" // not "https" 27 | if url.Host == "" { 28 | url.Host = r.Host 29 | } 30 | url.Path = strings.TrimPrefix(url.Path, "/insecure") 31 | http.Redirect(w, r, url.String(), http.StatusMovedPermanently) 32 | } 33 | -------------------------------------------------------------------------------- /internal/task/testdata/announce-minor-solo.html: -------------------------------------------------------------------------------- 1 |

Hello gophers,

2 |

We have just released Go version 1.11.1, a minor point release.

3 |

This minor release includes 2 security fixes following the security policy:

4 |
    5 |
  • 6 |

    abc: security fix 1

    7 |
  • 8 |
  • 9 |

    xyz: security fix 2

    10 |
  • 11 |
12 |

View the release notes for more information:
13 | https://go.dev/doc/devel/release#go1.11.1

14 |

You can download binary and source distributions from the Go website:
15 | https://go.dev/dl/

16 |

To compile from source using a Git clone, update to the release with
17 | git checkout go1.11.1 and build as usual.

18 |

Thanks to everyone who contributed to the release.

19 |

Cheers,
20 | Alice for the Go team

21 | -------------------------------------------------------------------------------- /env/freebsd-amd64/Makefile: -------------------------------------------------------------------------------- 1 | # TODO: move all this into the xb command and use it everywhere. 2 | # For now it's expected that this is hand-tweaked per version bump. 3 | 4 | upload-staging: 5 | go install golang.org/x/build/cmd/upload 6 | upload --verbose --file=freebsd-amd64-112.tar.gz --public dev-go-builder-data/freebsd-amd64-112.tar.gz 7 | 8 | upload-prod: 9 | go install golang.org/x/build/cmd/upload 10 | upload --verbose --file=freebsd-amd64-112.tar.gz --public go-builder-data/freebsd-amd64-112.tar.gz 11 | 12 | create-image-staging: 13 | gcloud compute --project go-dashboard-dev images create freebsd-amd64-112 --source-uri gs://dev-go-builder-data/freebsd-amd64-112.tar.gz 14 | 15 | create-image-prod: 16 | gcloud compute --project symbolic-datum-552 images create freebsd-amd64-112 --source-uri gs://go-builder-data/freebsd-amd64-112.tar.gz 17 | 18 | delete-image-prod: 19 | gcloud compute --project symbolic-datum-552 images delete freebsd-amd64-112 20 | -------------------------------------------------------------------------------- /env/linux-arm/aws/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2020 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | FROM arm32v6/debian:buster 6 | 7 | ENV DEBIAN_FRONTEND noninteractive 8 | 9 | RUN apt-get update && \ 10 | apt-get install --yes \ 11 | gcc curl strace \ 12 | ca-certificates netbase \ 13 | procps lsof psmisc \ 14 | openssh-server 15 | 16 | RUN mkdir /usr/local/go-bootstrap && \ 17 | curl --silent https://storage.googleapis.com/go-builder-data/gobootstrap-linux-arm.tar.gz | \ 18 | tar -C /usr/local/go-bootstrap -zxv 19 | 20 | ENV GOROOT_BOOTSTRAP /usr/local/go-bootstrap 21 | RUN curl -o /usr/local/bin/stage0 https://storage.googleapis.com/go-builder-data/buildlet-stage0.linux-arm && \ 22 | chmod +x /usr/local/bin/stage0 23 | 24 | ENV GO_BUILDER_ENV host-linux-arm-aws 25 | 26 | CMD ["/usr/local/bin/stage0"] 27 | -------------------------------------------------------------------------------- /env/shared-makefile/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2018 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | IMAGE_NAME=$(shell basename $(CURDIR)) 6 | 7 | usage: 8 | echo "see Makefile for usage for building $(IMAGE_NAME)" 9 | 10 | docker: Dockerfile 11 | go install golang.org/x/build/cmd/xb 12 | xb docker build -t golang/$(IMAGE_NAME) . 13 | 14 | testssh: docker 15 | go install golang.org/x/build/cmd/buildlet/testssh 16 | testssh --start-image=golang/$(IMAGE_NAME) 17 | 18 | push-staging: docker 19 | go install golang.org/x/build/cmd/xb 20 | xb --staging docker tag golang/$(IMAGE_NAME) REPO/$(IMAGE_NAME):latest 21 | xb --staging docker push REPO/$(IMAGE_NAME):latest 22 | 23 | push-prod: docker 24 | go install golang.org/x/build/cmd/xb 25 | xb --prod docker tag golang/$(IMAGE_NAME) REPO/$(IMAGE_NAME):latest 26 | xb --prod docker push REPO/$(IMAGE_NAME):latest 27 | -------------------------------------------------------------------------------- /env/wasip1-wasm-wasmtime/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2023 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | IMAGE_NAME=$(shell basename $(CURDIR)) 6 | PROD_REPO=gcr.io/symbolic-datum-552 7 | 8 | usage: 9 | echo "Use prod or dev targets. For dev, specify your Docker repository with the REPO=foo argument." ; exit 1 10 | 11 | prod: Dockerfile 12 | docker build -t $(PROD_REPO)/$(IMAGE_NAME):latest --build-arg REPO=$(PROD_REPO) -f Dockerfile . 13 | 14 | pushprod: prod 15 | docker push $(PROD_REPO)/$(IMAGE_NAME):latest 16 | 17 | # You must provide a REPO=your-repo-name arg when you make 18 | # this target. REPO is the name of the Docker repository 19 | # that will be prefixed to the name of the image being built. 20 | dev: Dockerfile 21 | docker build -t $(REPO)/$(IMAGE_NAME):latest --build-arg REPO=$(REPO) -f Dockerfile . 22 | docker push $(REPO)/$(IMAGE_NAME):latest 23 | -------------------------------------------------------------------------------- /env/wasip1-wasm-wazero/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2023 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | IMAGE_NAME=$(shell basename $(CURDIR)) 6 | PROD_REPO=gcr.io/symbolic-datum-552 7 | 8 | usage: 9 | echo "Use prod or dev targets. For dev, specify your Docker repository with the REPO=foo argument." ; exit 1 10 | 11 | prod: Dockerfile 12 | docker build -t $(PROD_REPO)/$(IMAGE_NAME):latest --build-arg REPO=$(PROD_REPO) -f Dockerfile . 13 | 14 | pushprod: prod 15 | docker push $(PROD_REPO)/$(IMAGE_NAME):latest 16 | 17 | # You must provide a REPO=your-repo-name arg when you make 18 | # this target. REPO is the name of the Docker repository 19 | # that will be prefixed to the name of the image being built. 20 | dev: Dockerfile 21 | docker build -t $(REPO)/$(IMAGE_NAME):latest --build-arg REPO=$(REPO) -f Dockerfile . 22 | docker push $(REPO)/$(IMAGE_NAME):latest 23 | -------------------------------------------------------------------------------- /internal/relui/metrics_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package relui 6 | 7 | import "testing" 8 | 9 | func TestQueryName(t *testing.T) { 10 | cases := []struct { 11 | desc string 12 | query string 13 | want string 14 | }{ 15 | { 16 | desc: "named query", 17 | query: "-- name: SelectOne :one\nSELECT 1;", 18 | want: "SelectOne", 19 | }, 20 | { 21 | desc: "empty string", 22 | query: "", 23 | want: "Unknown", 24 | }, 25 | { 26 | desc: "missing name comment", 27 | query: "SELECT 1\nLIMIT 1;", 28 | want: "Unknown", 29 | }, 30 | } 31 | for _, c := range cases { 32 | t.Run(c.desc, func(t *testing.T) { 33 | got := queryName(c.query) 34 | if got != c.want { 35 | t.Errorf("queryName(%q) = %q, wanted %q", c.query, got, c.want) 36 | } 37 | }) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /internal/relui/migrations/20220901160804_create_schedules.up.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2022 The Go Authors. All rights reserved. 2 | -- Use of this source code is governed by a BSD-style 3 | -- license that can be found in the LICENSE file. 4 | 5 | CREATE TABLE schedules 6 | ( 7 | id SERIAL PRIMARY KEY, 8 | workflow_name text NOT NULL, 9 | workflow_params jsonb, 10 | spec text NOT NULL, 11 | once timestamp WITH TIME ZONE, 12 | interval_minutes int NOT NULL, 13 | created_at timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, 14 | updated_at timestamp WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP 15 | ); 16 | 17 | ALTER TABLE workflows 18 | ADD COLUMN schedule_id integer REFERENCES schedules (id); 19 | 20 | CREATE INDEX workflows_schedule_id_ix ON workflows (schedule_id) WHERE workflows.schedule_id IS NOT NULL; 21 | -------------------------------------------------------------------------------- /cmd/relui/sqlc.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | version: "2" 6 | sql: 7 | - schema: "../../internal/relui/migrations/" 8 | queries: "../../internal/relui/queries" 9 | engine: "postgresql" 10 | gen: 11 | go: 12 | package: "db" 13 | out: "../../internal/relui/db" 14 | sql_package: "pgx/v4" 15 | emit_all_enum_values: true 16 | overrides: 17 | - go_type: "database/sql.NullString" 18 | db_type: "jsonb" 19 | nullable: true 20 | - go_type: "string" 21 | db_type: "jsonb" 22 | nullable: false 23 | - column: "schedules.once" 24 | go_type: 25 | type: "time.Time" 26 | - go_type: "github.com/google/uuid.UUID" 27 | db_type: "uuid" 28 | nullable: true 29 | -------------------------------------------------------------------------------- /env/linux-ppc64le/osuosl/install-buildlet.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -x 5 | 6 | HOST_TYPE=$1 7 | if [ "$HOST_TYPE" = "" ]; then 8 | echo "Missing host type arg; this file is not supposed to be run directly; see Makefile for usage" >&2 9 | exit 2 10 | fi 11 | 12 | sudo mv .gobuildkey /etc/gobuild.key 13 | sudo install rundockerbuildlet.ppc64le /usr/local/bin/rundockerbuildlet 14 | 15 | curl -o stage0 https://storage.googleapis.com/go-builder-data/buildlet-stage0.linux-ppc64le 16 | chmod +x stage0 17 | docker build -t golang/builder . 18 | 19 | sed "s/env=XXX/env=$HOST_TYPE/" rundockerbuildlet.service > rundockerbuildlet.service.expanded 20 | sudo cp rundockerbuildlet.service.expanded /etc/systemd/user/rundockerbuildlet.service 21 | sudo systemctl enable /etc/systemd/user/rundockerbuildlet.service || true 22 | sudo systemctl daemon-reload || true 23 | sudo systemctl restart docker.service 24 | sudo systemctl restart rundockerbuildlet.service 25 | -------------------------------------------------------------------------------- /env/linux-x86-debug/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2020 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | # This is not a builder image. Rather, it's a Debian image with common 6 | # debugging tools, useful when debugging things on Container Optimized 7 | # OS VMs without external network access that can at least run docker 8 | # images from gcr.io. 9 | 10 | FROM debian:stretch 11 | MAINTAINER golang-dev 12 | 13 | ENV DEBIAN_FRONTEND noninteractive 14 | 15 | RUN apt-get update && apt-get install -y \ 16 | --no-install-recommends \ 17 | netbase \ 18 | tcpdump \ 19 | ca-certificates \ 20 | curl \ 21 | gdb \ 22 | strace \ 23 | gcc \ 24 | libc6-dev \ 25 | procps \ 26 | lsof \ 27 | psmisc \ 28 | openssh-server \ 29 | git \ 30 | iptables \ 31 | screen \ 32 | make \ 33 | && rm -rf /var/lib/apt/lists/* 34 | 35 | CMD ["/usr/bin/bash"] 36 | 37 | -------------------------------------------------------------------------------- /cmd/relui/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "lint": "npm-run-all --continue-on-error lint:js lint:css", 5 | "lint:css": "stylelint --config .stylelintrc.yaml ../../internal/relui/static/**/*.css", 6 | "lint:css-fix": "stylelint --config .stylelintrc.yaml ../../internal/relui/static/**/*.css", 7 | "lint:js": "eslint -c .eslintrc.yaml --ext .js ../../internal/relui/", 8 | "lint:js-fix": "eslint --fix -c .eslintrc.yaml --ext .js ../../internal/relui/" 9 | }, 10 | "devDependencies": { 11 | "eslint": "8.17.0", 12 | "eslint-config-google": "0.14.0", 13 | "eslint-config-prettier": "8.5.0", 14 | "eslint-plugin-prettier": "4.0.0", 15 | "npm-run-all": "4.1.5", 16 | "stylelint": "14.9.1", 17 | "stylelint-config-prettier": "9.0.3", 18 | "stylelint-config-recommended": "8.0.0", 19 | "stylelint-config-standard": "26.0.0", 20 | "stylelint-order": "5.0.0", 21 | "stylelint-prettier": "2.0.0" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /perfdata/db/schema.sql: -------------------------------------------------------------------------------- 1 | -- Copyright 2022 The Go Authors. All rights reserved. 2 | -- Use of this source code is governed by a BSD-style 3 | -- license that can be found in the LICENSE file. 4 | 5 | -- The intended production Cloud SQL schema. Committed here only as a 6 | -- form of notes (see the actual current schema in 7 | -- db.go:createTables). 8 | 9 | CREATE TABLE Uploads ( 10 | UploadId SERIAL PRIMARY KEY AUTO_INCREMENT 11 | ); 12 | CREATE TABLE Records ( 13 | UploadId BIGINT UNSIGNED, 14 | RecordId BIGINT UNSIGNED, 15 | Contents BLOB, 16 | PRIMARY KEY (UploadId, RecordId), 17 | FOREIGN KEY (UploadId) REFERENCES Uploads(UploadId) 18 | ); 19 | CREATE TABLE RecordLabels ( 20 | UploadId BIGINT UNSIGNED, 21 | RecordId BIGINT UNSIGNED, 22 | Name VARCHAR(255), 23 | Value VARCHAR(8192), 24 | INDEX (Name(100), Value(100)), 25 | FOREIGN KEY (UploadId, RecordId) REFERENCES Records(UploadId, RecordId) 26 | ); 27 | -------------------------------------------------------------------------------- /env/corellium/ios/files/org.golang.builder.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Label 6 | org.golang.builder 7 | Program 8 | /usr/bin/tmux 9 | ProgramArguments 10 | 11 | /usr/bin/tmux 12 | -C 13 | new-session 14 | /var/root/builder.sh 15 | 16 | StandardErrorPath 17 | /private/var/mobile/stderr-builder 18 | StandardOutPath 19 | /private/var/mobile/stdout-builder 20 | RunAtLoad 21 | 22 | 24 | UserName 25 | root 26 | GroupName 27 | wheel 28 | 29 | 30 | -------------------------------------------------------------------------------- /cmd/coordinator/README.md: -------------------------------------------------------------------------------- 1 | # Coordinator 2 | 3 | Building, running tests, running locally is supported on Linux and macOS only. 4 | 5 | ## Running locally in dev mode 6 | 7 | ```sh 8 | go run . -mode=dev -listen-http=localhost:8080 9 | ``` 10 | 11 | Then visit http://localhost:8080/ in your browser. 12 | 13 | Some features won't work when running in dev mode, 14 | but you should be able to navigate between the homepage, the build dashboard, 15 | the builders page, and do limited local development and testing. 16 | 17 | To test builds locally, start a `host-linux-amd64-localdev` reverse buildlet, 18 | which will run `linux-amd64` tests: 19 | 20 | ```sh 21 | go run golang.org/x/build/cmd/buildlet -halt=false -reverse-type=host-linux-amd64-localdev 22 | ``` 23 | 24 | To view/modify the "Trybot Status" page locally, visit the /try-dev endpoint. 25 | You should see a trybot status page with some example data. 26 | 27 | ## Deployment 28 | 29 | See the documentation on [deployment](../../doc/deployment.md). 30 | -------------------------------------------------------------------------------- /doc/deployment.md: -------------------------------------------------------------------------------- 1 | # Deploying services 2 | 3 | Services in x/build that are deployed to our GKE cluster all follow the same 4 | workflow. 5 | In the directories containing their `main` package should also be a Makefile 6 | that follows the process described below. 7 | 8 | ### First-time setup 9 | 10 | Install the `docker`, `kubectl`, and `gcloud` utilities. 11 | 12 | Verify that `docker run hello-world` works without `sudo`. (You may need to run 13 | `sudo adduser $USER docker`, then either log out and back in or run `newgrp 14 | docker`.) 15 | 16 | Then run: 17 | 18 | ```sh 19 | $ gcloud auth configure-docker 20 | ``` 21 | 22 | Install the App Engine Go SDK: [instructions](https://cloud.google.com/sdk/docs/quickstart-debian-ubuntu) 23 | 24 | ### Prod 25 | 26 | First, configure `gcloud`: 27 | 28 | ```sh 29 | $ gcloud config set project symbolic-datum-552 30 | $ gcloud container clusters get-credentials --zone=us-central1 services 31 | ``` 32 | 33 | Then to deploy, run: 34 | 35 | ```sh 36 | $ make deploy-prod 37 | ``` 38 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Go 2 | 3 | Go is an open source project. 4 | 5 | It is the work of hundreds of contributors. We appreciate your help! 6 | 7 | ## Filing issues 8 | 9 | When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions: 10 | 11 | 1. What version of Go are you using (`go version`)? 12 | 2. What operating system and processor architecture are you using? 13 | 3. What did you do? 14 | 4. What did you expect to see? 15 | 5. What did you see instead? 16 | 17 | General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker. 18 | The gophers there will answer or ask you to file an issue if you've tripped over a bug. 19 | 20 | ## Contributing code 21 | 22 | Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) 23 | before sending patches. 24 | 25 | Unless otherwise noted, the Go source files are distributed under 26 | the BSD-style license found in the LICENSE file. 27 | -------------------------------------------------------------------------------- /env/freebsd-amd64/buildlet: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # PROVIDE: buildlet 3 | # REQUIRE: NETWORKING DAEMON 4 | # BEFORE: LOGIN 5 | 6 | . /etc/rc.subr 7 | 8 | name=buildlet 9 | rcvar=buildlet_enable 10 | 11 | procname=/buildlet 12 | pidfile="/var/run/${name}.pid" 13 | command=/usr/sbin/daemon 14 | command_args="-r -fc -p ${pidfile}" 15 | command_args="${command_args} ${procname}" 16 | start_precmd="${name}_prestart" 17 | stop_cmd=":" 18 | 19 | load_rc_config $name 20 | : ${buildlet_enable:="NO"} 21 | 22 | buildlet_prestart() 23 | { 24 | local buildlet_url 25 | 26 | info $(netstat -rn) 27 | info $(cat /etc/resolv.conf) 28 | 29 | buildlet_url=$(/usr/local/bin/curl -s -H "Metadata-Flavor: Google" \ 30 | http://metadata.google.internal/computeMetadata/v1/instance/attributes/buildlet-binary-url) 31 | 32 | if ! /usr/local/bin/curl -o /buildlet "${buildlet_url}"; then 33 | warn "failed to download buildlet from ${buildlet_url}" 34 | poweroff 35 | return 1 36 | fi 37 | 38 | chmod a+x /buildlet 39 | } 40 | 41 | run_rc_command "$1" 42 | -------------------------------------------------------------------------------- /internal/spanlog/spanlog.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package spanlog provides span and event logger interfaces. 6 | package spanlog 7 | 8 | // SpanLogger is something that has the CreateSpan method, which 9 | // creates a event spanning some duration which will eventually be 10 | // logged and visualized. 11 | type Logger interface { 12 | // CreateSpan logs the start of an event. 13 | // optText is 0 or 1 strings. 14 | CreateSpan(event string, optText ...string) Span 15 | } 16 | 17 | // Span is a handle that can eventually be closed. 18 | // Typical usage: 19 | // 20 | // sp := sl.CreateSpan("slow_operation") 21 | // result, err := doSlowOperation() 22 | // sp.Done(err) 23 | // // do something with result, err 24 | type Span interface { 25 | // Done marks a span as done. 26 | // The err is returned unmodified for convenience at callsites. 27 | Done(err error) error 28 | } 29 | -------------------------------------------------------------------------------- /devapp/static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | Go Development Dashboard 12 |
13 | Releases
14 | Open reviews
15 | Owners
16 | Stats
17 | 
18 | About the Dashboards
19 | 
20 | These dashboards are generated by
21 | golang.org/x/build/devapp.
22 | 
23 | Issue information comes directly from GitHub.
24 | To change something about an issue here, go to GitHub.
25 | 
26 | CL information comes directly from Gerrit.
27 | To change something about a CL here, go to Gerrit.
28 | 
29 | The UI typically reflects data changes from both sources within a few tens of
30 | milliseconds.
31 | 


--------------------------------------------------------------------------------
/internal/task/template/announce-beta.md:
--------------------------------------------------------------------------------
 1 | Subject: Go {{.Version|major}} Beta {{.Version|build}} is released
 2 | 
 3 | Hello gophers,
 4 | 
 5 | We have just released {{.Version}}, a beta version of Go {{.Version|major}}.
 6 | It is cut from the master branch at the revision tagged {{.Version}}.
 7 | 
 8 | Please try your production load tests and unit tests with the new version.
 9 | Your help testing these pre-release versions is invaluable.
10 | 
11 | Report any problems using the issue tracker:
12 | https://go.dev/issue/new
13 | 
14 | If you have Go installed already, an easy way to try {{.Version}}
15 | is by using the go command:
16 | $ go install golang.org/dl/{{.Version}}@latest
17 | $ {{.Version}} download
18 | 
19 | You can download binary and source distributions from the usual place:
20 | https://go.dev/dl/#{{.Version}}
21 | 
22 | To find out what has changed in Go {{.Version|major}}, read the draft release notes:
23 | https://tip.golang.org/doc/go{{.Version|major}}
24 | 
25 | Cheers,
26 | {{with .Names}}{{join .}} for the{{else}}The{{end}} Go team
27 | 


--------------------------------------------------------------------------------
/env/corellium/android/files/clangwrap.go:
--------------------------------------------------------------------------------
 1 | // Copyright 2019 The Go Authors. All rights reserved.
 2 | // Use of this source code is governed by a BSD-style
 3 | // license that can be found in the LICENSE file.
 4 | 
 5 | package main
 6 | 
 7 | import (
 8 | 	"os"
 9 | 	"os/exec"
10 | )
11 | 
12 | func main() {
13 | 	args := os.Args[1:]
14 | 	cmd := exec.Command("clang")
15 | 	if os.Getenv("GOARCH") == "arm" {
16 | 		pref := os.Getenv("PREFIX")
17 | 		cmd.Args = append(cmd.Args, "-target", "armv7a-linux-androideabi", "-Qunused-arguments", "-Wl,-rpath-link="+pref+"/../home/arm-linux-androideabi/lib", "-L"+pref+"/../home/arm-linux-androideabi/lib", "-B"+pref+"/../home/arm-linux-androideabi/lib")
18 | 	} else {
19 | 		cmd.Args = append(cmd.Args, "-Qunused-arguments", "-fuse-ld=lld")
20 | 	}
21 | 	cmd.Args = append(cmd.Args, args...)
22 | 	cmd.Stdout = os.Stdout
23 | 	cmd.Stderr = os.Stderr
24 | 	if err := cmd.Run(); err != nil {
25 | 		if err, ok := err.(*exec.ExitError); ok {
26 | 			os.Exit(err.ExitCode())
27 | 		}
28 | 		os.Exit(1)
29 | 	}
30 | 	os.Exit(0)
31 | }
32 | 


--------------------------------------------------------------------------------
/internal/task/testdata/announce-beta.html:
--------------------------------------------------------------------------------
 1 | 

Hello gophers,

2 |

We have just released go1.19beta5, a beta version of Go 1.19.
3 | It is cut from the master branch at the revision tagged go1.19beta5.

4 |

Please try your production load tests and unit tests with the new version.
5 | Your help testing these pre-release versions is invaluable.

6 |

Report any problems using the issue tracker:
7 | https://go.dev/issue/new

8 |

If you have Go installed already, an easy way to try go1.19beta5
9 | is by using the go command:
10 | $ go install golang.org/dl/go1.19beta5@latest
11 | $ go1.19beta5 download

12 |

You can download binary and source distributions from the usual place:
13 | https://go.dev/dl/#go1.19beta5

14 |

To find out what has changed in Go 1.19, read the draft release notes:
15 | https://tip.golang.org/doc/go1.19

16 |

Cheers,
17 | The Go team

18 | -------------------------------------------------------------------------------- /internal/task/testdata/announce-rc.html: -------------------------------------------------------------------------------- 1 |

Hello gophers,

2 |

We have just released go1.19rc6, a release candidate version of Go 1.19.
3 | It is cut from release-branch.go1.19 at the revision tagged go1.19rc6.

4 |

Please try your production load tests and unit tests with the new version.
5 | Your help testing these pre-release versions is invaluable.

6 |

Report any problems using the issue tracker:
7 | https://go.dev/issue/new

8 |

If you have Go installed already, an easy way to try go1.19rc6
9 | is by using the go command:
10 | $ go install golang.org/dl/go1.19rc6@latest
11 | $ go1.19rc6 download

12 |

You can download binary and source distributions from the usual place:
13 | https://go.dev/dl/#go1.19rc6

14 |

To find out what has changed in Go 1.19, read the draft release notes:
15 | https://tip.golang.org/doc/go1.19

16 |

Cheers,
17 | The Go team

18 | -------------------------------------------------------------------------------- /cmd/greplogs/xdg.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package main 6 | 7 | import ( 8 | "os" 9 | "os/user" 10 | "path/filepath" 11 | "runtime" 12 | ) 13 | 14 | // xdgCacheDir returns the XDG Base Directory Specification cache 15 | // directory. 16 | func xdgCacheDir() string { 17 | cache := os.Getenv("XDG_CACHE_HOME") 18 | if cache == "" { 19 | home := os.Getenv("HOME") 20 | if home == "" { 21 | u, err := user.Current() 22 | if err != nil { 23 | home = u.HomeDir 24 | } 25 | } 26 | // Not XDG but standard for OS X. 27 | if runtime.GOOS == "darwin" { 28 | return filepath.Join(home, "Library/Caches") 29 | } 30 | cache = filepath.Join(home, ".cache") 31 | } 32 | return cache 33 | } 34 | 35 | // xdgCreateDir creates a directory and its parents in accordance with 36 | // the XDG Base Directory Specification. 37 | func xdgCreateDir(path string) error { 38 | return os.MkdirAll(path, 0700) 39 | } 40 | -------------------------------------------------------------------------------- /internal/coordinator/schedule/span_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux || darwin 6 | // +build linux darwin 7 | 8 | package schedule 9 | 10 | import ( 11 | "testing" 12 | ) 13 | 14 | type fakeEventTimeLogger struct { 15 | event string 16 | optText []string 17 | } 18 | 19 | func (l *fakeEventTimeLogger) LogEventTime(event string, optText ...string) { 20 | l.event = event 21 | l.optText = optText 22 | } 23 | 24 | func TestSpan(t *testing.T) { 25 | l := &fakeEventTimeLogger{} 26 | event := "log_event" 27 | s := CreateSpan(l, event, "a", "b", "c") 28 | if err := s.Done(nil); err != nil { 29 | t.Fatalf("Span.Done() = %s; want no error", err) 30 | } 31 | if l.event != "finish_"+event { 32 | t.Errorf("EventTimeLogger.event = %q, want %q", l.event, "finish_"+event) 33 | } 34 | if len(l.optText) == 0 { 35 | t.Errorf("EventTimeLogger.optText = %+v; want entries", l.optText) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /cmd/fetchlogs/xdg.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package main 6 | 7 | import ( 8 | "os" 9 | "os/user" 10 | "path/filepath" 11 | "runtime" 12 | ) 13 | 14 | // xdgCacheDir returns the XDG Base Directory Specification cache 15 | // directory. 16 | func xdgCacheDir() string { 17 | cache := os.Getenv("XDG_CACHE_HOME") 18 | if cache == "" { 19 | home := os.Getenv("HOME") 20 | if home == "" { 21 | u, err := user.Current() 22 | if err != nil { 23 | home = u.HomeDir 24 | } 25 | } 26 | // Not XDG but standard for OS X. 27 | if runtime.GOOS == "darwin" { 28 | return filepath.Join(home, "Library/Caches") 29 | } 30 | cache = filepath.Join(home, ".cache") 31 | } 32 | return cache 33 | } 34 | 35 | // xdgCreateDir creates a directory and its parents in accordance with 36 | // the XDG Base Directory Specification. 37 | func xdgCreateDir(path string) error { 38 | return os.MkdirAll(path, 0700) 39 | } 40 | -------------------------------------------------------------------------------- /env/android-amd64-emu/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2018 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | IMAGE_NAME=$(shell basename $(CURDIR)) 6 | 7 | usage: 8 | echo "see Makefile for usage for building $(IMAGE_NAME)" 9 | 10 | docker: Dockerfile 11 | go install golang.org/x/build/cmd/xb 12 | xb docker build -t golang/$(IMAGE_NAME) . 13 | 14 | push-staging: docker 15 | go install golang.org/x/build/cmd/xb 16 | $(eval REV := $(shell docker images --format={{.ID}} golang/android-amd64-emu:latest)) 17 | xb --staging docker tag golang/$(IMAGE_NAME) REPO/$(IMAGE_NAME):$(REV) 18 | xb --staging docker push REPO/$(IMAGE_NAME):$(REV) 19 | 20 | push-prod: docker 21 | go install golang.org/x/build/cmd/xb 22 | $(eval REV := $(shell docker images --format={{.ID}} golang/android-amd64-emu:latest)) 23 | xb --prod docker tag golang/$(IMAGE_NAME) REPO/$(IMAGE_NAME):$(REV) 24 | xb --prod docker push REPO/$(IMAGE_NAME):$(REV) 25 | 26 | vm-prod: push-prod 27 | ./create-vm.sh 28 | -------------------------------------------------------------------------------- /internal/task/template/announce-rc.md: -------------------------------------------------------------------------------- 1 | Subject: Go {{.Version|major}} Release Candidate {{.Version|build}} is released 2 | 3 | Hello gophers, 4 | 5 | We have just released {{.Version}}, a release candidate version of Go {{.Version|major}}. 6 | It is cut from release-branch.go{{.Version|major}} at the revision tagged {{.Version}}. 7 | 8 | Please try your production load tests and unit tests with the new version. 9 | Your help testing these pre-release versions is invaluable. 10 | 11 | Report any problems using the issue tracker: 12 | https://go.dev/issue/new 13 | 14 | If you have Go installed already, an easy way to try {{.Version}} 15 | is by using the go command: 16 | $ go install golang.org/dl/{{.Version}}@latest 17 | $ {{.Version}} download 18 | 19 | You can download binary and source distributions from the usual place: 20 | https://go.dev/dl/#{{.Version}} 21 | 22 | To find out what has changed in Go {{.Version|major}}, read the draft release notes: 23 | https://tip.golang.org/doc/go{{.Version|major}} 24 | 25 | Cheers, 26 | {{with .Names}}{{join .}} for the{{else}}The{{end}} Go team 27 | -------------------------------------------------------------------------------- /cmd/buildlet/stage0/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | FROM golang:1.19 AS build 6 | LABEL maintainer="golang-dev@googlegroups.com" 7 | 8 | RUN mkdir /gocache 9 | ENV GOCACHE /gocache 10 | 11 | COPY go.mod /go/src/golang.org/x/build/go.mod 12 | COPY go.sum /go/src/golang.org/x/build/go.sum 13 | 14 | WORKDIR /go/src/golang.org/x/build 15 | 16 | # Optimization for iterative docker build speed, not necessary for correctness: 17 | # TODO: write a tool to make writing Go module-friendly Dockerfiles easier. 18 | RUN go install cloud.google.com/go/compute/metadata 19 | 20 | COPY . /go/src/golang.org/x/build/ 21 | 22 | # Install binary to /go/bin/stage0 23 | RUN go install golang.org/x/build/cmd/buildlet/stage0 24 | RUN CGO_ENABLED=0 go build -o /go/bin/stage0.static golang.org/x/build/cmd/buildlet/stage0 25 | 26 | FROM golang:1.19 27 | COPY --from=build /go/bin/stage0 /go/bin/stage0 28 | COPY --from=build /go/bin/stage0.static /go/bin/stage0.static 29 | -------------------------------------------------------------------------------- /devapp/release_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package main 6 | 7 | import "testing" 8 | 9 | func TestTitleDir(t *testing.T) { 10 | testcases := []struct { 11 | title string 12 | dirs []string 13 | }{ 14 | {"no title dir", nil}, 15 | {" cmd/compile , cmd/go: do awesome things", []string{"cmd/compile", "cmd/go"}}, 16 | {"cmd/compile: cleanup MOVaddr code generation", []string{"cmd/compile"}}, 17 | {`cmd/asm, cmd/internal/obj/s390x, math: add "test under mask" instructions`, 18 | []string{"cmd/asm", "cmd/internal/obj/s390x", "math"}}, 19 | } 20 | for _, tc := range testcases { 21 | r := titleDirs(tc.title) 22 | if len(r) != len(tc.dirs) { 23 | t.Fatalf("titleDirs(%q) = %v (%d); want %d length", tc.title, r, len(r), len(tc.dirs)) 24 | } 25 | for i := range tc.dirs { 26 | if r[i] != tc.dirs[i] { 27 | t.Errorf("titleDirs[%d](%v) != tc.dirs[%d](%q)", i, r[i], i, tc.dirs[i]) 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /env/js-wasm-node18/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | IMAGE_NAME=$(shell basename $(CURDIR)) 6 | PROD_REPO=gcr.io/symbolic-datum-552 7 | 8 | usage: 9 | echo "Use prod or dev targets. For dev, specify your Docker repository with the REPO=foo argument." ; exit 1 10 | 11 | prod: Dockerfile 12 | sed 's|{{REPO}}|'"$(PROD_REPO)"'|g' Dockerfile > Dockerfile.make 13 | docker build -t $(PROD_REPO)/$(IMAGE_NAME):latest -f Dockerfile.make . 14 | 15 | pushprod: prod 16 | docker push $(PROD_REPO)/$(IMAGE_NAME):latest 17 | rm Dockerfile.make 18 | 19 | # You must provide a REPO=your-repo-name arg when you make 20 | # this target. REPO is the name of the Docker repository 21 | # that will be prefixed to the name of the image being built. 22 | dev: Dockerfile 23 | sed 's|{{REPO}}|'"$(REPO)"'|g' Dockerfile > Dockerfile.make 24 | docker build -t $(REPO)/$(IMAGE_NAME):latest -f Dockerfile.make . 25 | docker push $(REPO)/$(IMAGE_NAME):latest 26 | rm Dockerfile.make 27 | -------------------------------------------------------------------------------- /env/netbsd-386/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2018 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | RELEASE=9.3 6 | ARCH=i386 7 | 8 | VM_IMAGE_FILE=vm-image-netbsd-${ARCH}-${RELEASE}.tar.gz 9 | VM_IMAGE_NAME=netbsd-${ARCH}-$(subst .,-,$(RELEASE)) 10 | 11 | 12 | upload-staging: 13 | go install golang.org/x/build/cmd/upload 14 | upload --verbose --file=${VM_IMAGE_FILE} --public dev-go-builder-data/${VM_IMAGE_FILE} 15 | 16 | upload-prod: 17 | go install golang.org/x/build/cmd/upload 18 | upload --verbose --file=${VM_IMAGE_FILE} --public go-builder-data/${VM_IMAGE_FILE} 19 | 20 | create-image-staging: 21 | gcloud compute --project go-dashboard-dev images create ${VM_IMAGE_NAME} --source-uri gs://dev-go-builder-data/${VM_IMAGE_FILE} 22 | 23 | create-image-prod: 24 | gcloud compute --project symbolic-datum-552 images create ${VM_IMAGE_NAME} --source-uri gs://go-builder-data/${VM_IMAGE_FILE} 25 | 26 | clean: 27 | rm -rf netbsd-*.tar.gz vm-image-netbsd-*.tar.gz work-NetBSD-* anita-*.tar.gz anita-*/ 28 | -------------------------------------------------------------------------------- /env/netbsd-amd64/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | RELEASE=9.3 6 | ARCH=amd64 7 | 8 | VM_IMAGE_FILE=vm-image-netbsd-${ARCH}-${RELEASE}.tar.gz 9 | VM_IMAGE_NAME=netbsd-${ARCH}-$(subst .,-,$(RELEASE)) 10 | 11 | 12 | upload-staging: 13 | go install golang.org/x/build/cmd/upload 14 | upload --verbose --file=${VM_IMAGE_FILE} --public dev-go-builder-data/${VM_IMAGE_FILE} 15 | 16 | upload-prod: 17 | go install golang.org/x/build/cmd/upload 18 | upload --verbose --file=${VM_IMAGE_FILE} --public go-builder-data/${VM_IMAGE_FILE} 19 | 20 | create-image-staging: 21 | gcloud compute --project go-dashboard-dev images create ${VM_IMAGE_NAME} --source-uri gs://dev-go-builder-data/${VM_IMAGE_FILE} 22 | 23 | create-image-prod: 24 | gcloud compute --project symbolic-datum-552 images create ${VM_IMAGE_NAME} --source-uri gs://go-builder-data/${VM_IMAGE_FILE} 25 | 26 | clean: 27 | rm -rf netbsd-*.tar.gz vm-image-netbsd-*.tar.gz work-NetBSD-* anita-*.tar.gz anita-*/ 28 | -------------------------------------------------------------------------------- /internal/internal_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package internal 6 | 7 | import ( 8 | "context" 9 | "testing" 10 | "time" 11 | ) 12 | 13 | func TestPeriodicallyDo(t *testing.T) { 14 | ctx, cancel := context.WithCancel(context.Background()) 15 | defer cancel() 16 | 17 | didWork := make(chan time.Time, 2) 18 | done := make(chan interface{}) 19 | go func() { 20 | PeriodicallyDo(ctx, time.Millisecond, func(ctx context.Context, t time.Time) { 21 | select { 22 | case didWork <- t: 23 | case <-ctx.Done(): 24 | } 25 | }) 26 | close(done) 27 | }() 28 | select { 29 | case <-time.After(5 * time.Second): 30 | t.Error("PeriodicallyDo() never called f, wanted at least one call") 31 | case <-didWork: 32 | // PeriodicallyDo called f successfully. 33 | } 34 | select { 35 | case <-done: 36 | t.Errorf("PeriodicallyDo() finished early, wanted it to still be looping") 37 | case <-didWork: 38 | cancel() 39 | } 40 | <-done 41 | } 42 | -------------------------------------------------------------------------------- /env/linux-ppc64/osuosl/sid-image/build-sid.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -ex 2 | # Copyright 2022 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | 6 | export rootfs=$(pwd)/debian_sid 7 | if [ ! -e "$rootfs" ]; then 8 | ( 9 | sudo -E sh -c 'debootstrap --variant=minbase --keyring=/usr/share/keyrings/debian-ports-archive-keyring.gpg --include debian-ports-archive-keyring sid $rootfs https://deb.debian.org/debian-ports' 10 | cd "$rootfs" 11 | sudo rm -rf var/log/{dpkg,bootstrap,alternatives}.log var/cache/ldconfig/aux-cache var/cache/apt/* var/lib/apt/lists/* dev/* proc/* sys/* 12 | ) 13 | else 14 | echo "skipping debootstrap" 15 | fi 16 | 17 | cat > Dockerfile.sid <<'EOF' 18 | FROM scratch 19 | COPY ./debian_sid/ / 20 | CMD ["/bin/bash"] 21 | EOF 22 | 23 | # always build with buildkit :) 24 | export DOCKER_BUILDKIT=1 25 | sudo -E docker build -f Dockerfile.sid -t murp/debian:sid-ppc64 . 26 | sudo docker run -it --rm murp/debian:sid-ppc64 cat /etc/os-release 27 | -------------------------------------------------------------------------------- /env/dragonfly-amd64/README: -------------------------------------------------------------------------------- 1 | The Makefile in this directory creates a Google Compute Engine VM image to run the Go 2 | DragonflyBSD builder, booting up to run the buildlet. 3 | 4 | make must be run on a Linux box with qemu and a few additional packages: 5 | 6 | apt-get install qemu-system-x86 qemu-utils expect genisoimage 7 | 8 | To override the default Dragonfly version, set V= on the make command line: 9 | 10 | make V=600 11 | 12 | To add new Dragonfly versions, add lines to the "Database" in the Makefile 13 | and perhaps change the V= line to update the default. 14 | 15 | make upload-prod 16 | 17 | builds and uploads the image. To replace an existing image, use 18 | 19 | make delete-prod upload-prod 20 | 21 | s/prod/staging/ to test in the staging cluster instead. 22 | 23 | The VM needs to be run with the GCE metadata attribute "buildlet-binary-url" set to a URL 24 | of the DragonflyBSD buildlet (cross-compiled, typically). 25 | 26 | buildlet-binary-url == http://storage.googleapis.com/go-builder-data/buildlet.dragonfly-amd64 27 | 28 | The buildlet rc script is lightly modified from ../freebsd-amd64. 29 | -------------------------------------------------------------------------------- /cmd/buildlet/stage0/stage0_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package main 6 | 7 | import ( 8 | "io" 9 | "log" 10 | "os" 11 | 12 | "github.com/tarm/serial" 13 | ) 14 | 15 | func init() { 16 | configureSerialLogOutput = configureSerialLogOutputWindows 17 | closeSerialLogOutput = closeSerialLogOutputWindows 18 | } 19 | 20 | var com1 *serial.Port 21 | 22 | func configureSerialLogOutputWindows() { 23 | c := &serial.Config{Name: "COM1", Baud: 9600} 24 | var err error 25 | com1, err = serial.OpenPort(c) 26 | if err != nil { 27 | // Oh well, we tried. This empirically works 28 | // on Windows on GCE. 29 | // We can log here anyway and hope somebody sees it 30 | // in a GUI console: 31 | log.Printf("serial.OpenPort: %v", err) 32 | return 33 | } 34 | log.SetOutput(io.MultiWriter(com1, os.Stderr)) 35 | } 36 | 37 | func closeSerialLogOutputWindows() { 38 | if com1 != nil { 39 | com1.Close() 40 | com1 = nil 41 | log.SetOutput(os.Stderr) 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /env/linux-x86-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | # Alpine Linux builder 6 | # Docker tag gcr.io/go-dashboard-dev/linux-x86-alpine (staging) 7 | # and gcr.io/symbolic-datum-552/linux-x86-alpine (prod) 8 | 9 | FROM golang/buildlet-stage0 AS stage0 10 | 11 | FROM alpine:3.16 12 | MAINTAINER golang-dev 13 | 14 | RUN apk add --no-cache \ 15 | bash \ 16 | binutils \ 17 | build-base \ 18 | ca-certificates \ 19 | curl \ 20 | gcc \ 21 | gdb \ 22 | gfortran \ 23 | git \ 24 | go \ 25 | libc-dev \ 26 | lsof \ 27 | make \ 28 | openssh \ 29 | procps \ 30 | strace 31 | 32 | RUN ssh-keygen -A 33 | RUN bash -c "(echo ChallengeResponseAuthentication no; echo PasswordAuthentication no; echo PermitRootLogin yes) > /etc/ssh/sshd_config" 34 | RUN bash -c "passwd -u root || true" # might already be unlocked 35 | 36 | COPY --from=stage0 /go/bin/stage0.static /usr/local/bin/stage0 37 | 38 | ENV GOROOT_BOOTSTRAP=/usr/lib/go 39 | 40 | CMD ["/usr/local/bin/stage0"] 41 | -------------------------------------------------------------------------------- /env/freebsd-amd64/README: -------------------------------------------------------------------------------- 1 | make.bash creates a Google Compute Engine VM image to run the Go 2 | FreeBSD builder, booting up to run the buildlet. 3 | 4 | make.bash should be run on a Linux box with qemu and a few additional packages. 5 | on ubuntu 20.04: 6 | apt-get install qemu-system-x86 qemu-utils expect genisoimage 7 | 8 | After it completes, it creates a file freebsd-amd64-gce101.tar.gz 9 | 10 | Then: 11 | gsutil cp -a public-read freebsd-amd64-103.tar.gz gs://go-builder-data/freebsd-amd64-103.tar.gz 12 | Or just use the web UI at: 13 | https://console.developers.google.com/project/symbolic-datum-552/storage/browser/go-builder-data/ 14 | 15 | Then: 16 | gcloud compute --project symbolic-datum-552 images delete freebsd-amd64-103 17 | gcloud compute --project symbolic-datum-552 images create freebsd-amd64-103 --source-uri gs://go-builder-data/freebsd-amd64-103.tar.gz 18 | 19 | The VM needs to be run with the GCE metadata attribute "buildlet-binary-url" set to a URL 20 | of the FreeBSD buildlet (cross-compiled, typically). 21 | 22 | buildlet-binary-url == http://storage.googleapis.com/go-builder-data/buildlet.freebsd-amd64 23 | -------------------------------------------------------------------------------- /env/linux-x86-fedora/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2019 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | FROM golang/buildlet-stage0 AS stage0 6 | 7 | FROM fedora:30 8 | MAINTAINER golang-dev 9 | 10 | RUN yum -y update && yum -y install \ 11 | ca-certificates \ 12 | findutils \ 13 | gcc \ 14 | glibc-static \ 15 | patch \ 16 | strace \ 17 | which \ 18 | openssh-server \ 19 | make \ 20 | && true 21 | 22 | RUN ssh-keygen -A 23 | 24 | RUN mkdir -p /goboot-amd64 \ 25 | && ( \ 26 | curl --silent https://storage.googleapis.com/golang/go1.13.4.linux-amd64.tar.gz | tar -C /goboot-amd64 -zxv \ 27 | ) \ 28 | && mv /goboot-amd64/go /goboot \ 29 | && rm -rf /goboot-amd64 \ 30 | && rm -rf /goboot/pkg/linux_amd64_race \ 31 | /goboot/api \ 32 | /goboot/blog \ 33 | /goboot/doc \ 34 | /goboot/misc \ 35 | /goboot/test \ 36 | && find /goboot -type d -name testdata | xargs rm -rf 37 | 38 | COPY --from=stage0 /go/bin/stage0 /usr/local/bin/stage0 39 | 40 | CMD ["/usr/local/bin/stage0"] 41 | -------------------------------------------------------------------------------- /env/linux-ppc64/osuosl/buildlet-image/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2019 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | # build locally from debian-sid.sh 6 | FROM murp/debian:sid-ppc64 7 | 8 | ENV DEBIAN_FRONTEND noninteractive 9 | 10 | RUN apt-get update && \ 11 | apt-get install --yes \ 12 | gcc curl strace \ 13 | ca-certificates netbase \ 14 | procps lsof psmisc \ 15 | libc6-dev gdb \ 16 | openssh-server 17 | 18 | RUN mkdir /usr/local/go-bootstrap && \ 19 | curl --silent https://storage.googleapis.com/go-builder-data/gobootstrap-linux-ppc64.tar.gz | \ 20 | tar -C /usr/local/go-bootstrap -zxv 21 | 22 | ENV GOROOT_BOOTSTRAP /usr/local/go-bootstrap 23 | RUN curl -o /usr/local/bin/stage0 https://storage.googleapis.com/go-builder-data/buildlet-stage0.linux-ppc64 && \ 24 | chmod +x /usr/local/bin/stage0 25 | 26 | ENV GO_BUILDER_ENV host-linux-ppc64-osu 27 | 28 | ENV GO_BUILD_KEY_DELETE_AFTER_READ true 29 | ENV GO_BUILD_KEY_PATH /buildkey/gobuildkey 30 | 31 | CMD ["/usr/local/bin/stage0"] 32 | -------------------------------------------------------------------------------- /maintner/maintwatch/maintwatch.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // The maintwatch commands tails the maintner mutation log. 6 | package main 7 | 8 | import ( 9 | "context" 10 | "flag" 11 | "fmt" 12 | "log" 13 | "os" 14 | "time" 15 | 16 | "github.com/golang/protobuf/proto" 17 | "golang.org/x/build/maintner" 18 | "golang.org/x/build/maintner/godata" 19 | ) 20 | 21 | var server = flag.String("server", godata.Server, "maintner server's /logs URL") 22 | 23 | func main() { 24 | flag.Parse() 25 | 26 | tm := proto.TextMarshaler{Compact: false} 27 | for { 28 | err := maintner.TailNetworkMutationSource(context.Background(), *server, func(e maintner.MutationStreamEvent) error { 29 | if e.Err != nil { 30 | log.Printf("# ignoring err: %v\n", e.Err) 31 | time.Sleep(5 * time.Second) 32 | return nil 33 | } 34 | fmt.Println() 35 | tm.Marshal(os.Stdout, e.Mutation) 36 | return nil 37 | }) 38 | log.Printf("tail error: %v; restarting\n", err) 39 | time.Sleep(time.Second) 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /maintner/maintnerd/gcslog/gcslog_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package gcslog 6 | 7 | import ( 8 | "context" 9 | "testing" 10 | "time" 11 | 12 | "golang.org/x/build/maintner/maintpb" 13 | ) 14 | 15 | func TestGCSLogWakeup_Timeout(t *testing.T) { 16 | testGCSLogWakeup(t, false) 17 | } 18 | 19 | func TestGCSLogWakeup_Activity(t *testing.T) { 20 | testGCSLogWakeup(t, true) 21 | } 22 | 23 | func testGCSLogWakeup(t *testing.T, activity bool) { 24 | gl := newGCSLogBase() 25 | waitc := make(chan bool, 1) 26 | ctx, cancel := context.WithTimeout(context.Background(), 500*time.Millisecond) 27 | defer cancel() 28 | go func() { 29 | waitc <- gl.waitSizeNot(ctx, 0) 30 | }() 31 | if activity { 32 | if err := gl.Log(new(maintpb.Mutation)); err != nil { 33 | t.Fatal(err) 34 | } 35 | } 36 | select { 37 | case got := <-waitc: 38 | if got != activity { 39 | t.Errorf("changed = %v; want %v", got, activity) 40 | } 41 | case <-time.After(2 * time.Second): 42 | t.Errorf("timeout") 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /perfdata/fs/gcs/gcs.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package gcs implements the fs.FS interface using Google Cloud Storage. 6 | package gcs 7 | 8 | import ( 9 | "context" 10 | 11 | "cloud.google.com/go/storage" 12 | "golang.org/x/build/perfdata/fs" 13 | ) 14 | 15 | // impl is an fs.FS backed by Google Cloud Storage. 16 | type impl struct { 17 | bucket *storage.BucketHandle 18 | } 19 | 20 | // NewFS constructs an FS that writes to the provided bucket. 21 | // On AppEngine, ctx must be a request-derived Context. 22 | func NewFS(ctx context.Context, bucketName string) (fs.FS, error) { 23 | client, err := storage.NewClient(ctx) 24 | if err != nil { 25 | return nil, err 26 | } 27 | return &impl{client.Bucket(bucketName)}, nil 28 | } 29 | 30 | func (fs *impl) NewWriter(ctx context.Context, name string, metadata map[string]string) (fs.Writer, error) { 31 | w := fs.bucket.Object(name).NewWriter(ctx) 32 | // TODO(quentin): Do these need "x-goog-meta-" prefixes? 33 | w.Metadata = metadata 34 | return w, nil 35 | } 36 | -------------------------------------------------------------------------------- /env/linux-arm/aws/README.md: -------------------------------------------------------------------------------- 1 | # AWS Linux ARM Builder 2 | 3 | ## Machines 4 | 5 | The AWS builders use the m6 instance types which are arm64 based machines of varying specifications. 6 | The base type used will be m6g.xlarge 4 vCPUs, 16384 MiB. 7 | 8 | ## Machine Image 9 | 10 | Machine images are stored on AWS EBS service as a snapshot. New VMs can use the snapshot as an image 11 | by providing the AMI ID as the base image when a new VM is created. The machine image will be configured 12 | to install and initialize rundockerbuildlet. 13 | 14 | ## Buildlet Container Image 15 | 16 | Buildlet container images must be build on an arm/arm64 instance with the proper credentials. The instructions 17 | are as follows: 18 | 19 | * In your normal gcloud dev environment, retrieve a short-lived access token: 20 | 21 | `you@dev:~$ gcloud auth print-access-token` 22 | 23 | * On an arm64 instance, clone the build repository. 24 | 25 | * cd into the `env/linux-arm/aws` directory. 26 | 27 | * Execute: `make prod-push` 28 | 29 | * When prompted for your password, paste in the access token from the first step. 30 | 31 | * Ensure `/root/.docker/config.json` has been deleted. 32 | -------------------------------------------------------------------------------- /env/openbsd-amd64/README: -------------------------------------------------------------------------------- 1 | make.bash creates a Google Compute Engine VM image to run the Go 2 | OpenBSD builder, booting up to run the buildlet. 3 | 4 | make.bash should be run on a Linux box with expect and qemu. 5 | Debian packages: expect qemu-utils qemu-system-x86 growisofs genisoimage. 6 | VERSION=7.2 ARCH=amd64 ./make.bash 7 | 8 | After it completes, it creates a file openbsd-${VERSION}-${ARCH}-gce.tar.gz 9 | 10 | Then: 11 | gsutil cp -a public-read openbsd-7.2-amd64-gce.tar.gz gs://go-builder-data/openbsd-amd64-72.tar.gz 12 | Or just use the web UI at: 13 | https://console.developers.google.com/project/symbolic-datum-552/storage/browser/go-builder-data/ 14 | 15 | Then: 16 | gcloud compute --project symbolic-datum-552 images delete openbsd-amd64-72 17 | gcloud compute --project symbolic-datum-552 images create openbsd-amd64-72 --source-uri gs://go-builder-data/openbsd-amd64-72.tar.gz 18 | 19 | The VM needs to be run with the GCE metadata attribute "buildlet-binary-url" set to a URL 20 | of the OpenBSD buildlet (cross-compiled, typically). 21 | 22 | buildlet-binary-url == https://storage.googleapis.com/go-builder-data/buildlet.openbsd-amd64 23 | -------------------------------------------------------------------------------- /cmd/coordinator/deployment-staging.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | apiVersion: apps/v1 6 | kind: Deployment 7 | metadata: 8 | name: coordinator-deployment 9 | spec: 10 | selector: 11 | matchLabels: 12 | app: coordinator 13 | template: 14 | metadata: 15 | labels: 16 | app: coordinator 17 | annotations: 18 | container.seccomp.security.alpha.kubernetes.io/coordinator: docker/default 19 | container.apparmor.security.beta.kubernetes.io/coordinator: runtime/default 20 | spec: 21 | containers: 22 | - name: coordinator 23 | image: gcr.io/go-dashboard-dev/coordinator:latest 24 | imagePullPolicy: Always 25 | command: ["/coordinator"] 26 | ports: 27 | - containerPort: 80 28 | - containerPort: 443 29 | - containerPort: 2222 # ssh proxy port 30 | resources: 31 | requests: 32 | cpu: "2" 33 | memory: "4Gi" 34 | limits: 35 | cpu: "3" 36 | memory: "6Gi" 37 | -------------------------------------------------------------------------------- /internal/task/releaselet/releaselet_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package main 6 | 7 | import ( 8 | "io/ioutil" 9 | "strings" 10 | "testing" 11 | ) 12 | 13 | func TestSplitVersion(t *testing.T) { 14 | // Test splitVersion. 15 | for _, tt := range []struct { 16 | v string 17 | minor, patch int 18 | }{ 19 | {"go1", 0, 0}, 20 | {"go1.34", 34, 0}, 21 | {"go1.34.7", 34, 7}, 22 | } { 23 | minor, patch := splitVersion(tt.v) 24 | if minor != tt.minor || patch != tt.patch { 25 | t.Errorf("splitVersion(%q) = %v, %v; want %v, %v", 26 | tt.v, minor, patch, tt.minor, tt.patch) 27 | } 28 | } 29 | } 30 | 31 | func TestSingleFile(t *testing.T) { 32 | files, err := ioutil.ReadDir(".") 33 | if err != nil { 34 | t.Fatal(err) 35 | } 36 | for _, f := range files { 37 | if f.Name() == "releaselet.go" || 38 | f.Name() == "README.md" || 39 | strings.HasSuffix(f.Name(), "_test.go") { 40 | continue 41 | } 42 | t.Errorf("releaselet should be a single file, found %v", f.Name()) 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /cmd/coordinator/module-proxy-service.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | apiVersion: v1 6 | kind: Service 7 | metadata: 8 | namespace: prod 9 | name: proxygolang-proxy 10 | annotations: 11 | cloud.google.com/load-balancer-type: "Internal" 12 | spec: 13 | type: NodePort 14 | ports: 15 | - name: proxygolang-proxy 16 | port: 8123 17 | targetPort: 8123 18 | nodePort: 30157 19 | protocol: TCP 20 | selector: 21 | app: coordinator 22 | 23 | # TODO(bradfitz): migrate (destroy & recreate) symbolic-datum-552 to get it off legacy networking 24 | # so we can use an internal LoadBalancer with a static internal IP instead, and then: 25 | # 26 | #spec: 27 | # type: LoadBalancer 28 | # loadBalancerIP: "10.240.0.we-cant-do-this-because-symbolic-datum-552-is-using-legacy-networking" 29 | # loadBalancerSourceRanges: 30 | # - "10.0.0.0/8" 31 | # ports: 32 | # - port: 8123 33 | # targetPort: 8123 34 | # selector: 35 | # app: coordinator 36 | # 37 | # ... and update the 30157 in coordinator to be 8123. 38 | -------------------------------------------------------------------------------- /env/corellium/ios/files/arwrap.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build ignore 6 | // +build ignore 7 | 8 | // The arhost binary is a wrapper for llvm-ar, designed to be called by 9 | // cmd/link. The -extar flag is not enough because llvm-ar and ar don't 10 | // use the same flags. 11 | // 12 | // It is useful when the standard ar is broken, such as on self-hosted 13 | // iOS. 14 | package main 15 | 16 | import ( 17 | "os" 18 | "os/exec" 19 | ) 20 | 21 | func main() { 22 | args := os.Args[1:] 23 | // cmd/link invokes ar with -q -c -s. Replace with 24 | // just q. 25 | for i := len(args) - 1; i >= 0; i-- { 26 | switch args[i] { 27 | case "-q": 28 | args[i] = "q" 29 | case "-c", "-s": 30 | args = append(args[:i], args[i+1:]...) 31 | } 32 | } 33 | cmd := exec.Command("llvm-ar", args...) 34 | cmd.Stdout = os.Stdout 35 | cmd.Stderr = os.Stderr 36 | if err := cmd.Run(); err != nil { 37 | if err, ok := err.(*exec.ExitError); ok { 38 | os.Exit(err.ExitCode()) 39 | } 40 | os.Exit(1) 41 | } 42 | os.Exit(0) 43 | } 44 | -------------------------------------------------------------------------------- /perfdata/query/query.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package query provides tools for parsing a query. 6 | package query 7 | 8 | // SplitWords splits q into words using shell syntax (whitespace 9 | // can be escaped with double quotes or with a backslash). 10 | func SplitWords(q string) []string { 11 | var words []string 12 | word := make([]byte, len(q)) 13 | w := 0 14 | quoting := false 15 | for r := 0; r < len(q); r++ { 16 | switch c := q[r]; { 17 | case c == '"' && quoting: 18 | quoting = false 19 | case quoting: 20 | if c == '\\' { 21 | r++ 22 | } 23 | if r < len(q) { 24 | word[w] = q[r] 25 | w++ 26 | } 27 | case c == '"': 28 | quoting = true 29 | case c == ' ', c == '\t': 30 | if w > 0 { 31 | words = append(words, string(word[:w])) 32 | } 33 | w = 0 34 | case c == '\\': 35 | r++ 36 | fallthrough 37 | default: 38 | if r < len(q) { 39 | word[w] = q[r] 40 | w++ 41 | } 42 | } 43 | } 44 | if w > 0 { 45 | words = append(words, string(word[:w])) 46 | } 47 | return words 48 | } 49 | -------------------------------------------------------------------------------- /env/linux-ppc64le/osuosl/setup-remote.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright 2022 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | 6 | 7 | # See Makefile for usage 8 | 9 | set -e 10 | 11 | USER_AT_HOST=$1 12 | if [ "$USER_AT_HOST" = "" ]; then 13 | echo "Missing user@host arg; see Makefile for usage" >&2 14 | exit 2 15 | fi 16 | HOST_TYPE=$2 17 | if [ "$HOST_TYPE" = "" ]; then 18 | echo "Missing host type arg; see Makefile for usage" >&2 19 | exit 2 20 | fi 21 | 22 | GOARCH=ppc64le GOOS=linux go build -o rundockerbuildlet.ppc64le golang.org/x/build/cmd/rundockerbuildlet 23 | 24 | rsync -e "ssh -i ~/.ssh/id_ed25519_golang1" -avPW ./ $USER_AT_HOST:./ 25 | scp -i ~/.ssh/id_ed25519_golang1 $HOME/keys/${HOST_TYPE}.buildkey $USER_AT_HOST:.gobuildkey 26 | 27 | # Install Docker, including adding our username to the "docker" group: 28 | ssh -i ~/.ssh/id_ed25519_golang1 $USER_AT_HOST ./install-docker.bash 29 | 30 | # Now that we have Docker, "log in" again (with access to the docker 31 | # group) and do the rest: 32 | ssh -i ~/.ssh/id_ed25519_golang1 $USER_AT_HOST ./install-buildlet.bash $HOST_TYPE 33 | -------------------------------------------------------------------------------- /perf/app/index.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package app 6 | 7 | import ( 8 | _ "embed" 9 | "log" 10 | "net/http" 11 | 12 | "github.com/google/safehtml/template" 13 | "golang.org/x/build/perfdata" 14 | ) 15 | 16 | // index redirects / to /search. 17 | func (a *App) index(w http.ResponseWriter, r *http.Request) { 18 | ctx := r.Context() 19 | 20 | t, err := template.New("index.html").ParseFS(tmplFS, "template/index.html") 21 | if err != nil { 22 | http.Error(w, err.Error(), 500) 23 | return 24 | } 25 | 26 | var uploads []perfdata.UploadInfo 27 | ul := a.StorageClient.ListUploads(ctx, "", []string{"by", "upload-time"}, 16) 28 | defer ul.Close() 29 | for ul.Next() { 30 | uploads = append(uploads, ul.Info()) 31 | } 32 | if err := ul.Err(); err != nil { 33 | log.Printf("failed to fetch recent uploads: %v", err) 34 | } 35 | 36 | w.Header().Set("Content-Type", "text/html; charset=utf-8") 37 | if err := t.Execute(w, struct{ RecentUploads []perfdata.UploadInfo }{uploads}); err != nil { 38 | http.Error(w, err.Error(), 500) 39 | return 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /perf/app/parse_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package app 6 | 7 | import ( 8 | "reflect" 9 | "testing" 10 | ) 11 | 12 | func TestParseQueryString(t *testing.T) { 13 | tests := []struct { 14 | q string 15 | wantPrefix string 16 | wantParts []string 17 | }{ 18 | {"prefix | one vs two", "prefix", []string{"one", "two"}}, 19 | {"prefix one vs two", "", []string{"prefix one", "two"}}, 20 | {"anything else", "", []string{"anything else"}}, 21 | {`one vs "two vs three"`, "", []string{"one", `"two vs three"`}}, 22 | {"mixed\ttabs \"and\tspaces\"", "", []string{"mixed tabs \"and\tspaces\""}}, 23 | } 24 | for _, test := range tests { 25 | t.Run(test.q, func(t *testing.T) { 26 | havePrefix, haveParts := parseQueryString(test.q) 27 | if havePrefix != test.wantPrefix { 28 | t.Errorf("parseQueryString returned prefix %q, want %q", havePrefix, test.wantPrefix) 29 | } 30 | if !reflect.DeepEqual(haveParts, test.wantParts) { 31 | t.Errorf("parseQueryString returned parts %#v, want %#v", haveParts, test.wantParts) 32 | } 33 | }) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /vcs-test/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | MUTABLE_VERSION ?= latest 6 | VERSION ?= $(shell git rev-parse --short HEAD) 7 | 8 | IMAGE_PROD := gcr.io/symbolic-datum-552/vcs-test 9 | IMAGE_PROD_APACHE := gcr.io/symbolic-datum-552/vcs-test-apache 10 | 11 | docker-prod: Dockerfile Dockerfile.apache 12 | docker build --force-rm -f Dockerfile --tag=$(IMAGE_PROD):$(VERSION) ../ 13 | docker tag $(IMAGE_PROD):$(VERSION) $(IMAGE_PROD):$(MUTABLE_VERSION) 14 | docker build --force-rm -f Dockerfile.apache --tag=$(IMAGE_PROD_APACHE):$(VERSION) ../ 15 | docker tag $(IMAGE_PROD_APACHE):$(VERSION) $(IMAGE_PROD_APACHE):$(MUTABLE_VERSION) 16 | 17 | push-prod: docker-prod 18 | docker push $(IMAGE_PROD):$(VERSION) 19 | docker push $(IMAGE_PROD):$(MUTABLE_VERSION) 20 | docker push $(IMAGE_PROD_APACHE):$(VERSION) 21 | docker push $(IMAGE_PROD_APACHE):$(MUTABLE_VERSION) 22 | 23 | 24 | deploy-prod: push-prod 25 | go install golang.org/x/build/cmd/xb 26 | xb --prod kubectl --namespace prod set image deployment/vcs-test-deployment vcs-test=$(IMAGE_PROD):$(VERSION) apache=$(IMAGE_PROD_APACHE):$(VERSION) 27 | -------------------------------------------------------------------------------- /devapp/deployment-staging.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | apiVersion: apps/v1 6 | kind: Deployment 7 | metadata: 8 | name: devapp-deployment 9 | spec: 10 | replicas: 2 11 | selector: 12 | matchLabels: 13 | app: devapp 14 | template: 15 | metadata: 16 | labels: 17 | app: devapp 18 | annotations: 19 | container.seccomp.security.alpha.kubernetes.io/devapp: docker/default 20 | container.apparmor.security.beta.kubernetes.io/devapp: runtime/default 21 | spec: 22 | containers: 23 | - name: devapp 24 | image: gcr.io/go-dashboard-dev/devapp:latest 25 | imagePullPolicy: Always 26 | command: ["/devapp", "-listen=:80", "-autocert-bucket=golang-devapp-dev-autocert"] 27 | readinessProbe: 28 | httpGet: 29 | path: /healthz 30 | port: 80 31 | ports: 32 | - containerPort: 80 33 | - containerPort: 443 34 | resources: 35 | requests: 36 | cpu: "1" 37 | memory: "2Gi" 38 | limits: 39 | memory: "4Gi" 40 | -------------------------------------------------------------------------------- /cmd/coordinator/queues_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.16 && (linux || darwin) 6 | // +build go1.16 7 | // +build linux darwin 8 | 9 | package main 10 | 11 | import ( 12 | "testing" 13 | "time" 14 | ) 15 | 16 | func TestHumanDuration(t *testing.T) { 17 | cases := []struct { 18 | desc string 19 | duration string 20 | want string 21 | }{ 22 | { 23 | desc: "format days", 24 | duration: "99h2m1s", 25 | want: "4d3h2m1s", 26 | }, 27 | { 28 | desc: "handle tiny durations", 29 | duration: "1ns", 30 | want: "0s", 31 | }, 32 | { 33 | desc: "handle seconds", 34 | duration: "3s", 35 | want: "3s", 36 | }, 37 | } 38 | for _, c := range cases { 39 | t.Run(c.duration, func(t *testing.T) { 40 | d, err := time.ParseDuration(c.duration) 41 | if err != nil { 42 | t.Fatalf("time.ParseDuration(%q) = %q, %q, wanted no error", c.duration, d, err) 43 | } 44 | if got := humanDuration(d); got != c.want { 45 | t.Errorf("humanDuration(%v) = %q, wanted %q", d, got, c.want) 46 | } 47 | }) 48 | } 49 | } 50 | --------------------------------------------------------------------------------