Граф коммитов

265 Коммитов

Автор SHA1 Сообщение Дата
Heschi Kreinick 62bee91588 internal/relui: add a step to wait for signing
For the moment, signing will be run out-of-band with the release
process. Add a step that waits for it to complete.

Because our signing process is rough around the edges there are a lot of
subtleties to deal with: we don't produce signatures for zip files,
files only appear in /signed/ if they were modified by the signing
process, etc. Most inconveniently, the .pkg files are produced by the
signing process, which doesn't fit the model I was going for and
requires them to be injected at signing time.

For golang/go#51797.

Change-Id: I6d0b5ffe8b75f4a0d66de3f059d166c843cd0209
Reviewed-on: https://go-review.googlesource.com/c/build/+/410014
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Heschi Kreinick <heschi@google.com>
Auto-Submit: Heschi Kreinick <heschi@google.com>
2022-06-03 19:03:25 +00:00
Dmitri Shuralyov d0865bb9b7 internal/releasetargets: update linux-{386,amd64} builders to buster
We've updated the Linux builders used during Go releases from
Debian 8 "Jessie" to Debian 9 "Stretch" in time for Go 1.16,
since Jessie support had already ended on June 30, 2020 and
wasn't suitable for the lifetime of Go 1.16.

We're in a similar position now, where Debian 9 "Stretch" LTS
support is ending on June 30, 2022, before Go 1.19's anticipated
release date. Update the selected builder to Debian 10 "Buster",
whose LTS support keeps going until June 2024 and should cover
the expected lifespan of Go 1.19 better.

This is easy to do thanks to the builder already being added
as of CL 267937.

For golang/go#40561.
Updates golang/go#42410.

Change-Id: I06b43e1cdd66996852ed19a1cc928eff29d09c86
Reviewed-on: https://go-review.googlesource.com/c/build/+/410094
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2022-06-02 15:51:52 +00:00
Carlos Amedee e8c8ca12ab all: add license headers
This change adds license headers to files which are missing them.
A modified version of the addlicense tool was used to add these headers:
https://github.com/google/addlicense

The command issued was:
addlicense -c "Go Authors" -l bsd *

Change-Id: Id6fd17c587f99b3ff0ef5f5f35befcfe5aaeef72
Reviewed-on: https://go-review.googlesource.com/c/build/+/409614
Run-TryBot: Carlos Amedee <carlos@golang.org>
Auto-Submit: Carlos Amedee <carlos@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Alex Rakoczy <alex@golang.org>
2022-06-01 18:19:15 +00:00
Heschi Kreinick 757f53580f gerrit, internal/task: add Gerrit-related release tasks
I refactored out the Gerrit-related code from MailDLCL, and added
support for waiting for submit and creating tags.

No test for creating tags but that logic has virtually nothing to it so
I think I'm okay with it?

For golang/go#51797.

Change-Id: Ia8c24536bbee27e0b7bef04769ac5a81dc3021ab
Reviewed-on: https://go-review.googlesource.com/c/build/+/408674
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Alex Rakoczy <alex@golang.org>
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2022-06-01 17:59:54 +00:00
Heschi Kreinick 94632bfcf0 internal/task: add milestone tasks
Add tasks that match releasebot's checkReleaseBlockers and pushIssues.
They use a mix of GitHub's REST and GraphQL APIs so that we don't need
to use maintner, which looked like a headache.

For golang/go#51797.

Change-Id: I108df115950698ee016b6cbdb3395afc9e0bf844
Reviewed-on: https://go-review.googlesource.com/c/build/+/408295
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Heschi Kreinick <heschi@google.com>
Auto-Submit: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2022-05-27 21:59:41 +00:00
Carlos Amedee cf01afa3a2 cmd/coordinator, internal/coordinator/remote: add gomote instances to status
This adds the gomote instances to the status page presented at
farmer.golang.org.

Updates golang/go#52594
For golang/go#47521

Change-Id: I29c73262031fc95cc85cdb43734da49149c958b3
Reviewed-on: https://go-review.googlesource.com/c/build/+/405258
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Carlos Amedee <carlos@golang.org>
Auto-Submit: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Alex Rakoczy <alex@golang.org>
2022-05-16 21:37:30 +00:00
Carlos Amedee 19a23aa34d cmd/coordinator, internal/coordinator/remote: move post handlers
This change moves the SSH handlers into the internal packages. It also
adds the handler which will use the session pool instead of the remote
buildlets.

Updates golang/go#52594
For golang/go#47521

Change-Id: I7e99fdbb16e0f80a871696cec79a9b638354e662
Reviewed-on: https://go-review.googlesource.com/c/build/+/405257
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Carlos Amedee <carlos@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Carlos Amedee <carlos@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2022-05-16 21:15:30 +00:00
Carlos Amedee 2e386bff8e internal/coordinator/remote: add certificate authentication to server
This change adds OpenSSH certificate authentication to the SSH Server.
The change also:
- Moves the public key authentication logic into the remote package.
- Enables a chain of authentication methods such that both public
  key authentication and certificate authentication are used.
- Usees a dynamically created CA certificate for certificate
  authentication. Each time the server is started, a new certificate
  is created.

Fixes golang/go#52594
For golang/go#47521

Change-Id: I8198d436b53844357af01510dcf8f2fc67af83b4
Reviewed-on: https://go-review.googlesource.com/c/build/+/405256
Auto-Submit: Carlos Amedee <carlos@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Alex Rakoczy <alex@golang.org>
Run-TryBot: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-05-16 18:02:02 +00:00
Carlos Amedee 77cbab5d67 cmd/coordinator, internal/coordinator/remote: move SSH to internal
This change refactors the SSH Server used by the coordinator. Portions
of the server have been moved into the internal/coordinator/remote
package and are being prepared for the addition of a different
authentication scheme.

Updates golang/go#52594
For golang/go#47521

Change-Id: Ib1e961ea6d27c861f787068d237a02a47b6b0a2c
Reviewed-on: https://go-review.googlesource.com/c/build/+/405255
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: Carlos Amedee <carlos@golang.org>
Reviewed-by: Alex Rakoczy <alex@golang.org>
Auto-Submit: Carlos Amedee <carlos@golang.org>
2022-05-16 17:52:00 +00:00
Dmitri Shuralyov 7413a137a5 cmd/coordinator: consolidate and increase global VM deletion timeout
We had a lot of flexibility over timeouts, making their maintenance
harder. Consolidate it to a single timeout in the pool package, and
modify it from 45 minutes to 2 hours.

There's room for improvement in how we maintain this timeout,
but I'm leaving that for future work (with a tracking issue).

Fixes golang/go#52591.
Updates golang/go#52929.
Updates golang/go#49666.
Updates golang/go#42699.

Change-Id: I2ad92648d89a714397bd8b0e1ec490fc9f6d6790
Reviewed-on: https://go-review.googlesource.com/c/build/+/406216
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2022-05-16 16:01:33 +00:00
Dmitri Shuralyov acd0c19ac9 cmd/coordinator: give reverse buildlets 20 seconds during health check
Some reverse builders may be further away geographically, so waiting
only 5 seconds (a time chosen in 2015) before concluding the buildlet
is unhealthy seems short. Give them a bit more time to accommodate for
round-trip network trip and processing latency.

Change-Id: I707c430538b2f19115e9b9dd78ec6aaeb64c4270
Reviewed-on: https://go-review.googlesource.com/c/build/+/406215
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2022-05-16 15:59:03 +00:00
Dmitri Shuralyov dd8f4a3179 cmd/coordinator: drop bookkeeping for old revdial v1 buildlets
By now there are no reverse builders that still use revdial v1,
all are version 23 or newer (where revdial v2 support is added).

Most of the code was dropped in 2019 (in CL 208598),
this CL deletes some remaining obsolete bookkeeping.

Updates golang/go#31639.

Change-Id: Icedd48f9342ea88287c5d580f085785c57846a65
Reviewed-on: https://go-review.googlesource.com/c/build/+/406214
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2022-05-16 15:58:30 +00:00
Dmitri Shuralyov 764449ac1b internal/workflow: report better parameter name mismatch error
Sometimes the number of parameters matches, but their names don't.
Report that with a descriptive error rather than a nil pointer
dereference panic.

Change-Id: Ic19fa4b85d3580b9ed8575dc6e227fb146c2ecfa
Reviewed-on: https://go-review.googlesource.com/c/build/+/406414
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
2022-05-16 14:43:38 +00:00
Heschi Kreinick 30b481ba9b internal/relui: use string slice for skips
We support string slices now. Use them instead of a janky
space-separated list.

For golang/go#51797.

Change-Id: Id2c090412443239c8e1e10563dac694ff2869b2d
Reviewed-on: https://go-review.googlesource.com/c/build/+/406020
Auto-Submit: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2022-05-16 14:27:15 +00:00
Heschi Kreinick 968c455fce all: turn up new Mac Minis as their own host type
The new minis are the official darwin arm64 builders. Split them out
into a new host type, add monitoring, and remove existing deps on the
toothrot builders. We honor them for their service.

Fixes golang/go#49149.

Change-Id: I8e4e6aa336e2acbd6812e25aa6a929aaa50a12f8
Reviewed-on: https://go-review.googlesource.com/c/build/+/406021
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-05-13 19:53:35 +00:00
Heschi Kreinick 8b52ccdce0 cmd/relui: miscellaneous fixes
I hadn't tested the GCS write path and it was missing its Sub method.
Also, Sub doesn't like trailing slashes, so the staging URLs can't have
them. And finally I flubbed the staging path -- should start with the
version, not the workflow ID.

For golang/go#51797.

Change-Id: I636000c50aa8b7e227671101f8d20f90d1aa2c43
Reviewed-on: https://go-review.googlesource.com/c/build/+/406018
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-05-13 18:06:39 +00:00
Carlos Amedee 37c398c51e internal/gomote: moves logic to server from client
These changes are being made in an attempt to move logic from the
client to the server.
- Changes the function which extracts the object name from a URL.
- Moves setting the environment variables to the server in ExecuteCommand endpoint.

For golang/go#47521
Updates golang/go#48742

Change-Id: I4fa370a1b3c949bd5913491d1650d131577ff30f
Reviewed-on: https://go-review.googlesource.com/c/build/+/406014
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: Carlos Amedee <carlos@golang.org>
Auto-Submit: Carlos Amedee <carlos@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-05-12 21:57:45 +00:00
Heschi Kreinick bbfc067ccf internal/relui: add an integration test for release building
Adds an integration test. The test uses a fake HTTP server to serve the
fake source archive and bootstrap Go. Fake buildlets run locally in temp
directories, but otherwise act mostly like real ones, running real
commands and reading/writing real tar files. Each step produces a dummy output
that can be used for subsequent steps or verified at the end of the
test.

This is more of a smoke test than an exhaustive check of every detail.
Still, it's a lot better than running the workflow against live
buildlets for incremental development.

I had some vague ideas of recording the execution log for each buildlet
into a golden file, but after trying it out I think that it's not worth
it. There really are only 2-3 commands per target. For now I left the
code in case I change my mind.

In the process of writing the test I realized that all the filenames
were wrong, so fix those up.

For golang/go#51797.

Change-Id: Ie3cc8e335047faa8b50bd05ecc0deddaceb55f71
Reviewed-on: https://go-review.googlesource.com/c/build/+/403057
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
2022-05-12 21:55:26 +00:00
Heschi Kreinick f57d3bd3ad internal/relui: add GCS and staging support
Plumb through the FS implementations we can use to store scratch files
and stage binaries for signing. Use it to do both, replacing the prior
WorkingFiles interface.

Includes some enhancements to the OS fs implementation, reflecting the
fact that it's more of a test fake for the GCS fs than standalone. In
particular, directories are implicitly created.

Introduce an artifact type, used to track the data we'll eventually need
to register it with the web server. This changes slightly in the next CL.

For golang/go#51797.

Change-Id: Iebf53eb43587f5311e428c319d2f3b44aea9fa97
Reviewed-on: https://go-review.googlesource.com/c/build/+/403056
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-05-12 21:55:05 +00:00
Heschi Kreinick 4c4b95a29d cmd/relui: add build release workflow
Adds the core of the build release workflow to relui. We build
artifacts and run tests.

Adds the necessary dependencies, currently just the coordinator client,
to relui's main function. The filesystem stuff will be replaced in the
next CL.

For golang/go#51797.

Change-Id: I4eea478d026b08540ac3bb48a684a545d862de6c
Reviewed-on: https://go-review.googlesource.com/c/build/+/398694
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Alex Rakoczy <alex@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-05-12 21:54:39 +00:00
Carlos Amedee 4aa4d2eff7 internal/gomote: add object name to UploadFile endpoint
This change adds the object name as one of the fields returned to the
caller. The object name is not included in the URL. The object name is
required for any subsequent calls needed to pass the file along to the
gomote instances.

For golang/go#47521
Updates golang/go#48742

Change-Id: I5437ab2029907460806f2f3b6a19f6dec22115da
Reviewed-on: https://go-review.googlesource.com/c/build/+/405535
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Carlos Amedee <carlos@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Run-TryBot: Carlos Amedee <carlos@golang.org>
2022-05-11 18:12:58 +00:00
Dmitri Shuralyov adda295572 cmd/relui: add mail-dl-cl workflow
Previously, this task was exposed only via the cmd/releasebot CLI.
Now that relui workflows support slice of string parameters,
it's easy to expose this task via a relui workflow too.

This is another step in having relui do more release work.

For golang/go#40279.

Change-Id: Icf94e49ac8124ffb77a78b80c65c477d6b43bf05
Reviewed-on: https://go-review.googlesource.com/c/build/+/404535
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2022-05-11 14:30:26 +00:00
Dmitri Shuralyov fb638e1ffb internal/relui, internal/workflow: add parameter type support
Previously, it was only possible to create workflow parameters
with the implicit "string" type hard-coded. Some workflows we're
creating either require or will benefit from more flexibility
in parameter types (slices of strings, single-line vs multi-line
strings, and so on). It was also not yet possible to associate
metadata to parameters (such as documentation, example values).

This change implements that flexibility for workflow parameters,
and uses it to better document the existing Twitter workflows.
The next change will add a workflow that uses new slice types.

For simplicity and clarity reasons, all parameter information
is contained in one place in the workflow.Parameter struct,
including some fields that control the HTML presentation of
said parameters, instead of trying to factor out HTML bits
into the relui package and creating a bridge between the two.

Also type check in more stages of the workflow processing.

For golang/go#47405.
Fixes golang/go#51191.

Change-Id: Ia805b3b355e65fcbf2397ad21800da448ccb826a
Reviewed-on: https://go-review.googlesource.com/c/build/+/404454
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-05-11 14:29:43 +00:00
Carlos Amedee 5d48fa5aa7 internal/gomote: fix flaky TestWriteFileFromURL test
This change fixes a flaky test introduced in CL 397596.
The test was unnecessarily downloading a file from the go.dev site.
It was also not providing enough data to fix the issue when the test
failed.

Fixes golang/go#52671

Change-Id: Ie42501c197395538376debd510cfb993d697401d
Reviewed-on: https://go-review.googlesource.com/c/build/+/405516
Run-TryBot: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Auto-Submit: Carlos Amedee <carlos@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
2022-05-10 21:07:59 +00:00
Heschi Kreinick 50c5a26773 internal/gcsfs: create
gcsfs is an io.FS implementation on top of GCS, with a bit of write
support added. I anticipate this being useful for writing relui tasks.

For testing purposes, also includes a copy of os.DirFS with write
support added.

For golang/go#51797.

Change-Id: I294aac481857126dad9071158b2329f6d9a3805a
Reviewed-on: https://go-review.googlesource.com/c/build/+/394360
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Alex Rakoczy <alex@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Peter Weinberger <pjw@google.com>
2022-04-28 19:50:25 +00:00
Dmitri Shuralyov b002d65edb cmd/relui: redirect to base URL after creating a workflow
Also update the suggested command in README to serve over HTTP locally.
(This is needed now that relui uses x/build/internal/https for serving.)

Fixes golang/go#51466.

Change-Id: Iaf0e0b62f3cd6015c793a0a16cff895be5ea42b4
Reviewed-on: https://go-review.googlesource.com/c/build/+/401796
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-04-22 21:07:38 +00:00
Heschi Kreinick 5b682a0ba8 internal/task: fix bugs in release tasks
Various mistakes I made along the way.

For golang/go#51797.
Fixes golang/go#52335.

Change-Id: Id9b000ddf7ca867774c06bd6f5b790e14cff7e66
Reviewed-on: https://go-review.googlesource.com/c/build/+/399158
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Alex Rakoczy <alex@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-04-21 17:37:35 +00:00
Heschi Kreinick 8afe78de13 all: extract build steps to internal/task
Refactor the release build steps out into the tasks package, and use
them in cmd/release.

Very little has changed in the build steps code; I reorganized the
functions and renamed buildletWrapper to BuildletStep.

For golang/go#51797.

Change-Id: If3c8416533dc99616abb9f87dd5398d03bbfbcc2
Reviewed-on: https://go-review.googlesource.com/c/build/+/398498
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Alex Rakoczy <alex@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-04-21 17:37:27 +00:00
Heschi Kreinick 08e4e3477f cmd/release: continue refactoring build code
Add buildletWrapper, a clumsily-named utility type that combines some
common code used to run commands on the buildlet during the release
process.

One functional change here is setting environment variables only where I
think that they're necessary. Notably, we no longer set GOROOT and
GOBIN, and GOROOT_FINAL is only set while doing the first build. GOPATH
is set everywhere because otherwise it'd conflict with the toolchain
dir.

For golang/go#51797.

Change-Id: Ib222d15f49dc84672d43fbb34d492a75a6baaa39
Reviewed-on: https://go-review.googlesource.com/c/build/+/396554
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Alex Rakoczy <alex@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-04-21 17:37:16 +00:00
Heschi Kreinick 3aa850ebd8 cmd/release: move flag uses to main
As a step toward splitting cmd/release up into reusable functions, move
many flag uses to the main function. More later.

For golang/go#51797.

Change-Id: Ied7a24b432090b0dacb59184bfb4dff0035ef94a
Reviewed-on: https://go-review.googlesource.com/c/build/+/396437
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Alex Rakoczy <alex@golang.org>
2022-04-21 17:37:08 +00:00
Heschi Kreinick e8b6a73ffd cmd/release: move extra CFLAGS into releasetargets
We only need the one value for now, but it seems like it's going to
stick around. Rather than special-casing it, move it into the release
targets where it can be tracked along with the rest of the target
configuration.

For golang/go#51797.

Change-Id: I01f1f11bac3e0ea9a91ac4efc541e596004ea7d5
Reviewed-on: https://go-review.googlesource.com/c/build/+/395536
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Alex Rakoczy <alex@golang.org>
2022-04-21 17:36:35 +00:00
Heschi Kreinick 3f9de2b7dd internal/releasetargets: create
We duplicate a list of release targets between cmd/releasebot and
cmd/release. The format of the latter is, to me, unpleasant to deal
with. This is an attempt at a better one, more information-dense and
less error-prone.

AFAIK, the only thing that really matters is what builder we should use
to issue the next release in each series. Reproducibility of prior
releases is not so important, especially because when we change builders
mid-stream it's usually involuntary. So, rather than supporting the
full-fledged and quite complicated GoQuery syntax, simply have an entry
per live release series.

Make the minimal changes to integrate the new package into cmd/release
and cmd/releasebot.

For golang/go#51797.

Change-Id: Ic48b1cdd751fb4ea5e2acad8f1898b48faa30cd9
Reviewed-on: https://go-review.googlesource.com/c/build/+/387714
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Alex Rakoczy <alex@golang.org>
2022-04-21 17:36:12 +00:00
Carlos Amedee 2897e139f2 internal/gomote, internal/gomote/protos: add ReadTGZToURL endpoint
This change adds the ReadTGZToURL endpoint implementation. This tars and
zips the directory requested on the gomote instance and uploads it to
GCS. A signed URL is returned which the caller can use to download the file.

For golang/go#47521
Updates golang/go#48742

Change-Id: I5e9574994810b804acb4b9ed9e6bdda68ea26713
Reviewed-on: https://go-review.googlesource.com/c/build/+/397598
Run-TryBot: Carlos Amedee <carlos@golang.org>
Auto-Submit: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2022-04-12 20:18:53 +00:00
Russ Cox 993f2c6f22 all: gofmt
Gofmt to update doc comments to the new formatting.

For golang/go#51082.

Change-Id: Ie063c2fd890641b551c0f304fee5fa19121f1b38
Reviewed-on: https://go-review.googlesource.com/c/build/+/399555
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-04-12 02:01:23 +00:00
Carlos Amedee 86acb69200 internal/gomote: enable downloads from GCS bucket in WriteTGZFromURL
This change enables downloads from the gomote transfer GCS bucket for
gomote instances that do not have permission to read from that bucket.
Any URL that is passed in for that bucket will have a signed URL
created for it and that will be passed on to the gomote instance.

For golang/go#47521
Updates golang/go#48742

Change-Id: I5874efd1349f4154aea58677c734653b18cd88c9
Reviewed-on: https://go-review.googlesource.com/c/build/+/397597
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Carlos Amedee <amedee@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Run-TryBot: Carlos Amedee <carlos@golang.org>
Auto-Submit: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-04-11 18:20:27 +00:00
Russ Cox edb8d45861 internal/task: gofmt expected output in test
For golang/go#51082.

Change-Id: I069f5ed6141beb20cbf49c6e9f78ea2454effc15
Reviewed-on: https://go-review.googlesource.com/c/build/+/399556
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2022-04-11 17:52:46 +00:00
Carlos Amedee 39aa6936b9 internal/gomote, internal/gomote/protos: implement write files from URL
This change adds the implementation for the WriteFileFromURL endpoint.
The caller will be able to add the contents of an HTTP get call to a
file on the gomote instance. They must set the permissions on the
file. Files located on the gomote transfer GCS bucket will be
retrieved using the GCS storage package and authentication vs a
vanilla HTTP call.

For golang/go#47521
Updates golang/go#48742

Change-Id: If9ac24654352433c7a073de08017213223cf9020
Reviewed-on: https://go-review.googlesource.com/c/build/+/397596
Reviewed-by: Heschi Kreinick <heschi@google.com>
Trust: Carlos Amedee <carlos@golang.org>
Run-TryBot: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-04-08 18:21:42 +00:00
Michael Pratt 58bb2c5bab influx: move shared constants to common package
For golang/go#48803.

Change-Id: Ie7875a79eea75af5a1dd1681fb43d80c74f8226a
Reviewed-on: https://go-review.googlesource.com/c/build/+/399037
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Trust: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-04-08 17:02:43 +00:00
Carlos Amedee fc95939c36 internal/gomote, internal/gomote/protos: add the upload file endpoint
This change adds the upload file endpoint which will be used by the
gomote clients to upload files to GCS before they are retrieved by a
gomote instance. The endpoint generates a signed URL and associated
fields which must be used in the upload.

For golang/go#47521
Updates golang/go#48742

Change-Id: Id85a55b41b8211b3aae8c2e30245a0b71ecfa238
Reviewed-on: https://go-review.googlesource.com/c/build/+/397595
Trust: Carlos Amedee <carlos@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2022-04-08 15:06:21 +00:00
Dmitri Shuralyov 4c1179cb00 all: regenerate READMEs
Generated with go run update-readmes.go.

Also capitalize the word "Package" in 3 package comments
and update releaselet test not to fail on README.md file.

Change-Id: I031b15ec570dd089b1931b79dcb1f8e6694e7e62
Reviewed-on: https://go-review.googlesource.com/c/build/+/394520
Reviewed-by: Carlos Amedee <carlos@golang.org>
Trust: Carlos Amedee <carlos@golang.org>
Trust: Emmanuel Odeke <emmanuel@orijtech.com>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-04-05 15:02:20 +00:00
Filippo Valsorda 27fe37aa0e devapp/owners: list the security and vulndb team in owners
Change-Id: Id46361455a6315a3547e5e9ce86aae8f4fbd5614
Reviewed-on: https://go-review.googlesource.com/c/build/+/373364
Run-TryBot: Filippo Valsorda <filippo@golang.org>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Trust: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-03-30 20:54:40 +00:00
Michael Anthony Knyszek fc96089fad perf,perfdata: copy perf[data].golang.org code from x/perf
This change re-homes the code for perf.golang.org and
perfdata.golang.org (available in x/perf/analysis and x/perf/storage
respectively) to x/build to avoid any issues with backwards
compatibility. We're much more lax about the Go 1 compatibility promise
in x/build than in other x/ repos (except maybe x/exp) so we can make
bigger changes. Also, we may re-home these services to live closer to
the rest of the build infrastructure, so co-locating the code also makes
sense.

The code was taken from golang.org/x/perf (or go.googlesource.com/perf)
at git hash 64dc439b20aef7259bd73a5452063060adb8d898, or CL 392658.

In order to make this work, we also copy the internal diff and basedir
packages from x/perf.

There are a few things these depend on that we have to leave behind. One
is x/perf/benchstat, which means we also leave behind
x/perf/storage/benchfmt, which it depends on. Both are OK because they
have new and shiny replacements that we'd rather use anyway.

This change also involved running a bunch of sed commands to update
package import paths as well as comments. The full diff is included in
the commit for review, but will be removed before landing.

For golang/go#48803.

Change-Id: Ib15840c15254bc8bfa266bbc82e1df7cf4c252db
Reviewed-on: https://go-review.googlesource.com/c/build/+/395175
Reviewed-by: Michael Pratt <mpratt@google.com>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-03-24 21:33:20 +00:00
Carlos Amedee 862e04a161 internal/gomote, internal/coordinator/remote: add the sign SSH key endpoint implementation
This change adds the implementation for the sign SSH key endpoint.
The endpoint accepts a public SSH key and signs it with the gomote
server's certificate authority. The certificate added to the public
key will be used to validate if the certificate authority was used
to sign the certificate. It will also be used to determine if
the requestor has rights to initiate and SSH session with the
gomote instance being requested. This is part of a shift to
OpenSSH certificate authentication in the gomote SSH server.

For golang/go#47521
Updates golang/go#48742

Change-Id: I427b34c7f006ae20f5643322dc0754bf7a82e5f1
Reviewed-on: https://go-review.googlesource.com/c/build/+/391516
Trust: Carlos Amedee <carlos@golang.org>
Run-TryBot: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2022-03-21 20:49:56 +00:00
Carlos Amedee 289767d327 internal/gomote, buildlet: add execute command implementation
This change adds the implementation for the execute command endpoint.
This enables the caller to execute a command on the gomote instance.
The output from the command will stream back to the caller if requested.

This change also adds helper functions that retrieve the session from
the session pool and the buildlet client.

For golang/go#47521
Updates golang/go#48742

Change-Id: Iec1853667992b5674b07be5e972ac145a6349fca
Reviewed-on: https://go-review.googlesource.com/c/build/+/382494
Trust: Carlos Amedee <carlos@golang.org>
Run-TryBot: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Alex Rakoczy <alex@golang.org>
2022-03-21 13:55:17 +00:00
cuishuang 3ab5e7e87a all: fix some typos
Change-Id: I35d764f27ce6a914e3af406b384e49a5183ca639
GitHub-Last-Rev: cec1a722f8
GitHub-Pull-Request: golang/build#44
Reviewed-on: https://go-review.googlesource.com/c/build/+/389597
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Trust: Carlos Amedee <carlos@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-03-18 22:51:25 +00:00
Dmitri Shuralyov d2b9e8ef30 internal/task: update to stackblur v1.1.0
Its v1.0.1 version has been recently retracted in esimov/stackblur-go#5.
Update to the latest stable version. As a benefit, its new API makes it
possible to drop the type assertion.

Updates golang/go#47403.

Change-Id: I08abac0e19ee32b83441e56ff42d1edc5fac441f
Reviewed-on: https://go-review.googlesource.com/c/build/+/388835
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2022-03-16 21:01:32 +00:00
Dmitri Shuralyov 00ab59d78d internal/task: switch to opentype for TTF font rendering
When working on CL 358897, I forgot that there's already an SFNT font
parser and glyph rasterizer available in the x/image module. Using it
produces an equivalent final image, and allows x/build to depend on 1
less module.

Also add a regression test for drawTerminal.

Updates golang/go#47403.

Change-Id: I77166a2180a7db9c81a30f77b12bb20dcd21bd8b
Reviewed-on: https://go-review.googlesource.com/c/build/+/388834
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2022-03-16 21:01:18 +00:00
Dmitri Shuralyov 1c23949106 internal/task: remove repetition in major Go release tweets
There was accidentally one too many "go" in the tweet text
for the major Go release type.

Updates golang/go#47403.
Updates golang/go#40279.

Change-Id: I7983bdb78f22c258121348a6cfaa2ed66592db54
Reviewed-on: https://go-review.googlesource.com/c/build/+/393018
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2022-03-16 20:49:04 +00:00
Carlos Amedee b4c9d73e93 internal/gomote/protos: fix spelling errors
This change fixes some spelling and grammatical errors.

Updates golang/go#48742

Change-Id: I9e6da866bc077ca59e0ff1dba42a4eea637b3c13
Reviewed-on: https://go-review.googlesource.com/c/build/+/393094
Trust: Carlos Amedee <carlos@golang.org>
Run-TryBot: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Alex Rakoczy <alex@golang.org>
2022-03-16 14:43:11 +00:00
Carlos Amedee 5dc1034832 internal/secret: add certificate authority entries for gomotes
This change adds entries for the gomote certificate authority keys to
the secret package. They will be used with the gomote service.

For golang/go#47521
Updates golang/go#48742

Change-Id: I8c649e652ee26a2404125ee1a6be639f1e22b6b7
Reviewed-on: https://go-review.googlesource.com/c/build/+/391155
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Trust: Carlos Amedee <carlos@golang.org>
2022-03-10 15:11:16 +00:00