Skip to content
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

deps: update errors and the sentry-go dependency #76498

Merged
merged 1 commit into from
Feb 15, 2022

Conversation

knz
Copy link
Contributor

@knz knz commented Feb 14, 2022

Fixes #76439.

This updates the sentry SDK version from 0.6.1 to 0.12.0.

@knz knz requested a review from rail February 14, 2022 11:53
@knz knz requested a review from a team as a code owner February 14, 2022 11:53
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Member

@rail rail left a comment

Choose a reason for hiding this comment

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

cockroachdb/sentry-go is still in go.sum, probably this is why the test fails.

Reviewed 10 of 10 files at r1, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @knz)


go.sum, line 440 at r1 (raw file):

github.com/cockroachdb/returncheck v0.0.0-20200612231554-92cdbca611dd h1:KFOt5I9nEKZgCnOSmy8r4Oykh8BYQO8bFOTgHDS8YZA=
github.com/cockroachdb/returncheck v0.0.0-20200612231554-92cdbca611dd/go.mod h1:AN708GD2FFeLgUHMbD58YPe4Nw8GG//3rwgyG4L9gR0=
github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ=

Looks like this line makes the linter unhappy.


pkg/cli/flags_test.go, line 74 at r1 (raw file):

			"github.com/cockroachdb/cockroach/pkg/testutils", // meant for testing code only
		},
		// Sentry and the errors library use go/build to determine

Can you also update the comments here to mention only the errors library.

Code quote (from pkg/util/log/logcrash/crash_reporting.go):

cockroachdb/sentry-go

Copy link
Contributor Author

@knz knz left a comment

Choose a reason for hiding this comment

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

I don't see any test failure, other than the unrelated test flakes in #76501 and #76502.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @rail)


go.sum, line 440 at r1 (raw file):

Previously, rail (Rail Aliiev) wrote…

Looks like this line makes the linter unhappy.

Done. But what is this "linter" you speak of?


pkg/cli/flags_test.go, line 74 at r1 (raw file):

Previously, rail (Rail Aliiev) wrote…

Can you also update the comments here to mention only the errors library.

Done.

@knz
Copy link
Contributor Author

knz commented Feb 14, 2022

Actually the test failures are due to the changes in the upstream dep github.com/kr/pretty.

Copy link
Member

@rail rail left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @knz)


go.sum, line 440 at r1 (raw file):

Previously, knz (kena) wrote…

Done. But what is this "linter" you speak of?

"check generated code", see https://teamcity.cockroachdb.com/buildConfiguration/Cockroach_UnitTests_CheckGeneratedCode/4371077?showRootCauses=true&expandBuildChangesSection=true&expandBuildDeploymentsSection=true&expandBuildProblemsSection=true
It's more like a build system linter.

The error is still there 🤔, maybe something special in https://github.com/cockroachdb/cockroach/blob/master/build/bazelutil/bazel-generate.sh

@knz knz requested a review from a team as a code owner February 14, 2022 14:33
@knz
Copy link
Contributor Author

knz commented Feb 14, 2022

I fixed the broken tests. RFAL

Copy link
Member

@rail rail left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @knz and @rail)


go.sum, line 440 at r1 (raw file):

Previously, rail (Rail Aliiev) wrote…

"check generated code", see https://teamcity.cockroachdb.com/buildConfiguration/Cockroach_UnitTests_CheckGeneratedCode/4371077?showRootCauses=true&expandBuildChangesSection=true&expandBuildDeploymentsSection=true&expandBuildProblemsSection=true
It's more like a build system linter.

The error is still there 🤔, maybe something special in https://github.com/cockroachdb/cockroach/blob/master/build/bazelutil/bazel-generate.sh

cmd := exec.Command(gobin, "list", "-mod=readonly", "-m", "-json", "all")
calls go list -mod=readonly -m all.

go list -m: github.com/cockroachdb/datadriven@v1.0.1-0.20211007161720-b558070c3be0 requires
	github.com/cockroachdb/errors@v1.6.1 requires
	github.com/cockroachdb/sentry-go@v0.6.1-cockroachdb.2: missing go.sum entry; to add it:
	go mod download github.com/cockroachdb/sentry-go

Copy link
Contributor Author

@knz knz left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @rail)


go.sum, line 440 at r1 (raw file):

Previously, rail (Rail Aliiev) wrote…

cmd := exec.Command(gobin, "list", "-mod=readonly", "-m", "-json", "all")
calls go list -mod=readonly -m all.

go list -m: github.com/cockroachdb/datadriven@v1.0.1-0.20211007161720-b558070c3be0 requires
	github.com/cockroachdb/errors@v1.6.1 requires
	github.com/cockroachdb/sentry-go@v0.6.1-cockroachdb.2: missing go.sum entry; to add it:
	go mod download github.com/cockroachdb/sentry-go

But this logic is broken, right? The dependency graph should smoothly upgrade the dependency of datadriven to errors 1.8.7 since it's compatible with 1.6.1, and drop the dependency to cockroachdb/sentry-go. We don't need it any more in the top level.

So it looks to me that mirror.go has incorrect logic.

Why does this use go list -mod=readonly and not go list -mod=mod btw?

Copy link
Member

@rail rail left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r3, 2 of 2 files at r4, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @knz)


DEPS.bzl, line 1311 at r4 (raw file):

        importpath = "github.com/cockroachdb/sentry-go",
        sha256 = "fbb2207d02aecfdd411b1357efe1192dbb827959e36b7cab7491731ac55935c9",
        strip_prefix = "github.com/cockroachdb/sentry-go@v0.6.1-cockroachdb.2",

hmmm, I'm not sure we want to keep it around just to make the test pass. 🤔


go.sum, line 440 at r1 (raw file):

Previously, knz (kena) wrote…

But this logic is broken, right? The dependency graph should smoothly upgrade the dependency of datadriven to errors 1.8.7 since it's compatible with 1.6.1, and drop the dependency to cockroachdb/sentry-go. We don't need it any more in the top level.

So it looks to me that mirror.go has incorrect logic.

Why does this use go list -mod=readonly and not go list -mod=mod btw?

I think go list thinks they are different modules and this is why it's still there. datadriven still thinks that our fork is required. Probably we have to update datadriven's deps too.

@knz
Copy link
Contributor Author

knz commented Feb 14, 2022

ok see cockroachdb/datadriven#35

@knz
Copy link
Contributor Author

knz commented Feb 14, 2022

I have iterated back and forth between datadriven and errors, and was not able to get them to remove the offending package from go.sum. I suspect there's yet another 3rd party dependency, perhaps used indirectly, that depends on an older version of cockroachdb/errors.

I'm not sure what else we should do here?

@knz knz force-pushed the 20220214-sentry branch 2 times, most recently from 10e6ada to 1c379e4 Compare February 15, 2022 10:04
This updates the sentry SDK version from 0.6.1 to 0.12.0.

Release note: None

Co-authored-by: Rail Aliiev <rail@iqchoice.com>
@knz
Copy link
Contributor Author

knz commented Feb 15, 2022

okay I've done my best here. I think this is good enough to say "we dropped the fork" since it's not copied into the vendor/ tree any more. I'm not too concerned by go.sum at this point - it doesn't seem to hurt.

Copy link
Member

@rail rail left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 4 files at r5, 2 of 3 files at r6, 4 of 4 files at r7, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @knz)

@knz
Copy link
Contributor Author

knz commented Feb 15, 2022

thanks!

bors r=rail

@craig
Copy link
Contributor

craig bot commented Feb 15, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Feb 15, 2022

Build succeeded:

@craig craig bot merged commit b16a845 into cockroachdb:master Feb 15, 2022
@knz knz deleted the 20220214-sentry branch February 16, 2022 13:34
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.

deps: evaluate a possible upgrade to the newest sentry-go
3 participants