*: upgrade to go 1.18.4#84590
Conversation
2040fa5 to
b005b60
Compare
knz
left a comment
There was a problem hiding this comment.
Reviewed 58 of 58 files at r1, all commit messages.
Reviewable status:complete! 0 of 0 LGTMs obtained (waiting on @HonoreDB, @msbutler, @rickystewart, and @tbg)
pkg/ccl/changefeedccl/changefeed_stmt.go line 978 at r1 (raw file):
// due to a transient, retryable error. err = jobs.MarkAsRetryJobError(err) lastRunStatusUpdate = b.setJobRunningStatus(ctx, lastRunStatusUpdate, "retryable flow error: %s", err) //lint:ignore SA4006
This looks like an outright bug. I'd remove the lint ignore directive and ask @HonoreDB what's up with it.
pkg/cli/debug_merge_logs.go line 341 at r1 (raw file):
} //lint:ignore SA4006 to = to.Truncate(time.Second) // log files only have second resolution
The fact that to is not used any more is either a bug (the code below should use it), or a remnant from a previous version.
In any case, a linter ignore here is not desirable.
@abarganier what should we do here?
pkg/kv/kvserver/deprecated_store_rebalancer.go line 124 at r1 (raw file):
} filteredStoreList := storeList.ExcludeInvalid(conf.Constraints)
wowzer. This also looks like a bug. The removal you just made doesn't look like the right fix? I think we need to combine them somehow.
Even though the file name says "deprecated" I believe this code is still in use.
@aayushshah15 what do you think?
pkg/kv/kvserver/store_rebalancer.go line 461 at r1 (raw file):
} filteredStoreList := allStoresList.ExcludeInvalid(conf.Constraints)
ditto
pkg/sql/colexec/columnarizer.go line 218 at r1 (raw file):
newRows := make(rowenc.EncDatumRows, c.batch.Capacity()) _ = newRows[len(oldRows)] //lint:ignore S1001
Maybe add a comment to explain we're avoiding copy because we need gcassert below.
( @yuzefovich could we use copy here? That's what the compiler is trying to tell us. )
pkg/sql/opt/cat/zone.go line 308 at r1 (raw file):
voterChild := zoneChild if zone.VoterConstraintsCount() > 1 { voterChild = voterChild.Childf("voter replica constraints") //lint:ignore SA4006
This also looks suspicious. I don't think we should ignore this linter warning.
@mgartner @rytaft do you want to have a look?
pkg/sql/opt/memo/statistics_builder.go line 4122 at r1 (raw file):
for f := 0; f < len(h.filters); f++ { conjunctSelectivity = props.OneSelectivity
Here i'm also not what's up - why are we not looking at the conjunct selectivity any more?
pkg/sql/opt/xform/scan_funcs.go line 320 at r1 (raw file):
// let's not hide the problem by still generating a locality-optimized search // that doesn't fully cover local spans. //lint:ignore S1009
It's possible we do care about the difference between a nil slice reference and a zero-sized non-nil slice here, but I'm not sure.
Perhaps the code can indeed be simplified. If we keep it, we need an explanatory comment to motivate the linter ignore.
@mgartner can you provide guidance?
b005b60 to
120fbf0
Compare
|
I've already contacted a couple people about some of these linter failures (but not all of them). @rytaft addressed the problem with @ajwerner addressed the problem with I reached out to @aayushshah15 about the |
120fbf0 to
b694800
Compare
miretskiy
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @HonoreDB, @msbutler, @rickystewart, and @tbg)
pkg/ccl/changefeedccl/changefeed_stmt.go line 978 at r1 (raw file):
Previously, knz (kena) wrote…
This looks like an outright bug. I'd remove the lint ignore directive and ask @HonoreDB what's up with it.
I don't know;... it's True that we return below; but normally lastRunStatusUpdate is used, and is updated in a loop;
I suppose we could say "_ = b.setJobRunningStatus"... But is it that much better? It's definitely not a bug.
miretskiy
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @HonoreDB, @msbutler, @rickystewart, and @tbg)
pkg/ccl/changefeedccl/changefeed_stmt.go line 978 at r1 (raw file):
Previously, miretskiy (Yevgeniy Miretskiy) wrote…
I don't know;... it's True that we return below; but normally lastRunStatusUpdate is used, and is updated in a loop;
I suppose we could say "_ = b.setJobRunningStatus"... But is it that much better? It's definitely not a bug.
Also, ignoring return values.. perhaps it's a thing, but I personally really don't like it.
|
Previously, miretskiy (Yevgeniy Miretskiy) wrote…
Agree that it's not a bug. It's confusing to ignore the return value but arguably it'd be worse to have two different methods that do the same thing but one returns nothing. |
The lint failure is: Looked to me like the initialization was unnecessary, but if this is an actual bug we can also resolve another way. |
a6a2803 to
aad0d7c
Compare
yuzefovich
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @HonoreDB, @knz, @msbutler, @rickystewart, and @tbg)
pkg/sql/colexec/columnarizer.go line 218 at r1 (raw file):
Previously, knz (kena) wrote…
Maybe add a comment to explain we're avoiding copy because we need gcassert below.
( @yuzefovich could we use copy here? That's what the compiler is trying to tell us. )
We can replace the first for loop with the copy (it'd be nicer to put that copy before _ = newRows[len(oldRows)] line).
aad0d7c to
371ea13
Compare
Done. |
22ac824 to
a8c77d7
Compare
|
Already raised this to @knz in a DM, but I'm seeing these deprecation errors in non-test code (plus the same errors in |
a8c77d7 to
6aa85f9
Compare
51a4e89 to
b916e66
Compare
|
Hi Ricky |
b916e66 to
d17a997
Compare
OK, done. |
|
This is now passing CI and apparently fully ready for review. 🙏 I've added a lint ignore directive for every lint error that someone hasn't already given me a dedicated fix for. |
knz
left a comment
There was a problem hiding this comment.
Reviewed 1 of 1 files at r2, 1 of 1 files at r3, 2 of 3 files at r4, 2 of 4 files at r5, 1 of 1 files at r6, 1 of 3 files at r7, 12 of 14 files at r9, 13 of 13 files at r10, 3 of 3 files at r11, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @HonoreDB, @knz, @msbutler, @rickystewart, and @tbg)
* [ ] 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)) * [ ] Rebuild and push the Docker image (following [Basic Process](#basic-process)) * [x] Download ALL the archives (`.tar.gz`, `.zip`) for the new Go version from https://golang.org/dl/ and mirror them in the `public-bazel-artifacts` bucket in the `Bazel artifacts` project in GCP (sub-directory `go`, next to the other Go SDK's). * [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 mirrored 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) Release note (build change): Upgrade to golang 1.18.4
d17a997 to
efb99b3
Compare
|
TFTR! bors r=knz |
|
Build succeeded: |
.tar.gz,.zip) for the new Go version from https://golang.org/dl/ and mirror them in thepublic-bazel-artifactsbucket in theBazel artifactsproject in GCP (sub-directorygo, next to the other Go SDK's).WORKSPACEundergo_download_sdk. You may need to bump rules_go. Also edit the filenames listed insdksand update all the hashes to match what you mirrored in the step above../dev generate bazelto refreshdistdir_files.bzl, thenbazel fetch @distdir//:archivesto ensure you've updated all hashes to the correct value.builder.shaccordingly (source).go-version-check.sh(source), unless bumping to a new patch release.go.mod. You may also need to rerunmake vendor_rebuildif vendoring has changed.bootstrap-debian.sh(source).golang:<old_version>andgo<old_version>).builder.dockerImageparameter in the TeamCityCockroachandInternalprojects.Release note (build change): Upgrade to golang 1.18.4