Skip to content

Conversation

@lann
Copy link
Collaborator

@lann lann commented Sep 11, 2025

Putting my commits where my fingers type.

This is split into 3 5 commits to ease review:

  • A small test change trying to squash a persistent flake
  • Reorganizing send_request_impl, inlining send_request_handler and making it a method on a new struct that holds most of its inputs. This doesn't do anything functionally but I think it helps distinguish the data that was copied from the instance state and may aid future refactoring.
  • Reordering some top level items in the file to better fit (what I think of as) a common convention, roughly "things higher in the file call into things lower in the file".
  • Merging the separate TLS_CLIENT_CONFIG task-local into CONNECT_OPTIONS, makes connect_tcp and connect_tls methods on ConnectOptions, and makes a bunch of miscellaneous simplifications (which I now realize could/should have done in a fourth commit; sorry!).
  • Another refactor splitting the send method into a few parts to help avoid confusion around error handling.

@lann
Copy link
Collaborator Author

lann commented Sep 12, 2025

Bisecting, the test failure surprisingly happens in the first commit. 🤔

@lann
Copy link
Collaborator Author

lann commented Sep 12, 2025

OK I'm pretty sure this is just a subtle change to the way errors got propagated with the nested Results.

@lann lann force-pushed the wasi-http-refactor branch from 9798cf0 to b1d07da Compare September 12, 2025 18:59
@lann
Copy link
Collaborator Author

lann commented Sep 12, 2025

Squashing that bug inspired/compelled me to do another round of refactoring to get rid of the nested Results.

@lann lann force-pushed the wasi-http-refactor branch 3 times, most recently from 80e0b16 to 6f6c50c Compare September 12, 2025 21:03
@lann lann force-pushed the wasi-http-refactor branch from 6f6c50c to c9d2611 Compare September 12, 2025 22:05
@lann
Copy link
Collaborator Author

lann commented Sep 12, 2025

The last CI run succeeded; I just needed to sign my commits.

@lann lann merged commit e8212c2 into spinframework:main Sep 12, 2025
17 checks passed
@lann lann deleted the wasi-http-refactor branch September 12, 2025 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants