-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/build/cmd/releasebot, x/build/cmd/relui: create version CL via Gerrit API instead of filesystem+git+codereview #38075
Comments
Change https://golang.org/cl/348435 mentions this issue: |
The CL is generated and trusted. Save release managers the extra click of adding Trust+1 to it before submission. It's already available as a flag in modern versions of git-codereview. Updates golang/go#38075. Change-Id: I6a3296a9e19f308af07e5e2daef7e943c0f52956 Reviewed-on: https://go-review.googlesource.com/c/build/+/348435 Trust: Dmitri Shuralyov <[email protected]> Run-TryBot: Dmitri Shuralyov <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Than McIntosh <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]>
Change https://golang.org/cl/350630 mentions this issue: |
Add methods for the following endpoints: • https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#create-change • https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#put-edit-file • https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#publish-edit These are needed to be able to mail a Gerrit CL via the Gerrit API, which will be used as part of release automation. Add support for specifying a raw (not JSON-encoded) request body, and improve miscellaneous style inconsistencies and lint issues. For golang/go#38075. Change-Id: Ic556d6b1f0fb6f56cfc61c50b76657b9aeea443a Reviewed-on: https://go-review.googlesource.com/c/build/+/350630 Run-TryBot: Dmitri Shuralyov <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Alexander Rakoczy <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]> Trust: Dmitri Shuralyov <[email protected]>
I explored this possibility in September 2021 and wrote a short internal doc to report my findings. The summary was that this is feasible to do, but I found it was not worth doing in cmd/releasebot, rather better to wait and do it as part of cmd/relui work. @heschi's making progress on the latter in issue #51797 and may get to this as part of that work. Removing my assignment. |
Fixed this a while back. |
During most release types (all other than beta),
releasebot
needs to create a Gerrit CL that update the content of theVERSION
file. For a recent example, see CL 223923.The current implementation is in a
writeVersion
method. It relies on having a Git checkout of the Go repository in a "gitwork" directory on disk, writing theVERSION
file, having configuredgit
andgit-codereview
commands with authentication info (typically, that of the release operator).It appears to be possible to create that CL by using the Gerrit REST API, specifically using the Create Change and Change Edit endpoints. There are Gerrit API Go clients available in
golang.org/x/build/gerrit
andgithub.com/andygrunwald/go-gerrit
packages.Doing this will reduce dependence on having a writeable filesystem, configured
git
andgit-codereview
tools, and can be used for further automation of releases in the future (tracked in #29205)./cc @toothrot @cagedmantis @andybons
The text was updated successfully, but these errors were encountered: