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

Release v0.27.5 #2324

Merged
merged 2 commits into from
Jun 2, 2023
Merged

Release v0.27.5 #2324

merged 2 commits into from
Jun 2, 2023

Conversation

MarcoPolo
Copy link
Collaborator

New patch release to avoid a panic in edge cases in the dial worker code.

MarcoPolo and others added 2 commits June 2, 2023 13:26
* Dedup addresses to dial

Co-authored-by: Aayush Rajasekaran <[email protected]>

* Move DedupAddrs test

* Typo

---------

Co-authored-by: Aayush Rajasekaran <[email protected]>
@github-actions
Copy link

github-actions bot commented Jun 2, 2023

Suggested version: v0.27.5

Comparing to: v0.27.4 (diff)

Changes in go.mod file(s):

(empty)

gorelease says:

# diagnostics
go.mod: the following requirements are needed
	github.com/cheekybits/[email protected]
	github.com/gorilla/[email protected]
	github.com/hashicorp/[email protected]
	github.com/libp2p/[email protected]
	github.com/libp2p/go-yamux/[email protected]
	github.com/lucas-clemente/[email protected]
	github.com/marten-seemann/[email protected]
	github.com/marten-seemann/[email protected]
	github.com/marten-seemann/[email protected]
	github.com/marten-seemann/[email protected]
	github.com/mattn/[email protected]
	github.com/nxadm/[email protected]
	github.com/spacemonkeygo/[email protected]
	[email protected]
	gopkg.in/[email protected]
Run 'go mod tidy' to add missing requirements.
required module github.com/microcosm-cc/[email protected] retracted by module author: Retract older versions as only latest is to be depended upon

# summary
Suggested version: v0.27.5

gocompat says:

Your branch is up to date with 'origin/release-v027'.

Cutting a Release (when not on master)

This PR is targeting release-v027, which is not the default branch.
If you wish to cut a release once this PR is merged, please add the release label to this PR.

Cutting a Release (and modifying non-markdown files)

This PR is modifying both version.json and non-markdown files.
The Release Checker is not able to analyse files that are not checked in to release-v027. This might cause the above analysis to be inaccurate.
Please consider performing all the code changes in a separate PR before cutting the release.

Automatically created GitHub Release

A draft GitHub Release has been created.
It is going to be published when this PR is merged.
You can modify its' body to include any release notes you wish to include with the release.

Copy link
Contributor

@marten-seemann marten-seemann left a comment

Choose a reason for hiding this comment

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

LGTM. Should this be a PR targeting master though (without the version change, obviously), and then be cherry picked onto the release branch?

@@ -184,3 +186,23 @@ type Dialer interface {
Notify(Notifiee)
StopNotify(Notifiee)
}

// DedupAddrs deduplicates addresses in place, leave only unique addresses.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// DedupAddrs deduplicates addresses in place, leave only unique addresses.
// DedupAddrs deduplicates addresses in place, leaving only unique addresses.

t.Run(fmt.Sprintf("test %d", i), func(t *testing.T) {
deduped := DedupAddrs(tc.in)
for _, a := range tc.out {
require.Contains(t, deduped, a)
Copy link
Contributor

Choose a reason for hiding this comment

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

You also need to check the length, otherwise deduped could still contain duplicates.

ad := w.pending[string(addr.Bytes())]
ad, ok := w.pending[string(addr.Bytes())]
if !ok {
log.Warn("unexpectedly missing pending addrDial for addr")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
log.Warn("unexpectedly missing pending addrDial for addr")
log.Errorf("swarm dial worker BUG: unexpectedly missing pending addrDial for addr: %s", addr)

ad := w.pending[string(res.Addr.Bytes())]
ad, ok := w.pending[string(res.Addr.Bytes())]
if !ok {
log.Warn("unexpectedly missing pending addrDial res")
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here?

@MarcoPolo MarcoPolo merged commit 6dffa1a into release-v027 Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants