24 Pull Requests
rust-lang

rust-lang/crates.io

The Rust package registry
Rust
View on GitHub https://crates.io
bug
design
feature
documentation
tests
help-wanted
enhancement
Contribulator score: 33 Last scored 2023-11-07 18:31:11 UTC
Contributors (5)
  • BlakeWilliams
  • carols10cents
  • DoumanAsh
  • pimterry
  • Turbo87

Pull requests (208)

Turbo87

middleware/require_user_agent: Migrate to `axum` to rust-lang/crates.io 2022-12-19 18:50:46 UTC

Turbo87

middleware/log_requests: Extract `CustomMetadataRequestExt` trait to rust-lang/crates.io 2022-12-19 18:05:10 UTC

This allows us to call add_custom_metadata() on both conduit::RequestExt and http::Request

Turbo87

middleware/require_user_agent: Move `cdn_user_agent` field into server `config` to rust-lang/crates.io 2022-12-18 17:08:13 UTC

see https://github.com/rust-lang/crates.io/commit/0ef1e2b84a11e4d569acfad7cf9b4ef8bd730148

This will make it easier to access the value from axum-based middlewares.

Turbo87

middleware/update_metrics: Migrate to `axum` to rust-lang/crates.io 2022-12-18 16:47:11 UTC

Just like some of the previous PRs, this PR is migrating yet another conduit-based middleware to be an axum middleware instead :)

Turbo87

tests/unhealthy_database: Increase timeout to 2 sec to rust-lang/crates.io 2022-12-18 10:57:42 UTC

These tests have been quite flaky on CI lately, so maybe increasing the timeout will fix the issue… 🤷‍♂️

Turbo87

Implement axum-based `session` middleware to rust-lang/crates.io 2022-12-16 21:55:55 UTC

Turbo87

middleware/normalize_path: Migrate to `axum` to rust-lang/crates.io 2022-12-16 19:15:24 UTC

This PR ports our normalize_path middleware from conduit to axum.

Since this middleware needs to run before the axum Router is involved, it needs to be wrapped around the router as suggested by https://docs.rs/axum/0.6.1/axum/…

Turbo87

middleware: Extract `apply_axum_middleware()` function to rust-lang/crates.io 2022-12-16 18:39:32 UTC

This moves our axum middleware stack building code into the middleware module, right next to similar code for the conduit middlewares.

Turbo87

middleware/debug: Convert to `axum` middleware to rust-lang/crates.io 2022-12-16 17:09:15 UTC

Turbo87

Remove obsolete `LogConnectionPoolStatus` middleware to rust-lang/crates.io 2022-12-16 17:07:17 UTC

We have all of these metrics in Prometheus/Grafana already, so there is no need anymore for them to clutter up our logs :)

Turbo87

middleware/log_request: Switch to axum-based logging to rust-lang/crates.io 2022-12-15 23:18:21 UTC

This PR drops the logging part of the conduit middleware and uses the axum middleware for it instead, which is now on par with the conduit implementation.

Turbo87

middleware/log_request: Add `error` field to `axum` logging to rust-lang/crates.io 2022-12-15 23:09:48 UTC

In the world of axum request handlers are not (really) allowed to return errors, so we need to rethink how conduit handler errors can be passed to the axum middleware. Since we already support custom metadata we can convert an `Err…

Turbo87

X_REAL_IP: Fix copy paste bug to rust-lang/crates.io 2022-12-15 23:05:07 UTC

… 🤦‍♂️

Turbo87

middleware/log_request: Add custom metadata fields to `axum` logging to rust-lang/crates.io 2022-12-15 22:57:14 UTC

This requires us to go back to putting custom metadata in a request extension, but this time we're putting it in a Arc<Mutex<Vec>> to make it extra complicated… and compatible with axum middlewares 😅

Turbo87

Implement experimental `log_requests` axum middleware to rust-lang/crates.io 2022-12-15 21:14:02 UTC

This is meant to eventually replace the equivalent conduit middleware once it is feature complete. Until then we only log with debug level, which does not show up in production logs.

The two missing pieces are custom metadata and …

Turbo87

email: Use `tracing` to log errors and successes to rust-lang/crates.io 2022-12-15 21:08:44 UTC

Using add_custom_metadata() in the email code makes it hard to port the log_request middleware to axum, due to the CUSTOM_METADATA thread local which appears to be hard to migrate into the async world. The easiest solution for now …

Turbo87

Remove obsolete `triagebot.toml` config to rust-lang/crates.io 2022-12-15 18:40:29 UTC

We're not really using this bot (anymore?).

Turbo87

Remove `X-Request-Start` header code to rust-lang/crates.io 2022-12-15 18:38:04 UTC

This PR essentially reverts #3399, after #5655 has shown that using the existing req.elapsed() is as good of a guess as using the X-Request-Start header.

This has the side effect of slightly simplifying the migration of the `log_re…

Turbo87

Revert "middleware/log_request: Add `nginx_time` field if it is non-zero" to rust-lang/crates.io 2022-12-15 18:27:24 UTC

Reverts rust-lang/crates.io#5655

I've seen enough… 😅

The result of this experiment is that nginx_time was actually negative in all cases where it was logged, which essentially means that req.elapsed() is as good of a guess a…

Turbo87

middleware/log_request: Add `conduit_time` field if it does not match the `service` time to rust-lang/crates.io 2022-12-15 17:09:38 UTC

https://github.com/rust-lang/crates.io/pull/3399 added support for including the nginx processing time in the response time calculation, but we currently don't know what exactly the overhead of the nginx processing is. This PR adds an ad…

Turbo87

Replace `sentry-conduit` with `sentry-tower` to rust-lang/crates.io 2022-12-15 13:09:21 UTC

This PR switches the Sentry integration to the official sentry-tower crate and integrates it with the axum server and our conduit-axum glue code.

Turbo87

conduit-axum: Improve internal server error handling to rust-lang/crates.io 2022-12-15 12:47:14 UTC

Turbo87

util/tracing: Use custom `event_filter()` to rust-lang/crates.io 2022-12-15 09:18:59 UTC

We don't want http logging to clutter the error reporting. These errors are not deduplicated properly, because they contain the request ID and other unique things in the error message.

Turbo87

renovate: Update PR labels to rust-lang/crates.io 2022-12-14 20:21:53 UTC

Turbo87

Revert `base64` dependency upgrade to rust-lang/crates.io 2022-12-14 20:20:30 UTC

This should temporarily resolve https://github.com/rust-lang/crates.io/issues/5646 until we figure out what exactly went wrong and why the background worker still seems to be running correctly despite the Sentry error reports.

« First ‹ Prev 1 2 3 4 5 6 7 8 9 Next › Last »
  • Sponsored by  DNSimple,  Octobox &  Bugsnag
  • About
  • How to contribute?
  • API
  • Unsubscribe
    •  English
    •  Español
    •  Ελληνικά
    •  Português do Brasil
    •  Suomi
    •  Français
    •  Deutsch
    •  Русский
    •  Українська
    •  ไทย
    •  Italiano
    •  Norsk bokmål
    •  தமிழ்
    •  Tr
    •  简体中文
    •  正體中文
    •  日本語
    •  Čeština
    •  हिंदी
    •  Polski
    • Translate into your language!