Skip to content

vendor: remove most "replace" rules and update github.com/armon/go-radix#44498

Merged
thaJeztah merged 3 commits intomoby:masterfrom
thaJeztah:update_go_radix
Nov 23, 2022
Merged

vendor: remove most "replace" rules and update github.com/armon/go-radix#44498
thaJeztah merged 3 commits intomoby:masterfrom
thaJeztah:update_go_radix

Conversation

Previously we had to use a replace rule, as later versions of this
module resulted in a panic. This issue was fixed in:
armon/go-radix@f30034d

Which means we can remove the replace rule, and update the dependency.
No new release was tagged yet, so sticking to a "commit" for now.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
While this replace was needed in swarmkit itself, it looks like
it doesn't cause issues when removed in this repository, so
let's remove it here.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
Copy link
Copy Markdown
Member Author

@neersighted @tiborvass @corhere PTAL

Comment thread vendor.mod
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/certificate-transparency-go v1.1.2 // indirect
github.com/google/certificate-transparency-go v1.1.2 // indirect; replaced; see "replace" section at the bottom of this file for the actual version.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
github.com/google/certificate-transparency-go v1.1.2 // indirect; replaced; see "replace" section at the bottom of this file for the actual version.
github.com/google/certificate-transparency-go v1.1.2 // indirect; replaced

I don't think we need the full explanation, the semantics of go.mod and replace directives should be well known/I would expect anyone sophisticated enough to edit a go.mod to know where to look for replacement rules.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I tried to be explicit, as it's definitely not obvious to many (I know many missed it in the BuildKit repository, and ended up with "unpredictable" outcomes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fair enough; if you think it's helpful I don't think it's objectionable 😆

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.

Comment thread vendor.mod
// 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.
replace github.com/google/certificate-transparency-go => github.com/google/certificate-transparency-go v1.0.20
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.

You don't need this anymore, etcd upgraded to otel v1.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, working on that one (currently struggling with SwarmKit CI), so I'll do that in a follow-up 😄

Comment thread vendor.mod
github.com/Microsoft/hcsshim v0.9.5
github.com/RackSec/srslog v0.0.0-20180709174129-a4725f04ec91
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310
github.com/armon/go-radix v1.0.1-0.20221118154546-54df44f2176c
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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That was my initial attempt in moby/libnetwork#2581, but (don't recall exactly) I think it didn't work. But must admit that I didn't dive deeply into why (or forgot that I did) 😂

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.

What was the problem? From looking at your branch, what possibly didn't work is that you take the lock twice. createOrUpdateEntry should not have a lock because the caller has to lock.

I'm opening #44501 we can discuss it there.

@thaJeztah
Copy link
Copy Markdown
Member Author

Let me bring these in as a stepping-stone, then look at #44501

@thaJeztah thaJeztah merged commit 052a5b0 into moby:master Nov 23, 2022
@thaJeztah thaJeztah deleted the update_go_radix branch November 23, 2022 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

4 participants