Skip to content

Conversation

sebsto
Copy link
Contributor

@sebsto sebsto commented Jan 13, 2025

Rewrite to MockServer (used only for performance testing and part of a separate target) to comply with Swift 6 language mode and concurrency.

The new MockServer now uses NIOAsyncChannel and structured concurrency.

Instead of adding support to MAX_REQUEST environment variable like v1 did, we implemented support for MAX_REQUEST environment variable in the MockServer itself. It closes the connection and shutdown the server after servicing MAX_INVOCATIONS Lambda requests). This allow to add the MAX_REQUEST penalty on the MockServer and not on the LambdaRuntimeClient.

However, currently, the LambdaRuntimeClient does not shutdown when the MockServer ends. I created #465 to track this issue.

See #377

@sebsto sebsto added the semver/none No version bump required. label Jan 13, 2025
@sebsto sebsto changed the title Update mock server for Swift 6 compliance [test] Update mock server for Swift 6 compliance Jan 14, 2025
@sebsto
Copy link
Contributor Author

sebsto commented Jan 15, 2025

Mock server is now compliant to swift 6 concurrency (thank you @FranzBusch )
Can you have a look at the code as you are expert in NIO. Thanks

This PR is now blocked by #465

@sebsto sebsto added the status/blocked Waiting for another issue. label Jan 15, 2025
@sebsto sebsto self-assigned this Jan 15, 2025
@sebsto sebsto requested a review from FranzBusch January 15, 2025 10:59
@sebsto sebsto added this to the 2.0 milestone Jan 16, 2025
@sebsto sebsto enabled auto-merge (squash) January 22, 2025 12:00
@sebsto sebsto merged commit 02821fe into swift-server:main Jan 22, 2025
30 checks passed
@sebsto sebsto deleted the sebsto/mockserver branch January 22, 2025 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/none No version bump required. status/blocked Waiting for another issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants