spinframework / spinframework/spin
Find a non-flakey way to test outbound networking blocked networks
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.5k
- Forks
- 310
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 24
Description
https://github.com/spinframework/spin/pull/3289 disabled the best existing test because it was causing lots of CI flake. As a security feature (potentially; depending on operator intent) it is important to have regression testing for this.
I omitted tests in https://github.com/spinframework/spin/issues/3323 because they would (presumably) have had the same problems as the test disabled above. Whatever solution we come up with for that should be adapted for any other blocked networks integration.
I've never been able to pin down the exact issue here. I can sometimes reproduce it locally but it seems to be some timing-dependent race; turning on multi-threading in the tests resolved things on my local machine (or at least significantly dropped the frequency of failing) but not in CI. I think the problem must be a race between lookup_host and its outer timeout.
Example test run failure: https://github.com/spinframework/spin/actions/runs/18210279338/job/51853644488?pr=3287#step:7:2261
expected ErrorCode::ConnectionReadTimeout to match ErrorCode::DestinationIpProhibited
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the disabled test from PR 3289 and the outbound HTTP code in crates/factor-outbound-http/src/wasi.rs, especially lookup_host around line 577 and its outer timeout around line 488. Review the failing CI run and issue 3323 for context. Done means a reliable regression test for blocked networks that distinguishes DestinationIpProhibited from timeout failures without CI flake.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking, security, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100