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(deps): bump tokio from 1.21.0 to 1.24.2 #398

Open
wants to merge 77 commits into
base: main
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Feb 4, 2023

Bumps tokio from 1.21.0 to 1.24.2.

Release notes

Sourced from tokio's releases.

Tokio v1.24.1

This release fixes a compilation failure on targets without AtomicU64 when using rustc older than 1.63. (#5356)

#5356: tokio-rs/tokio#5356

Tokio v1.24.0

The highlight of this release is the reduction of lock contention for all I/O operations (#5300). We have received reports of up to a 20% improvement in CPU utilization and increased throughput for real-world I/O heavy applications.

Fixed

  • rt: improve native AtomicU64 support detection (#5284)

Added

  • rt: add configuration option for max number of I/O events polled from the OS per tick (#5186)
  • rt: add an environment variable for configuring the default number of worker threads per runtime instance (#4250)

Changed

  • sync: reduce MPSC channel stack usage (#5294)
  • io: reduce lock contention in I/O operations (#5300)
  • fs: speed up read_dir() by chunking operations (#5309)
  • rt: use internal ThreadId implementation (#5329)
  • test: don't auto-advance time when a spawn_blocking task is running (#5115)

#5186: tokio-rs/tokio#5186 #5294: tokio-rs/tokio#5294 #5284: tokio-rs/tokio#5284 #4250: tokio-rs/tokio#4250 #5300: tokio-rs/tokio#5300 #5329: tokio-rs/tokio#5329 #5115: tokio-rs/tokio#5115 #5309: tokio-rs/tokio#5309

Tokio v1.23.1

This release forward ports changes from 1.18.4.

Fixed

  • net: fix Windows named pipe server builder to maintain option when toggling pipe mode (#5336).

#5336: tokio-rs/tokio#5336

Tokio v1.23.0

Fixed

  • net: fix Windows named pipe connect (#5208)
  • io: support vectored writes for ChildStdin (#5216)
  • io: fix async fn ready() false positive for OS-specific events (#5231)

... (truncated)

Commits

Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

> **Note** > Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

hawkw and others added 22 commits August 5, 2022 12:36
This branch updates the console crates' dependency on `tonic` to v0.8.0
and `prost` to 0.11.0.

In addition, I've added a [`cargo xtask`][xtask] command for manually
regenerating the generated protobuf bindings.

This is necessary as the current approach, regenerating the bindings in
an integration test, does not work when the protos fail to compile
(which they do after the Tonic update). Since running the crate's tests
requires compiling the crate, if the proto bindings don't compile, we
can't re-run the test.

[xtask]: https://github.com/matklad/cargo-xtask
This changes the console CLI's error handling so that GitHub issues are
only suggested for panics, not for recoverable errors (such as "no
config file found", "couldn't connect to remote host", etc).
This way, if running a subcommand panics/errors, we still get nice
`color-eyre` reports.
This commit adds `color_eyre`'s default backtrace frame filters, so we
skip stuff that's not relevant.
This adds a dump of all the console's config options to the issue
metadata for GitHub issues generated using `color_eyre`'s GitHub issue
generation on panics.

<details>

<summary>Example issue Markdown:</summary>

## Error
```
lol
```

## Metadata
|key|value|
|--|--|
|**version**|0.1.6|
|**config.subcmd**|`None`|
|**config.target_addr**|`Some(http://127.0.0.1:6669/)`|
|**config.env_filter**|`None`|
|**config.log_directory**|`Some("/tmp/tokio-console/logs")`|
|**config.retain_for**|`None`|
|**config.view_options.no_colors**|`false`|
|**config.view_options.lang**|`Some("en_US.UTF-8")`|
|**config.view_options.ascii_only**|`Some(false)`|
|**config.view_options.truecolor**|`Some(true)`|
|**config.view_options.palette**|`Some(All)`|
|**config.view_options.toggles.color_durations**|`Some(false)`|
|**config.view_options.toggles.color_terminated**|`Some(false)`|
|**location**|tokio-console/src/main.rs:36:5|

</summary>
<a name="0.4.0"></a>
## 0.4.0 (2022-08-10)

#### Breaking Changes

*  Update `tonic` to `0.8` (#364) ([40e2f6f](40e2f6f))

#### Features

*  Update `tonic` to `0.8` (#364) ([40e2f6f](40e2f6f))
<a name="0.1.7"></a>
## 0.1.7 (2022-08-10)

#### Features

*  Update `tonic` to `0.8` (#364) ([40e2f6f](40e2f6f))
*  Update `console-api` to `0.4` (#364) ([40e2f6f](40e2f6f))
<a name="0.1.7"></a>
## 0.1.7 (2022-08-10)

#### Features

*  include config options in autogenerated issues (#365)
   ([fcb54df](fcb54df))
*  filter out boring frames in backtraces (#365) ([523a44a](523a44a))
*  init error handling before subcmds (#365) ([6646568](6646568))
*  only suggest opening issues for panics (#365) ([23cb6bf](23cb6bf))
*  update `tonic` to `0.8` (#364) ([40e2f6f](40e2f6f))
*  update `console-api` to `0.4` (#364) ([40e2f6f](40e2f6f))
Needed for #374.

This configures clippy to ignore most of the generated code in
`console-api`.
Due to a change in the unstable task builder APIs, this no longer
compiles with the latest version of Tokio. Fortunately, it's a simple
fix.
<a name="0.1.7"></a>
## 0.1.8 (2022-09-04)

#### Bug Fixes

*  fix build on tokio 1.21.0 (#374) ([0106407](0106407))
Fixes: #372

`--ascii-only true` shows ascii
`--ascii-only false` shows emojis

if `--ascii-only` is not passed, default value will be true, shows emojis
Currently, the documented `cargo-run` in README no longer works, as now
there are two binaries:

```console
$ cargo run
error: `cargo run` could not determine which binary to run. Use the `--bin` option t
o specify a binary, or the `default-run` manifest key.
available binaries: tokio-console, xtask
```

This branch declares the `tokio-console` binary as the [`default-run`]
value in the `Cargo.toml`, so it is now run by default by `cargo run`.

Alternatively, we can just update the README line with `cargo run --bin
tokio-console`

[`default-run`]:
    (https://doc.rust-lang.org/cargo/reference/manifest.html#the-default-run-field)
Found via these commands:

    codespell .
    markdownlint *.md --disable MD013
Currently, the help text for the `r` and `t` keystrokes to switch to the
Resources and Tasks views is shown on the Task Details and Resource
Details views, as well as on the Task List and Resource List views.

See this screenshot for an example:
![image](https://user-images.githubusercontent.com/2345750/202058962-4a8f062c-78fd-47eb-a3b1-5de470976aa8.png)

However, the keystrokes are not actually handled while the console is
showing a details view.

This branch changes the console to handle the `r` and `t` keystrokes on
all views. This also simplifies the keyboard input code somewhat.
Build and add to the released binaries for `aarch64-unknown-linux-gnu`,
`aarch64-apple-darwin` and `aarch64-pc-windows-msvc`
Hey I noticed this out of date in my `Cargo.lock`, and since I didn't
see any PRs/issues open doing so already, figured I'd open one!
Signed-off-by: hi-rustin <[email protected]>

Signed-off-by: hi-rustin <[email protected]>
@dependabot dependabot bot requested a review from a team as a code owner February 4, 2023 00:31
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Feb 4, 2023
@dependabot dependabot bot force-pushed the dependabot/cargo/tokio-1.24.2 branch from 3a7d5c9 to 5eb2add Compare February 6, 2023 18:46
hds added 2 commits March 8, 2023 15:01
The durations in the tokio-console UI are shown with a unit, so the
digits after the decimal separator are generally not relevant. Since
space is at a premium in a terminal UI, it makes sense to cut down where
possible.

This change removes all digits after the decimal separator in the tasks
table view. In the task detail view, 2 decimal places are kept.

Additionally, 4 new duration formats are added to represent
minutes-with-secondsi, hours-with-minutes, days-with-hours and days.
These are only applied once the leading unit is greater than zero.

For example, 59 seconds will be shown as seconds: `99s` and then 60
seconds will be shown as minutes-with-seconds: `1m00s`. New colors have
been chosen for each format.

NOTE: I had to make a small unrelated change in
`task::Details::make_percentiles_widget` to make clippy happy.

Fixes: #224
The `color-eyre` crate was previously on version 0.5. This version
depends on `tracing-subscriber` 0.2, meaning that we had 2 different
veresions of `tracing-subscriber` in our dependency tree.

This change updates `color-eyre` to 0.6, which depends on
`tracing-subscriber` 0.3, the same as `console-subscriber`.
@dependabot dependabot bot force-pushed the dependabot/cargo/tokio-1.24.2 branch from 5eb2add to 900f989 Compare March 28, 2023 16:14
joshka and others added 26 commits May 31, 2023 09:31
Self-wakes were not being detected and displayed in the console. The
`burn` task in the `app` example - which deliberately has many
self-wakes - was not registering any.

It appears that a logic error was present in the self-wake counting in
`console-subscriber` since it was added in #238. When a self wake was
detected, the `wakes` count was incremented a second time (the `wakes`
count is incremented for all wakes before checking for a self wake),
instead of increamenting the `self_wakes` count.

This PR fixes the logic so that when a self wake is detected, the
`self_wakes` count is incremented.
Each view in tokio-console has a widget up the top that lists the
available controls for that view. There was a common implementation of
this for table based views (tasks, resources, and async_ops) and
separate implementations for the task and resource views. The resource
view included two controls widgets, one for the Resource details at the
top of the view, and another above the table of Async Ops at the bottom
of the view.

This change centralises the logic for the creation of this controls
widget. This change is mostly a precursor to also displaying the
controls in the help view (at which point we can revisit whether the
entire list needs to be shown at the top of the screen).

Controls (an action and the key or keys used to invoke it) are defined
in structs so that their definition can be separated from the display
logic (which includes whether or not UTF-8 is supported).

This allows the problem of the text in the controls widget wrapping in
the middle of a control definition to be fixed. Previously a subset of
the controls would have wrapped like this:

```text
controls: select column (sort) = ←→ or h, l, scroll = ↑↓ or k, j, view details
= ↵, invert sort (highest/lowest) = i,
```

Notice how "view details = ↵," was split across multiple lines. The same
list of controls will now wrap at a full control definition.

```text
controls: select column (sort) = ←→ or h, l, scroll = ↑↓ or k, j,
view details = ↵, invert sort (highest/lowest) = i,
```

Additionally, the list of controls on the Resource view has been
consolidated up the top of the screen.

Universal controls, those that are available in all views, are also
defined centrally. As well as the quit action, using the space bar to
pause has been added to that list. This was previously somewhat of an
undocumented feature.
We often receive questions about the meaning of certain columns in the
different views in Tokio Console.

This change adds additional documentation to the `tokio-console` README
- which is also used in the docs.rs main page - describing each column
in the tasks, resources, and async ops tables. Where there are a fixed
set of values possible in the column, those values are also described.

Additionally, the 4 views are enumerated and separated into sections to
aid readability and allow deep linking.

Co-authored-by: Eliza Weisman <[email protected]>
* fix(console): remove trailing space from task/resource location

When a file location is formatted, an extra space is added at the end.
This appears to be the result of some refactoring from a case where we
needed the extra space at the end.

Currently, the extra space results in there being 2 spaces between the
Location column and the Fields column in the tasks list view, and the
same between the Location column and the Attributes column in the
resources list view.

It is also causing issues when attempting to truncate the first part of
the location in #441 (during which this extra space was discovered).

This change removes the trailing space.
When entering and exiting a span the old code was also updating the parent
stats. This was causing excessive polling being reported for the parent tasks.
See issue #378 for more details. The regression was introduced by the refactor
in #238.
This fixes the issue by limiting updates to the current span.

Closes #378

Co-authored-by: Hayden Stainsby <[email protected]>
Co-authored-by: Eliza Weisman <[email protected]>
This closes #411.

This is how it looks like.

<img width="514" alt="Screenshot 2023-07-03 at 12 22 24 PM" src="https://github.com/tokio-rs/console/assets/41150432/878a43e6-1512-49c0-85fd-0e245cc6ee04">

Co-authored-by: Hayden Stainsby <[email protected]>
This PR adds an explicit dependency to futures-core for `console-api` to
fix broken builds. Without this fix I get the following errors:

```
error[E0433]: failed to resolve: use of undeclared crate or module `futures_core`
   --> /home/weiznich/.cargo/registry/src/index.crates.io-6f17d22bba15001f/console-api-0.5.0/src/generated/rs.tokio.console.instrument.rs:275:34
    |
275 |         type WatchUpdatesStream: futures_core::Stream<
    |                                  ^^^^^^^^^^^^ use of undeclared crate or module `futures_core`

error[E0433]: failed to resolve: use of undeclared crate or module `futures_core`
   --> /home/weiznich/.cargo/registry/src/index.crates.io-6f17d22bba15001f/console-api-0.5.0/src/generated/rs.tokio.console.instrument.rs:289:38
    |
289 |         type WatchTaskDetailsStream: futures_core::Stream<
    |                                      ^^^^^^^^^^^^ use of undeclared crate or module `futures_core`

error[E0433]: failed to resolve: use of undeclared crate or module `futures_core`
   --> /home/weiznich/.cargo/registry/src/index.crates.io-6f17d22bba15001f/console-api-0.5.0/src/generated/rs.tokio.console.trace.rs:212:27
    |
212 |         type WatchStream: futures_core::Stream<
    |                           ^^^^^^^^^^^^ use of undeclared crate or module `futures_core`

```

The somewhat funny thing is that only happened after I've updated some
unrelated dependencies. It worked before, but after looking at the
relevant code I'm really surprised that it ever compiled without error.
The `ConsoleLayer` builder provides the user with a console layer and
a server, which is used to start the gRPC server.

However, it may be desireable to expose the instrumentation server together
with other services on the same Tonic router. This was requested
explicitly in #449 428.

Additionally, to add tests which make use of the instrumentation server
(as part of improving test coverage for #450), more flexibility is
needed than what is provided by the current API. Specifically we would
like to connect a client and server via an in memory channel, rather
than a TCP connection.

This change adds an additional method to `console_subscriber::Server`
called `into_parts` which allows the user to access the
`InstrumentServer` directly. The `Aggregator` is also returned and
must be set to run for at least as long as the instrument server. This
allows the aggregator to be spawned wherever the user wishes.

To facilitate the addition of functionality which would result in more
"parts" in the future, `into_parts` returns a non-exhaustive struct,
rather than a tuple of parts.

Closes: #428
…449)

Now it is possible while navigate in `async_ops_table` to go directly to
details of the task that you are pointing on the list.

This closes #448
The current logic present in `IdData::drop_closed` marks an item (task,
resource, and async op stats) to be dropped in the case that the item
**is** dirty and there **are** watchers: `(dirty && has_watchers)`.

This causes a case where if an item is first received and then completes
in between the aggregator push cycle, it will be discarded immediately
and never sent.

This logic has been in place since the concepts of watchers and dirty
items was introduced in #77. However since an item that is created and
then dropped within a single update cycle isn't likely to be missed in
the UI, it may never have been noticed.

Instead the logic should be to **retain** an item if **any** of the
following is true:
* there are watchers and the item is dirty: `(dirty && has_watchers)`
* item has been dropped less time than the retention period:
  `dropped_for <= retention`.
I just came across this typo in the Readme when using `tokio-console` for the first time. 
This is a great tool 👍
…Id (#455)

In #403, the tasks list view was changed to display the `tokio::task::Id` of
the task, instead of the tokio-console generated display ID (which isn't
stable across restarts of the tokio-console itself. However, the task
detail view wasn't updated and was still using the display ID.

This change fixes the ID displayed in the task detail view so that it also
displays the `tokio::task::Id` of the task.
Clippy was complaining about 3 new things in 1.72.0. Two new lints and
one updated one.

When `futures-core` was added as an explicit dependency on `console-api`
in #453, it was only added to the `console-api` Cargo.toml file. It
wasn't added to the Cargo.lock file shared by the workspace.

Since Rust 1.72.0, Cargo is adding this dependency to Cargo.lock
locally, so it makes sense to check in that change.
Add cfg `console_without_tokio_unstable` for developers to turn off the
assertion on `tokio_unstable`. This is useful for non-tokio runtimes
which has `tokio-console` support.
I noticed that `console-subscriber` was my only dependency pulling in
the `futures` top-level library so I decided to try my hand at removing
that dependency. This still relies on `futures-task` for an optimized
`NoopWaker`
@hds
Copy link
Collaborator

hds commented Aug 29, 2023

@dependabot rebase

Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.21.0 to 1.24.2.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/commits)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.