Skip to content

*: upgrade to go 1.19.1 - #86049

Merged
craig[bot] merged 1 commit into
cockroachdb:masterfrom
rickystewart:upgradego119
Sep 7, 2022
Merged

*: upgrade to go 1.19.1#86049
craig[bot] merged 1 commit into
cockroachdb:masterfrom
rickystewart:upgradego119

Conversation

@rickystewart

@rickystewart rickystewart commented Aug 12, 2022

Copy link
Copy Markdown
Contributor
  • Adjust the Pebble tests to run in new version.
  • Adjust version in Docker image (source).
  • Adjust version in the TeamCity agent image (setup script)
  • Rebuild and push the Docker image (following Basic Process)
  • Run the Internal / Release / Build and Publish Patched Go build configuration in TeamCity with your latest version of the script above. This will print out the new URL's and SHA256 sums for the patched Go that you built above.
  • Update build/teamcity/internal/release/build-and-publish-patched-go/impl.sh with the new version and adjust SHA256 sums as necessary.
  • Bump the version in WORKSPACE under go_download_sdk. You may need to bump rules_go. Also edit the filenames listed in sdks and update all the hashes to match what you built in the step above.
  • Run ./dev generate bazel to refresh distdir_files.bzl, then bazel fetch @distdir//:archives to ensure you've updated all hashes to the correct value.
  • Bump the version in builder.sh accordingly (source).
  • Bump the version in go-version-check.sh (source), unless bumping to a new patch release.
  • Bump the go version in go.mod. You may also need to rerun make vendor_rebuild if vendoring has changed.
  • Bump the default installed version of Go in bootstrap-debian.sh (source).
  • Replace other mentions of the older version of go (grep for golang:<old_version> and go<old_version>).
  • Update the builder.dockerImage parameter in the TeamCity Cockroach and Internal projects.
  • Ask the Developer Infrastructure team to deploy new TeamCity agent images according to packer/README.md

Closes #85908.

Release justification: Upgrade to latest Go version
Release note (build change): upgrade to go 1.19.1

@rickystewart rickystewart added the do-not-merge bors won't merge a PR with this label. label Aug 12, 2022
@rickystewart
rickystewart requested a review from a team as a code owner August 12, 2022 17:09
@rickystewart
rickystewart requested a review from a team August 12, 2022 17:09
@rickystewart
rickystewart requested a review from a team as a code owner August 12, 2022 17:09
@rickystewart
rickystewart requested review from srosenberg and removed request for a team August 12, 2022 17:09
@cockroach-teamcity

Copy link
Copy Markdown
Member

This change is Reviewable

@rickystewart
rickystewart requested a review from a team August 12, 2022 21:20
@rickystewart
rickystewart requested review from a team as code owners August 12, 2022 21:20
@rickystewart
rickystewart requested a review from a team August 12, 2022 21:20
@rickystewart
rickystewart requested a review from a team as a code owner August 12, 2022 21:20
@rickystewart
rickystewart requested a review from a team August 12, 2022 21:20
@rickystewart
rickystewart requested review from a team as code owners August 12, 2022 21:20
@rickystewart
rickystewart requested a review from a team August 12, 2022 21:20
@rickystewart
rickystewart requested review from a team as code owners August 12, 2022 21:20
@rickystewart
rickystewart requested review from a team, HonoreDB and msbutler and removed request for a team August 12, 2022 21:20
@rickystewart

Copy link
Copy Markdown
Contributor Author

gofmt has new behavior in 1.19 where doc comments are formatted, leading to the very big diff.

This breaks go-swagger which we depend on for some generated documentation: go-swagger/go-swagger#2759

@ajwerner

Copy link
Copy Markdown
Contributor

gofmt has new behavior in 1.19 where doc comments are formatted, leading to the very big diff.

Where we do have to use it? Do we have to use go1.19's gofmt? Given we're leaving go.mod at 1.17, I don't think we have to worry about older gofmt not working.

@dhartunian
dhartunian removed the request for review from a team August 15, 2022 14:06
@rickystewart

Copy link
Copy Markdown
Contributor Author

Do we have to use go1.19's gofmt? Given we're leaving go.mod at 1.17, I don't think we have to worry about older gofmt not working.

gofmt is part of the Go distribution (when you get a new go, you automatically get a new gofmt) so just using a different one is easier said than done. We could conceivably use patched versions of the Go archives and just keep the 1.18 version of gofmt in our custom SDK's, but that's a bit of a high-friction fix and I think go-swagger will have a fix upstream relatively quickly.

Either way when developers upgrade their local go versions, they're going to get gofmt 1.19, and I don't think it's in our best interest if the latest gofmt disagrees with what CI wants the formatting to be.

@rickystewart

Copy link
Copy Markdown
Contributor Author

It looks like gofmt and dev generate go still disagree about pkg/sql/colexec/and_or_projection.eg.go. @knz Can you look into this?

@knz

knz commented Sep 6, 2022

Copy link
Copy Markdown
Contributor

here you are #87442

@knz

knz commented Sep 6, 2022

Copy link
Copy Markdown
Contributor

feel free to cherry pick btw

@rickystewart

Copy link
Copy Markdown
Contributor Author

This is pretty close, can probably be merged soon.

@knz Looks like that file is still problematic even after the cherry-pick?

@rickystewart

Copy link
Copy Markdown
Contributor Author

Looks like that file is still problematic even after the cherry-pick?

Oh, maybe I messed up something with the rebase. I'm trying again now.

craig Bot pushed a commit that referenced this pull request Sep 7, 2022
87442: colexec: remove some empty comment lines r=yuzefovich a=knz

For #86049.

Release justification: non-code changes

Release note: None

Co-authored-by: Raphael 'kena' Poss <knz@thaumogen.net>
@knz

knz commented Sep 7, 2022

Copy link
Copy Markdown
Contributor

You will probably need #87485 to get over the remaining linter hurdle.

Then for the remaining test failure you need to update the expected test output (I think it's dev test //sql/opt/exec/execbuilder --rewrite)

@rickystewart

Copy link
Copy Markdown
Contributor Author

You will probably need #87485 to get over the remaining linter hurdle.

I pulled the changes into this commit, except for the uses of ioutil I couldn't get rid of easily, for which I added linter exclusions.

AFAICT this is ready for review now.

@knz

knz commented Sep 7, 2022

Copy link
Copy Markdown
Contributor

i can spend time on the detailed review but with focused chaos it will likely spread over 2-3 days.

@rickystewart

Copy link
Copy Markdown
Contributor Author

i can spend time on the detailed review but with focused chaos it will likely spread over 2-3 days.

I'll check if there's someone on the team who has time to review.

@mari-crl mari-crl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sanity check completed!
A lot of ASCII art in our codebase... Some of it seems like it may have gotten misaligned, but I don't think that's a fix to be made here. Get it in there!

:lgtm:

Reviewed 766 of 789 files at r11, 24 of 24 files at r13, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @HonoreDB, @msbutler, and @srosenberg)

@knz

knz commented Sep 7, 2022

Copy link
Copy Markdown
Contributor

Btw 1.19.1 was just released with applicable security patches. IMHO it would be useful to have this done here right away.

@rickystewart

Copy link
Copy Markdown
Contributor Author

TFTR

YOLO

bors r=mari-crl p=99

@craig

craig Bot commented Sep 7, 2022

Copy link
Copy Markdown
Contributor

👎 Rejected by label

@rickystewart rickystewart removed the do-not-merge bors won't merge a PR with this label. label Sep 7, 2022

@knz knz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok doing a post-hoc review on this.

Reviewed 7 of 789 files at r11.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @HonoreDB, @msbutler, and @srosenberg)

@knz knz changed the title *: upgrade to go 1.19 *: upgrade to go 1.19.1 Sep 7, 2022
* [ ] Adjust the Pebble tests to run in new version.
* [x] Adjust version in Docker image ([source](./builder/Dockerfile)).
* [x] Adjust version in the TeamCity agent image ([setup script](./packer/teamcity-agent.sh))
* [x] Rebuild and push the Docker image (following [Basic Process](#basic-process))
* [x] Update `build/teamcity/internal/release/build-and-publish-patched-go/impl.sh` with the new version and adjust SHA256 sums as necessary.
* [x] Run the `Internal / Release / Build and Publish Patched Go` build configuration in TeamCity with your latest version of the script above. This will print out the new URL's and SHA256 sums for the patched Go that you built above.
* [x] Bump the version in `WORKSPACE` under `go_download_sdk`. You may need to bump [rules_go](https://github.com/bazelbuild/rules_go/releases). Also edit the filenames listed in `sdks` and update all the hashes to match what you built in the step above.
* [x] Run `./dev generate bazel` to refresh `distdir_files.bzl`, then `bazel fetch @distdir//:archives` to ensure you've updated all hashes to the correct value.
* [x] Bump the version in `builder.sh` accordingly ([source](./builder.sh#L6)).
* [x] Bump the version in `go-version-check.sh` ([source](./go-version-check.sh)), unless bumping to a new patch release.
* [ ] Bump the go version in `go.mod`. You may also need to rerun `make vendor_rebuild` if vendoring has changed.
* [x] Bump the default installed version of Go in `bootstrap-debian.sh` ([source](./bootstrap/bootstrap-debian.sh)).
* [x] Replace other mentions of the older version of go (grep for `golang:<old_version>` and `go<old_version>`).
* [ ] Update the `builder.dockerImage` parameter in the TeamCity [`Cockroach`](https://teamcity.cockroachdb.com/admin/editProject.html?projectId=Cockroach&tab=projectParams) and [`Internal`](https://teamcity.cockroachdb.com/admin/editProject.html?projectId=Internal&tab=projectParams) projects.
* [ ] Ask the Developer Infrastructure team to deploy new TeamCity agent images according to [packer/README.md](./packer/README.md)

Closes #85908.

Release justification: Upgrade to latest Go version
Release note (build change): upgrade to go 1.19.1
@rickystewart

Copy link
Copy Markdown
Contributor Author

bors r=mari-crl,knz p=99

@craig

craig Bot commented Sep 7, 2022

Copy link
Copy Markdown
Contributor

Build succeeded:

@craig
craig Bot merged commit 018e180 into cockroachdb:master Sep 7, 2022
craig Bot pushed a commit that referenced this pull request May 24, 2024
124674: build: remove `swagger` r=rail a=rickystewart

We stopped generating the Swagger documentation 2 years ago in #86049 to allow us to upgrade to Go 1.19. A year later, in #105291, we then deleted the stale tree. To date no one has complained or even noticed this documentation missing, we've moved on to Go 1.22, and we've had 2 years of releases. Time to just remove support for Swagger altogether, including the build dependency and the `go:swagger` directives.

I kept the "structured" documentation comments. It may or may not be out-of-date, but it doesn't seem to be hurting anyone.

Epic: none
Release note: None

Co-authored-by: Ricky Stewart <ricky@cockroachlabs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build: upgrade to go 1.19