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

go.mod: go.etcd.io/etcd/server/v3 v3.5.5 #3085

Merged
merged 2 commits into from
Nov 23, 2022

Conversation

thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Nov 18, 2022

etcd v3.5.5 now uses otel v1.0.1; https://github.com/etcd-io/etcd/blob/v3.5.5/server/go.mod#L34-L37

(through commit etcd-io/etcd@2d7e490)

Which means we may be able to get rid of this replace rule 🎉

https://github.com/moby/moby/blob/8bb58153e75b4310f3ae9ec6d03924aa286fbf20/vendor.mod#L172

	// Resolve dependency hell with github.com/cloudflare/cfssl (transitive via
	// swarmkit) by pinning the certificate-transparency-go version. Remove once
	// module go.etcd.io/etcd/server/v3 has upgraded its dependency on
	// go.opentelemetry.io/otel to v1.
	github.com/google/certificate-transparency-go => github.com/google/certificate-transparency-go v1.0.20

go.mod: golang.org/x/sys v0.1.0

It's an indirect dependency, but updating other modules will cause it
to be updated, so updating it first.

go.mod: golang.org/x/time v0.1.0

go.mod: golang.org/x/text v0.3.7

It's an indirect dependency, but updating other modules will cause it
to be updated, so updating it first. This is an intermediate version,
which can be done in isolation.

go.mod: golang.org/x/mod v0.7.0

It's an indirect dependency, but updating other modules will cause it
to be updated, so updating it first.

go.mod: github.com/onsi/gomega v1.10.5

to get rid of the golang.org/x/xerrors dependency

go.mod: golang.org/x/text v0.4.0

Now that other dependencies are updated, we can update this one in
isolation (yay for circular dependencies).

go.mod: golang.org/x/net v0.1.0

go.mod: golang.org/x/crypto v0.1.0

go.mod: github.com/docker/go-units v0.5.0

github.com/cespare/xxhash/v2 v2.1.2

It's an indirect dependency, but updating other modules will cause it
to be updated, so updating it first.

github.com/modern-go/reflect2 v1.0.2

It's an indirect dependency, but updating other modules will cause it
to be updated, so updating it first.

go.mod: github.com/prometheus/client_golang v1.12.1

To match other projects and (upcoming) dependencies.

Full diff: https://github.com/prometheus/client_golang/compare/v1.11.0..v1.12.1

go.mod: go.etcd.io/etcd/server/v3 v3.5.5

etcd v3.5.5 now uses otel v1.0.1;
https://github.com/etcd-io/etcd/blob/v3.5.5/server/go.mod#L34-L37

etcd-io/etcd@2d7e490

@thaJeztah thaJeztah force-pushed the some_end_to_dependency_hell branch 2 times, most recently from 3886d7c to b30a896 Compare November 18, 2022 22:32
@thaJeztah
Copy link
Member Author

thaJeztah commented Nov 19, 2022

One failure

--- FAIL: TestReadRepairWAL (0.23s)
    walwrap_test.go:248: 
        	Error Trace:	walwrap_test.go:248
        	Error:      	Received unexpected error:
        	            	wal: max entry size limit exceeded, recBytes: 24, fileSize(200) - offset(184) - padBytes(0) = entryLimit(16)
        	            	irreparable WAL error
        	            	github.com/moby/swarmkit/v2/manager/state/raft/storage.ReadRepairWAL
        	            		/home/circleci/.go_workspace/src/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go:178
        	            	github.com/moby/swarmkit/v2/manager/state/raft/storage.TestReadRepairWAL
        	            		/home/circleci/.go_workspace/src/github.com/docker/swarmkit/manager/state/raft/storage/walwrap_test.go:247
        	            	testing.tRunner
        	            		/usr/local/go/src/testing/testing.go:1439
        	            	runtime.goexit
        	            		/usr/local/go/src/runtime/asm_amd64.s:1571
        	Test:       	TestReadRepairWAL
FAIL

Which comes from this line;

ogWAL, waldata, err := ReadRepairWAL(context.Background(), tempdir, snapshot, OriginalWAL)

And produced here; https://github.com/etcd-io/etcd/blob/v3.5.5/server/wal/decoder.go#L83-L89

	recBytes, padBytes := decodeFrameSize(l)
	// The length of current WAL entry must be less than the remaining file size.
	maxEntryLimit := fileBufReader.FileInfo().Size() - d.lastValidOff - padBytes
	if recBytes > maxEntryLimit {
		return fmt.Errorf("wal: max entry size limit exceeded, recBytes: %d, fileSize(%d) - offset(%d) - padBytes(%d) = entryLimit(%d)",
			recBytes, fileBufReader.FileInfo().Size(), d.lastValidOff, padBytes, maxEntryLimit)
	}

@thaJeztah

This comment was marked as outdated.

@thaJeztah thaJeztah mentioned this pull request Nov 21, 2022
2 tasks
@thaJeztah thaJeztah force-pushed the some_end_to_dependency_hell branch 2 times, most recently from 99d4335 to beeb9c4 Compare November 22, 2022 23:04
@thaJeztah thaJeztah changed the title go.mod: go.etcd.io/etcd/server/v3 v3.5.5 and other dependencies go.mod: go.etcd.io/etcd/server/v3 v3.5.5 Nov 23, 2022
@thaJeztah thaJeztah force-pushed the some_end_to_dependency_hell branch 2 times, most recently from c89bc91 to e1eb70e Compare November 23, 2022 08:06
@thaJeztah thaJeztah force-pushed the some_end_to_dependency_hell branch 2 times, most recently from 49dd040 to 02d93cb Compare November 23, 2022 12:19
Comment on lines +84 to +88
// The length of current WAL entry must be less than the remaining file size.
maxEntryLimit := fileBufReader.FileInfo().Size() - d.lastValidOff - padBytes
if recBytes > maxEntryLimit {
return fmt.Errorf("wal: max entry size limit exceeded, recBytes: %d, fileSize(%d) - offset(%d) - padBytes(%d) = entryLimit(%d)",
recBytes, fileBufReader.FileInfo().Size(), d.lastValidOff, padBytes, maxEntryLimit)
Copy link
Member Author

Choose a reason for hiding this comment

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

So.. this change is the cause of the failures;

I see as part of that PR, ErrMaxWALEntrySizeLimitExceeded was also removed, which makes it more complicated to check for this specific error.

@thaJeztah
Copy link
Member Author

I see v3.5.6 was also released; I hoped some fix for that part was included it that one (or at least a way to detect that specific error now that ErrMaxWALEntrySizeLimitExceeded was removed, but it looks like it isn't. Nevertheless we should update to that version as well as it's removing an unmaintained dependency with vulnerabilities (github.com/form3tech-oss/jwt-go); see

@thaJeztah
Copy link
Member Author

Flaky test?

--- FAIL: TestMixedFIPSClusterNonMandatoryFIPS (83.39s)
    integration_test.go:139: 
        	Error Trace:	integration_test.go:139
        	            				integration_test.go:917
        	Error:      	Received unexpected error:
        	            	rpc error: code = DeadlineExceeded desc = context deadline exceeded
        	            	polling failed
        	            	github.com/moby/swarmkit/v2/testutils.PollFuncWithTimeout
        	            		/home/circleci/.go_workspace/src/github.com/docker/swarmkit/testutils/poll.go:28
        	            	github.com/moby/swarmkit/v2/integration.pollClusterReady
        	            		/home/circleci/.go_workspace/src/github.com/docker/swarmkit/integration/integration_test.go:138
        	            	github.com/moby/swarmkit/v2/integration.TestMixedFIPSClusterNonMandatoryFIPS
        	            		/home/circleci/.go_workspace/src/github.com/docker/swarmkit/integration/integration_test.go:917
        	            	testing.tRunner
        	            		/usr/local/go/src/testing/testing.go:1439
        	            	runtime.goexit
        	            		/usr/local/go/src/runtime/asm_amd64.s:1571
        	Test:       	TestMixedFIPSClusterNonMandatoryFIPS

Test that recovery fails if the file is too short (with etcd v3.5.5)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Member Author

@corhere @rumpl PTAL (it's ✅ now!) one more coming after this

@thaJeztah
Copy link
Member Author

Almost at the end of my queue 🎉

@thaJeztah thaJeztah merged commit 9aad6ba into moby:master Nov 23, 2022
@thaJeztah thaJeztah deleted the some_end_to_dependency_hell branch November 23, 2022 15:28
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.

2 participants