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: Split `ServiceBuilder` stacks to rust-lang/crates.io 2023-12-13 14:18:37 UTC

This should allow us to add more middlewares without significantly affecting compile performance (see #7708).

Turbo87

Ensure that axum extractors return JSON errors to rust-lang/crates.io 2023-12-13 11:38:23 UTC

to quote from the code comment:

> The built-in extractors in axum return plain text errors, but our API contract promises JSON errors. This middleware converts such plain text errors into corresponding JSON errors, allowing us to us…

Turbo87

clippy: Warn about `todo!()` usage to rust-lang/crates.io 2023-12-12 12:17:00 UTC

Surprisingly, clippy does not warn about todo!() by default. This PR changes that to avoid us unintentionally pushing work-in-progress code to the main branch.

Turbo87

util/errors: Simplify `ServiceUnavailable` struct to rust-lang/crates.io 2023-12-12 12:15:40 UTC

If we only ever put "Service unavailable" in it we might as well simplify the code :D

Turbo87

tests/util: Accept all `Into<Body>` implementations in `run()` fn to rust-lang/crates.io 2023-12-08 13:33:56 UTC

This makes the function a bit more generic and reduces our reliance on Bytes. Instead of using .body(Bytes::new()) we can now use .body(&quot;&quot;) which shrinks the code a bit. .body(()) is unfortunately not possible yet (see https://gi…

Turbo87

Fix `User-Agent` header requirement error responses to rust-lang/crates.io 2023-12-07 20:11:12 UTC

The middleware that is responsible for rejecting requests without a User-Agent header runs after the middleware that logs requests. The request logging middleware however was expecting a TypedHeader&lt;UserAgent&gt;, which meant that reque…

Turbo87

tests/util/response: Avoid unnecessary `.clone()` call to rust-lang/crates.io 2023-12-07 18:31:10 UTC

Turbo87

util/bytes_request: Simplify `LengthLimitError` downcast to rust-lang/crates.io 2023-12-07 15:38:31 UTC

Looks like the two layers above it aren't actually necessary 🤷‍♂️

Turbo87

Upgrade to axum 0.7 to rust-lang/crates.io 2023-12-06 14:59:00 UTC

This PR upgrades our projects to axum 0.7 and hyper 1.x.

The changes on the axum side are described by https://tokio.rs/blog/2023-11-27-announcing-axum-0-7-0

Unfortunately there appears to be no way to adopt most of these breaking …

Turbo87

tests/server_binary: Convert `u64` constant to `Duration` to rust-lang/crates.io 2023-12-05 08:39:09 UTC

There is no need for the _SECONDS suffix if we use Duration directly for the const :)

Turbo87

middleware: Move compression and timeout layers out of the `ServiceBuilder` to rust-lang/crates.io 2023-12-05 08:27:52 UTC

Having RequestBodyTimeoutLayer (which changes the Body type of the Request) in the middle of the ServiceBuilder has already been hard to deal with in the past, and does not seem to work anymore with axum 0.7. This change moves th…

Turbo87

Fix `reqwest` imports to rust-lang/crates.io 2023-12-05 08:26:15 UTC

In the current situation reqwest reexports the header code from the http crate. However once we update hyper to 1.x we will have two copies of the http crate, with differing major versions. This leads to conflicts between the hea…

Turbo87

tests/server_binary: Assert on exact HTTP response status codes to rust-lang/crates.io 2023-12-05 08:21:09 UTC

We know the exact status code that we expect, so we might as well use assert_eq!() instead of the custom matcher implementation.

Turbo87

util/bytes_request: Simplify test code to rust-lang/crates.io 2023-12-04 20:06:26 UTC

Turbo87

tests/util/response: Replace `reqwest::blocking::Response` with `hyper::Response` to rust-lang/crates.io 2023-12-04 15:50:52 UTC

This should make our migration to axum 0.7 and hyper 1.x a little easier since our version of reqwest is currently not compatible with hyper 1.x.

Turbo87

worker/worker: Convert `run()` fns to async to rust-lang/crates.io 2023-12-03 18:18:54 UTC

Turbo87

admin/delete_crates: Show list of owners before deleting crates to rust-lang/crates.io 2023-12-03 13:31:22 UTC

Turbo87

worker/jobs/git: Push squash snapshot branches to `GIT_ARCHIVE_REPO_URL` too to rust-lang/crates.io 2023-12-03 10:58:14 UTC

This should automate the first part of https://ops-guide.crates.io/ops/index-squash.html#manual-work

Turbo87

middleware/balance_capacity: Migrate to `axum` to rust-lang/crates.io 2022-12-20 18:39:16 UTC

This is the final middleware that needed to be migrated to axum. The rest of the middlewares are only relevant to the conduit route handlers.

Turbo87

Simplify `BalanceCapacity` middleware to rust-lang/crates.io 2022-12-20 17:41:53 UTC

Instead of reading all environment variables when we create the middleware, we outsource this to the server config construction and then access the relevant values via request.app().config.

The reason for this change is that axum …

Turbo87

middleware/ember_html: Migrate to `axum` to rust-lang/crates.io 2022-12-20 17:31:29 UTC

Another PR, another middleware migrated from conduit to axum… 🚀

Turbo87

middleware/update_metrics: Implement `GaugeGuard` struct to rust-lang/crates.io 2022-12-20 17:12:55 UTC

This is similar to the RequestCounter of the balance_capacity middleware and ensures that the gauge is decreased again even if a different exit path out of the method is used somehow (i.e. panic!()).

Turbo87

middleware/static_or_continue: Migrate to `axum` to rust-lang/crates.io 2022-12-20 17:02:16 UTC

This PR is migrating most of our static file serving from conduit to `axum.

Previously the middleware was configurable with a path, but axum middlewares make this a bit more complicated (can't use from_fn()). Since we only need …

Turbo87

middleware/head: Migrate to `axum` to rust-lang/crates.io 2022-12-19 19:14:44 UTC

… aaaand another middleware migrated from conduit to `axum.

Turbo87

middleware/block_traffic: Migrate to `axum` to rust-lang/crates.io 2022-12-19 19:04:26 UTC

This PR migrates our header-based traffic blocking middleware to axum. It is slightly different from the original conduit middleware in that we perform the iteration inside the middleware instead of applying the middleware N times.

« 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!