Commit Graph
475 Commits
Author SHA1 Message Date
Rick Newton-Rogers 5bfcf2416d Apply suggestion from @rnro 2025-10-02 15:21:32 +01:00
Rick Newton-Rogers ad09af1633 TESTING CI DO NOT MERGE 2025-10-02 12:01:37 +01:00
Rick Newton-Rogers b450646b59 Enable Swift 6.2 jobs in CI (#526)
Motivation:

Swift 6.2 has been released, we should add it to our CI coverage.

Modifications:

Add additional Swift 6.2 jobs where appropriate in main.yml,
pull_request.yml

Result:

Improved test coverage.
2025-09-22 12:42:17 +00:00
Raphael 95c084ae51 Enable release mode builds (#524)
### Motivation:

Some errors do not show up in debug builds. Enabling release mode builds
improves the CI coverage.

### Modifications:

Enable release mode builds for pull requests and scheduled builds on
main.

### Result:

Improved CI coverage.
2025-07-30 09:00:19 +01:00
George Barnett 5e9e99ec96 Add a frame delegate (#522)
Motivation:

Frames written from a child channel may not be written immediately by
the connection channel. For example, a DATA frame written on a stream
may be larger than the max frame size imposed on the connection and so
the connection channel will have to slice it into multiple frames. Or
the connection may not be writable and may delay the transmission of the
frame. This behaviour isn't currently observable but is useful to know
about.

Modifications:

- Add a frame delegate which is notified when certain frames are written
by the connection channel.

Result:

Users can observer when headers and data frames are written into the
connection channel.
1.38.0
2025-07-18 15:30:36 +01:00
Gus Cairo f0e94525a7 Add GlitchesMonitor (#518)
Add a `GlitchesMonitor` that will terminate a connection if too many glitches are triggered.
See https://github.com/HTTPWorkshop/workshop2024/blob/main/talks/1.%20Security/glitches.pdf for details.
2025-07-16 16:19:40 +01:00
Gus Cairo bf0645a009 Update allocation thresholds (#520) 2025-07-03 16:39:55 +01:00
Rick Newton-Rogers 5ca52e2f07 Add static SDK CI workflow (#500)
Add static SDK CI workflow which runs on commits to PRs, merges to main
and daily on main.
1.37.0
2025-06-26 10:16:36 +00:00
Gus Cairo 623755c0cd Enable warnings as errors (#517) 2025-05-14 14:17:48 +01:00
Rick Newton-RogersandGeorge Barnett ee831fb9e7 Drop Swift 5.9 (#515)
Motivation:

Swift 5.9 is no longer supported, we should bump the tools version and
remove it from our CI.

Modifications:

* Bump the Swift tools version to Swift 5.10
* Remove Swift 5.9 jobs where appropriate in main.yml, pull_request.yml

Result:

Code reflects our support window.

---------

Co-authored-by: George Barnett <gbarnett@apple.com>
2025-05-07 07:59:35 +01:00
George Barnett 4281466512 Remove temporary shims (#514)
Motivation:

We added a couple of shims which were upstreamed to swift-nio and were
released in 2.82.0.

Modifications:

- Bump minimum verison of swift-nio
- Remove shims

Result:

Less code
1.36.0
2025-04-23 07:29:33 +01:00
Rick Newton-Rogers 31d5bdb86b update thresholds (#513)
update thresholds from Swift 6.0 thresholds
2025-04-14 11:59:58 +01:00
Rick Newton-Rogers 37c302e6da Enable Swift 6.1 jobs in CI (#512)
Motivation:

Swift 6.1 has been released, we should add it to our CI coverage.

Modifications:

Add additional Swift 6.1 jobs where appropriate in main.yml,
pull_request.yml

Result:

Improved test coverage.
2025-04-14 10:52:17 +01:00
Rick Newton-Rogers e574770917 Switch h2Spec tests to newer Swift test matrix (#511)
### Motivation:

To remove all uses of the older workflow so it can be removed to
simplify the workflows.

### Modifications:

* Switch h2Spec tests to use the newer Swift test matrix workflow,
`swift_test_matrix.yml`

### Result:

This should make no difference to the running of h2Spec tests.
2025-04-10 08:01:12 +01:00
Rick Newton-Rogers f98e90cbf6 Enable macOS CI on pull requests (#510)
Motivation:

* Improve test coverage

Modifications:

Enable macOS CI to be run on pull request commits and make the use of
the nightly runner pool for main.yml jobs explicit.

Result:

Improved test coverage.
2025-04-01 17:40:10 +01:00
George BarnettandRick Newton-Rogers 159ef997b2 Strict concurrency for tests (#507)
Co-authored-by: Rick Newton-Rogers <rnro@apple.com>
2025-03-31 13:38:26 +01:00
George Barnett 9a582726cf Strict concurrency for perf tests and the h2 server (#509) 2025-03-31 11:31:38 +01:00
George Barnett 276b9cb73d Provide a senable view over the stream multiplexer (#506)
Motivation:

The HTTP2StreamMultiplexer isn't `Sendable`, but it has public API for
creating streams which must operate from off of the `EventLoop`.

Modifications:

- Add a `SendableView` over the multiplexer which only provides the
methods for creating streams. These are safe to call from any isolation
domain.

Result:

Can create streams from off of the EL.
2025-03-27 14:10:38 +00:00
George Barnett 61f6aa4142 Add explicit Sendable annotations (#505) 2025-03-27 14:01:05 +00:00
George BarnettandRick Newton-Rogers 0c020df343 Strict concurrency for pipeline helpers (#503)
Motivation:

To increase concurrency safety the NIOHTTP2 module should compile
without warning under strict concurrency checking.

Modifications:

- Add a few temporary internal helpers
- Annotate the pipeline helpers

Result:

Fewer concurrency warnings

Co-authored-by: Rick Newton-Rogers <rnro@apple.com>
2025-03-27 11:33:37 +00:00
Rick Newton-Rogers 9f0d47ef62 Enable macOS CI on merge to main and daily timer (#504)
Enable macOS CI on merge to main and daily timer

### Motivation:

* Improve test coverage
* Check test pass/fail status
* Monitor CI throughput

### Modifications:

Enable macOS CI to be run on all merges to main and on a daily timer.

### Result:

Improved test coverage run out-of-band at the moment so we can get a
feeling for if any changes need to be made in the repo or in the CI
pipelines to ensure timely and stable checks.
2025-03-26 17:01:11 +01:00
George Barnett a7a0a9a118 Strict concurrency for NIOHPACK (#502)
Motivation:

To increase concurrency safety the NIOPHACK module should compile
without warning under strict concurrency checking.

Modifications:

- Add explicit Sendable annotations

Result:

No concurrency warnings.
2025-03-21 17:15:54 +00:00
Rick Newton-Rogers b46cdf06d4 Update main.yml integration tests to use swift_test_matrix (#499)
Update main.yml integration tests to use `swift_test_matrix` as has been
done on the PR workflow. This brings it off the deprecated workflow and
should fix the nightly-6.1 issue
2025-03-14 14:50:09 +01:00
Rick Newton-Rogers 84076bb64b Only apply standard swift settings on valid targets (#498)
Only apply standard swift settings on valid targets. The current check
ignores plugins but that is not comprehensive enough.
2025-03-07 15:06:17 +00:00
Rick Newton-Rogers dc299eae72 Delete Thresholds/nightly-6.1.json symlink (#497)
Following on from https://github.com/apple/swift-nio-http2/pull/496
delete `Thresholds/nightly-6.1.json` which is no longer needed now that
the shared benchmarks workflow has been updated
2025-03-07 12:09:27 +00:00
Rick Newton-Rogers 41e1821e08 move nightly-next thresholds and add legacy symlink (#496)
Move nightly-next thresholds and add legacy symlink; see
https://github.com/apple/swift-nio/pull/3122
2025-03-03 15:47:09 +00:00
Rick Newton-Rogers 28b6e02d27 Rename nightly_6_1 params to nightly_next (#495)
Rename nightly_6_1 params to nightly_next; see
https://github.com/apple/swift-nio/pull/3122
2025-03-03 14:44:55 +00:00
George Barnett 1251530b26 Allow max reset stream frames to be configured (#494)
Motivation:

The maximum number of recently reset stream frames to track is limited
to a fixed value of 32. This should be configurable.

Modifications:

- Add it to the connection config and propagate it through

Result:

- Resolves #493
2025-02-28 13:54:05 +00:00
Rick Newton-Rogers d3b538740b CI use 6.1 nightlies (#490)
CI use 6.1 nightlies now that Swift development is happening in the 6.1
branch
2025-01-31 10:09:44 +00:00
Rick Newton-Rogers 8243b9f525 update benchmark thresholds to nightly 6.1 (#491)
NIO regressed the allocations in EmbeddedChannel by one in
https://github.com/apple/swift-nio/commit/2d72ada99957e8aa19245ccd013f55790be781d9,
This test is regressed by two and uses two embedded channels so it seems
the likely cause.
2025-01-31 09:03:40 +00:00
George Barnett 124e859117 Better handle new streams when server is quiescing (#481)
Motivation:

When the server is in the locally quiescing state and a client attempts
to open a new stream, the connection state machine treats receiving the
headers as a connection error. This results in the connection being
closed and in-flight requests being failed.

This can happen because of the inherent race between the server sending
a GOAWAY frame and the client receiving it, during which time the client
can open a stream not knowing it's doomed to failure.

Rather than the server treating this as a connection error, it should
reject the stream with a RST_STREAM frame and emit a stream error.

Modifications:

- Emit a stream error when receiving HEADERS in the locally quiesced
state

Result:

Better handling of new streams when the server is quiescing
2025-01-20 18:01:49 +00:00
Franz Busch 1e0c8234ed Update release.yml (#489)
Update the release.yml file with the latest label changes
2024-12-18 13:09:06 +00:00
Gus Cairo 170f4ca06b Don't fail closeFuture when an error occurs on closing (#487)
Strictly speaking, a `close` operation can't really fail (except when
the closing mode isn't supported or the channel is already closed). Even
if an error is encountered while closing a channel, or if an error
caused the channel to be closed, the end result is the same: the channel
will be closed.

In this case in particular, when streams are closed from the client
(i.e. by sending a RST_STREAM frame) the `HTTP2StreamChannel` would fail
the channel's `closeFuture`. This isn't appropriate however, as the
channel is successfully closed.

This change stops failing the stream channel's `closeFuture`. Instead,
if the close happens uncleanly, the error will be fired down the
pipeline and the `close` method's promise will be failed.
1.35.0
2024-12-16 15:38:34 +00:00
Rick Newton-Rogers 2083f5d7e8 Enable MemberImportVisibility check on all targets (#486)
Enable MemberImportVisibility check on all targets. Use a standard
string header and footer to bracket the new block for ease of updating
in the future with scripts.
2024-12-11 15:38:17 +00:00
Franz Busch adbe5af20a Aligning semantic version label check name (#485) 2024-11-28 12:03:38 +00:00
Gus Cairo 1879e72392 Finish multiplexer's inbound streams in more cases (#483)
## Motivation
Currently, the multiplexer's inbound streams stream is finished only
when the channel becomes inactive.
There are some scenarios in which the channel may be closed before it
has a chance to become active, and the stream will never be finished.
This can cause any users iterating over the stream to hang.

## Modifications
This PR finishes the inbound streams stream when a connection error is
fired, and when the handler is removed.

## Result
Fewer bugs.
2024-11-15 10:45:47 +00:00
Rick Newton-Rogers bb19976697 unify scheduled and main yamls (#482) 2024-11-15 09:55:22 +00:00
Adam FowlerandGeorge Barnett 91136a6604 Make configureHTTP2AsyncSecureUpgrade public (#480)
Minor PR to make `configureHTTP2AsyncSecureUpgrade ` helper function
public

Co-authored-by: George Barnett <gbarnett@apple.com>
2024-11-14 10:57:17 +00:00
Adam Fowler 04a093d050 Add a variant of configureAsyncHTTPServerPipeline which takes a stream delegate (#471)
In the async HTTP2 pipeline there is no way to account for the opening
and closing of streams. This PR adds a variant of
`configureAsyncHTTPServerPipeline` (HTTP2 upgrade channel) that allows
the user to pass in a `NIOHTTP2StreamDelegate` to be applied to the
HTTP2 channel if the upgrade occurs.

This is similar to #439 which did the same HTTP2 only channels.
2024-11-14 10:27:14 +00:00
finagolfin 1959f760e7 Import new Android overlay instead in the tests (#479)
I added the `Bionic` import this summer in #448 and the compiler
accepted it then, but it started erroring a couple months later without
this full Android overlay, so add that instead.
2024-10-30 15:55:49 +00:00
Peter Adams 4bce87f3cf Enable ShellCheck CI (#478)
Motivation:

Complete enablement of all standard GitHub Actions workflows.

Modifications:

Describe the modifications you've done.

Result:

After your change, what will change.
2024-10-30 15:22:05 +00:00
Peter Adams 6c86975025 Remove unused dockerfiles and allocation scripts (#477)
Motivation:

Remove unused clutter from the repo.

Modifications:

Remove dockerfiles and scripts to getting allocation results

Result:

Cleaner repo.
2024-10-30 14:17:39 +00:00
Peter Adams 70643b7392 Add integration tests to GitHub Actions (#476)
Motivation:

Testing is good - we should check results on PRs.

Modifications:

Add integration tests to PR and scheduled GitHub Actions workflows.

Result:
Integration tests run.
2024-10-30 13:23:03 +00:00
Peter Adams a4f8c3f1c0 Add HTTP/2 spec tests to CI (#475)
Motivation:

More testing is better.

Modifications:

Setup github actions to run http/2 spec tests.

Result:

Testing against http/2 spec occurs on pull requests
2024-10-29 14:00:09 +00:00
Peter Adams 1118370ec4 Apply swift-format changes and CI (#472)
Motivation:

Standardised formatting makes the project cleaner to look at and work
on.

Modifications:

Setup swift-format with the same settings as Swift-NIO

Result:

Common formatting throughout
2024-10-29 13:09:54 +00:00
Peter Adams 93586110f2 Enable python lint in CI (#474)
Motivation:

More checking is better

Modifications:

Enable and configure flake8

Result:

More CI checks
2024-10-29 11:01:43 +00:00
Peter Adams fd48cf3099 Allow warnings in CI (#473)
Motivation:

NIO is getting stricter concurrency annotations.
This is breaking this project, allow warnings until things settle.

Modifications:

Alter CI flags to allow warnings.

Result:

CI will continue to work for now.
2024-10-29 10:25:04 +00:00
Peter Adams 31c8609808 Drop support for Swift 5.8 (#470)
Motivation:

Only the last 3 versions of Swift are supported.

Modifications:

Update the Swift tools version in Package.swift.
Remove code which can now never be compiled.
Remove legacy docker configuration.

Result:

Only Swift 5.9+ supported.
2024-10-23 15:06:45 +01:00
Peter Adams bc93af21b0 GitHub Actions to parity with existing CI (#469)
Motivation:

Want to move away from legacy CI.

Modifications:

Add configuration and update code to use GitHub actions.

Result:

GitHub Actions can be used for basic CI.
2024-10-23 14:02:30 +00:00
Peter Adams 482f425a94 Remove script for generating contributors list (#468)
Motivation:

We're no longer maintaining this list as it can be trivially obtained
from git history.

Modifications:

Remove script for generating contributors list.

Result:

One less script to maintain
2024-10-23 13:55:02 +01:00