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

chore: prepare libp2p v0.52.0 release #4053

Merged
merged 5 commits into from
Jun 19, 2023
Merged

Conversation

mxinden
Copy link
Member

@mxinden mxinden commented Jun 9, 2023

Description

Notes & open questions

Release milestone https://github.com/libp2p/rust-libp2p/milestone/6.

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

@mxinden mxinden added this to the v0.52.0 milestone Jun 9, 2023
@thomaseizinger
Copy link
Contributor

Missing removal of all - unreleased postfixes.

@mxinden
Copy link
Member Author

mxinden commented Jun 11, 2023

How about introducing two sections. A TL;DR section documenting the gotchas, i.e. the things you need to know before upgrading and a longer section advertising the cool new features that this release brings with it? I feel like while our current changelogs show what changed, they don't tell the story of why someone should upgrade.

@thomaseizinger
Copy link
Contributor

How about introducing two sections. A TL;DR section documenting the gotchas, i.e. the things you need to know before upgrading and a longer section advertising the cool new features that this release brings with it? I feel like while our current changelogs show what changed, they don't tell the story of why someone should upgrade.

I think changelogs should be just that, a log of changes. I see them as a point of reference.

Advertising new features and releases should be done in blogposts or other marketing material.

I do think that we should sort the changelogs by priority. Ideally, we'd also adopt the keep-a-changelog format.

@thomaseizinger
Copy link
Contributor

Missing removal of all - unreleased postfixes.

I did that for all crates that are included in the 0.52 release, i.e. I did not remove it for libp2p-quic and libp2p-webrtc.

@thomaseizinger thomaseizinger marked this pull request as ready for review June 15, 2023 20:59
@mxinden
Copy link
Member Author

mxinden commented Jun 19, 2023

Removed the call-outs section. I would still like to highlight some subtle changes in the GitHub release page.

@thomaseizinger anything missing here? If not, mind approving?

@thomaseizinger
Copy link
Contributor

Removed the call-outs section. I would still like to highlight some subtle changes in the GitHub release page.

Sure thing! I am still in favor of writing a blog post as well. I should be able to spend some cycles on that later today.

@thomaseizinger anything missing here?

Don't think so.

@mergify mergify bot merged commit 8776fa8 into libp2p:master Jun 19, 2023
@mxinden
Copy link
Member Author

mxinden commented Jun 19, 2023

Our move to workspace dependencies seems to be problematic when releasing.

Releasing libp2p-core fails as it depends on multistream-select:

➜  core git:(master) cargo release publish --execute          
warning: push target `origin/master` doesn't exist
Publish libp2p-core 0.40.0? [y/N] 
y
  Publishing libp2p-core
    Updating crates.io index
   Packaging libp2p-core v0.40.0 (/home/mxinden/code/github.com/libp2p/rust-libp2p/core)
   Verifying libp2p-core v0.40.0 (/home/mxinden/code/github.com/libp2p/rust-libp2p/core)
    Updating crates.io index
error: failed to verify package tarball

Caused by:
  failed to select a version for the requirement `multistream-select = "^0.13.0"`
  candidate versions found which didn't match: 0.12.1, 0.12.0, 0.11.0, ...
  location searched: crates.io index
  required by package `libp2p-core v0.40.0 (/home/mxinden/code/github.com/libp2p/rust-libp2p/target/package/libp2p-core-0.40.0)`
  perhaps a crate was updated and forgotten to be re-vendored?

Releasing multistream-select fails as it depends, as a dev-dependency, on libp2p-core:

➜  multistream-select git:(master) cargo release publish  --execute        
warning: push target `origin/master` doesn't exist
Publish multistream-select 0.13.0? [y/N] 
y
  Publishing multistream-select
    Updating crates.io index
   Packaging multistream-select v0.13.0 (/home/mxinden/code/github.com/libp2p/rust-libp2p/misc/multistream-select)
   Verifying multistream-select v0.13.0 (/home/mxinden/code/github.com/libp2p/rust-libp2p/misc/multistream-select)
    Updating crates.io index
error: failed to verify package tarball

Caused by:
  failed to select a version for the requirement `libp2p-core = "^0.40.0"`
  candidate versions found which didn't match: 0.39.2, 0.39.1, 0.39.0, ...
  location searched: crates.io index
  required by package `multistream-select v0.13.0 (/home/mxinden/code/github.com/libp2p/rust-libp2p/target/package/multistream-select-0.13.0)`
  perhaps a crate was updated and forgotten to be re-vendored?

Off the top of my head this is due to multistream-select specifying libp2p-core as a workspace dependency in its dev dependencies. The workspace dependency libp2p-core is defined with a version in the root Cargo.toml.

@mxinden
Copy link
Member Author

mxinden commented Jun 19, 2023

@thomaseizinger I am logging off soon. Will debug this more tomorrow. Let me know in case you have any ideas in the meantime.

@thomaseizinger
Copy link
Contributor

Our move to workspace dependencies seems to be problematic when releasing.

Releasing libp2p-core fails as it depends on multistream-select:

➜  core git:(master) cargo release publish --execute          
warning: push target `origin/master` doesn't exist
Publish libp2p-core 0.40.0? [y/N] 
y
  Publishing libp2p-core
    Updating crates.io index
   Packaging libp2p-core v0.40.0 (/home/mxinden/code/github.com/libp2p/rust-libp2p/core)
   Verifying libp2p-core v0.40.0 (/home/mxinden/code/github.com/libp2p/rust-libp2p/core)
    Updating crates.io index
error: failed to verify package tarball

Caused by:
  failed to select a version for the requirement `multistream-select = "^0.13.0"`
  candidate versions found which didn't match: 0.12.1, 0.12.0, 0.11.0, ...
  location searched: crates.io index
  required by package `libp2p-core v0.40.0 (/home/mxinden/code/github.com/libp2p/rust-libp2p/target/package/libp2p-core-0.40.0)`
  perhaps a crate was updated and forgotten to be re-vendored?

Releasing multistream-select fails as it depends, as a dev-dependency, on libp2p-core:

➜  multistream-select git:(master) cargo release publish  --execute        
warning: push target `origin/master` doesn't exist
Publish multistream-select 0.13.0? [y/N] 
y
  Publishing multistream-select
    Updating crates.io index
   Packaging multistream-select v0.13.0 (/home/mxinden/code/github.com/libp2p/rust-libp2p/misc/multistream-select)
   Verifying multistream-select v0.13.0 (/home/mxinden/code/github.com/libp2p/rust-libp2p/misc/multistream-select)
    Updating crates.io index
error: failed to verify package tarball

Caused by:
  failed to select a version for the requirement `libp2p-core = "^0.40.0"`
  candidate versions found which didn't match: 0.39.2, 0.39.1, 0.39.0, ...
  location searched: crates.io index
  required by package `multistream-select v0.13.0 (/home/mxinden/code/github.com/libp2p/rust-libp2p/target/package/multistream-select-0.13.0)`
  perhaps a crate was updated and forgotten to be re-vendored?

Off the top of my head this is due to multistream-select specifying libp2p-core as a workspace dependency in its dev dependencies. The workspace dependency libp2p-core is defined with a version in the root Cargo.toml.

Yeah, cyclic dependencies are not good, even if dev-dependencies technically allow them. We should test multistream-select without depending on libp2p-core. Off the top of my head, we only have this dependency because we test the compatibility with the "upgrade" mechanics in libp2p-core. IMO this is ensured anyway by us having it in our workspace in a mono-repo.

@thomaseizinger
Copy link
Contributor

I think an alternative fix to #4090 could be use path dependencies for all workspace dependencies for dev-dependencies only.

@thomaseizinger
Copy link
Contributor

I think an alternative fix to #4090 could be use path dependencies for all workspace dependencies for dev-dependencies only.

This seems to be the recommended way of dealing with this: rust-lang/futures-rs#2305. The original issue is here: rust-lang/cargo#4242

Reading that thread, it appeared to me that this means that our crate's test won't run in a crater run then because it is missing important dependencies.

I think it would be good to only use path dependencies for dev-dependencies where absolutely necessary. We should strive for our crates to be useful in crater runs.

@thomaseizinger
Copy link
Contributor

I think an alternative fix to #4090 could be use path dependencies for all workspace dependencies for dev-dependencies only.

I coded that up here: #4091

mergify bot pushed a commit that referenced this pull request Jun 20, 2023
All of the removed `dev-dependencies` are only for testing the upgrade procedure in `libp2p-core`. Ironically, this test does not use a single API of `multistream-select`. Thus, this test is simply misplaced in this crate. If we wanted to retain it, it should probably go into `libp2p` itself as that one already depends on all required crates.

Related: #4053.

Pull-Request: #4090.


  
Co-Authored-By: Thomas Eizinger <thomas@eizinger.io>
mergify bot pushed a commit that referenced this pull request Jun 20, 2023
We have two "interface" crates in our workspace: `libp2p-core` and `libp2p-swarm`. Most crates depend on both of these. To compile the tests for this crate, we often need a concrete implementation to some of these interfaces. When specifying a workspace-inherited dependency, we don't get to choose to omit the `version` field next to the path. If a dependency is `path`-only however, it will be tripped by `cargo` during the release process which is why all of this worked before our move to workspace inheritance.

With this patch, we change the minimum amount of dependencies necessary back to `path` dependencies to allowing releasing of our crates.

Related: #4053.

Pull-Request: #4091.


  
Co-Authored-By: Thomas Eizinger <thomas@eizinger.io>
@mxinden
Copy link
Member Author

mxinden commented Jun 20, 2023

Tagged and published the following crates:

  • libp2p-allow-block-list-v0.2.0
  • libp2p-autonat-v0.11.0
  • libp2p-connection-limits-v0.2.0
  • libp2p-core-v0.40.0
  • libp2p-dcutr-v0.10.0
  • libp2p-deflate-v0.40.0
  • libp2p-dns-v0.40.0
  • libp2p-floodsub-v0.43.0
  • libp2p-gossipsub-v0.45.0
  • libp2p-identify-v0.43.0
  • libp2p-kad-v0.44.0
  • libp2p-mdns-v0.44.0
  • libp2p-metrics-v0.13.0
  • libp2p-mplex-v0.40.0
  • libp2p-noise-v0.43.0
  • libp2p-perf-v0.2.0
  • libp2p-ping-v0.43.0
  • libp2p-plaintext-v0.40.0
  • libp2p-pnet-v0.23.0
  • libp2p-quic-v0.8.0-alpha
  • libp2p-relay-v0.16.0
  • libp2p-rendezvous-v0.13.0
  • libp2p-request-response-v0.25.0
  • libp2p-swarm-derive-v0.33.0
  • libp2p-swarm-test-v0.2.0
  • libp2p-swarm-v0.43.0
  • libp2p-tcp-v0.40.0
  • libp2p-tls-v0.2.0
  • libp2p-uds-v0.39.0
  • libp2p-v0.52.0
  • libp2p-wasm-ext-v0.40.0
  • libp2p-webrtc-v0.5.0-alpha
  • libp2p-websocket-v0.42.0
  • libp2p-yamux-v0.44.0
  • multistream-select-v0.13.0
  • quick-protobuf-codec-v0.2.0
  • rw-stream-sink-v0.4.0

@thomaseizinger
Copy link
Contributor

Submitted to TWIR: rust-lang/this-week-in-rust#4446

mxinden added a commit to libp2p/test-plans that referenced this pull request Jun 22, 2023
With rust-libp2p v0.52.0
released (libp2p/rust-libp2p#4053) we can now run off
of the official release commit hash.
umgefahren pushed a commit to umgefahren/rust-libp2p that referenced this pull request Mar 8, 2024
Pull-Request: libp2p#4053.


  
Co-Authored-By: Max Inden <mail@max-inden.de>
  

  
Co-Authored-By: Thomas Eizinger <thomas@eizinger.io>
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