Vapor Versions Save

💧 A server-side Swift HTTP web framework.

4.89.2

5 months ago

What's Changed

Consistently use the value from X-Request-Id as the request's ID when present by @baarde in #3117

Changes

This PR ensures that the Request’s id and the value of the logger’s request-id value are the same.

Motivation

The Request’s id property was added in #2964 to expose the request-id identifier used for logging.

#3072 changed this behavior. The request-id identifier is now set:

  • to the value from the X-Request-Id header, when the header is present,
  • to a random identifier, when the header is absent.

Having two different identifiers is confusing. So, this PR reconciles the two values.

History

The first version of this PR allowed the two identifiers to differ when the X-Request-Id header is present, in order to maintain the original semantics of the id property.

New Contributor

  • @baarde made their first contribution in #3117 🎉

Reviewers

Thanks to the reviewers for their help:

  • @MahdiBM
This patch was released by @0xTim

Full Changelog: https://github.com/vapor/vapor/compare/4.89.1...4.89.2

4.89.1

5 months ago

What's Changed

Fix encoding and decoding of HTTPHeaders by @gwynne in #3116

The Codable conformance Vapor adds to the HTTPHeaders type now correctly handles cases where more than one header with the same name (such as Set-Cookie) is present, for both encoding and decoding.

The previous encoding format is still recognized for decoding, so that existing serialized data can be safely read.

This patch was released by @gwynne

Full Changelog: https://github.com/vapor/vapor/compare/4.89.0...4.89.1

4.89.0

5 months ago

What's Changed

Add fully async entrypoints by @gwynne in #3114

Pretty much what it says on the tin. Use the new execute() API instead of run(), and/or startup() instead of start().

Reviewers

Thanks to the reviewers for their help:

  • @Joannis
This patch was released by @gwynne

Full Changelog: https://github.com/vapor/vapor/compare/4.88.0...4.89.0

4.88.0

5 months ago

What's Changed

Bring back AsyncCommands by @marius-se in #3109

Brings async commands back by adding a new property asyncCommands to Application.

New Contributor

  • @marius-se made their first contribution in #3109 🎉
This patch was released by @0xTim

Full Changelog: https://github.com/vapor/vapor/compare/4.87.1...4.88.0

4.87.1

5 months ago

What's Changed

General warnings and tests cleanup by @gwynne in #3107

These changes fix almost all of the extant warnings in Vapor, and clean up some issues in the tests, which can now run fully parallelized. There are no functional changes.

This patch was released by @gwynne

Full Changelog: https://github.com/vapor/vapor/compare/4.87.0...4.87.1

4.87.0

5 months ago

What's Changed

Add public initializer for XCTHTTPRequest by @hsharghi in #3106

Add public initializer for XCTHTTPRequest This PR will fix https://github.com/vapor/vapor/issues/3105

Add public initializer for XCTHTTPRequest

New Contributor

  • @hsharghi made their first contribution in #3106 🎉
This patch was released by @gwynne

Full Changelog: https://github.com/vapor/vapor/compare/4.86.2...4.87.0

4.86.2

6 months ago

What's Changed

Make Async Request Body actually work by @0xTim in #3096

The existing implementation of adding an AsyncSequence to Request.Body had two issues:

  • it didn’t ensure code was being called from the correct event loop which broke Sendable guarantees and was unsafe
  • it would hit a precondition failure in the implementation if backpressure was triggered because the initial state was not accounted for

This fixes that

Reviewers

Thanks to the reviewers for their help:

  • @MahdiBM
This patch was released by @0xTim

Full Changelog: https://github.com/vapor/vapor/compare/4.86.1...4.86.2

4.86.1

6 months ago

What's Changed

Create a thread pool of System.coreCount rather than 64 when initializing an Application by @dfed in #3092

Following this recommendation, this PR simply changes the default number of cores when initializing an Application from 64 to the current number of cores.

This means that initializing an Application with default arguments now spins up 2x the number of threads as cores on device. We’ll create System.coreCount threads when instantiating the threadPool, and another System.coreCount threads when we instantiate the eventLoopGroup.

2x System.coreCount is still way better than System.coreCount + 64 on older devices, so while this PR does not directly address #3003, it does reduce total thread usage on init.

New Contributor

  • @dfed made their first contribution in #3092 🎉
This patch was released by @gwynne

Full Changelog: https://github.com/vapor/vapor/compare/4.86.0...4.86.1

4.86.0

6 months ago

What's Changed

Make Request Sendable by @0xTim in #3093

Final stage of Vapor’s Sendable journey as Request is now Sendable.

There should be no more Sendable warnings in Vapor, even with complete concurrency checking turned on.

Reviewers

Thanks to the reviewers for their help:

  • @MahdiBM
This patch was released by @0xTim

Full Changelog: https://github.com/vapor/vapor/compare/4.85.1...4.86.0

4.85.1

6 months ago

What's Changed

Remove Sendable requirements on Authenticatable by @0xTim in #3095

Removes the requirement for Authenticatable types to be Sendable which was causing issues with Fluent models (and any reference types) and wasn’t solvable in a non-breaking way.

This uses an unsafe box to wrap the Authenticatable types which removes compiler checking on usage of the box but should not be an issue due to the way Vapor’s auth is implemented

This patch was released by @0xTim

Full Changelog: https://github.com/vapor/vapor/compare/4.85.0...4.85.1