Skip to content

Bump Wit 0.0.0 prerelease.0, WSGI Reuse Fixes#25

Merged
posborne merged 3 commits into
mainfrom
posborne/wit-0.0.0-prerelease.0
Dec 17, 2025
Merged

Bump Wit 0.0.0 prerelease.0, WSGI Reuse Fixes#25
posborne merged 3 commits into
mainfrom
posborne/wit-0.0.0-prerelease.0

Conversation

@posborne
Copy link
Copy Markdown
Member

These changes bump the WIT definitions to match Viceroy 0.6.2 (0.0.0 prerelease.0) and do a few mechanical updates to the tree to work with those latest defintions.

More substantially, the WIT update caused failures in the WSGI code's http_req.send workaround to attempt to do a resource.drop on requests. For that, I reworked the WSGI code to more carefully clean up references to the request resource in order to ensure that between requests we'll hit the finalizer code for those objects that is already part of what is provided by componentize-py (which will call resource.drop). The behavior if there are remaining references is based on assert_on_uncollected_resource to either:

  1. By default, we'll end the sandbox and not do reuse when requested.
  2. Assert (useful for our test case if nothing else)

Prior to hitting those paths, if the object is uncollected we will do a gc collection in the off chance that it is caught up in a reference cycle. I don't expect this path is likely to be hit often in practice.

@posborne posborne force-pushed the posborne/wit-0.0.0-prerelease.0 branch from a3c1d53 to 7313acd Compare December 15, 2025 17:02
@posborne posborne changed the title Bump Wit 0.0.0 prerelease.0, WSGI Resuse Fixes Bump Wit 0.0.0 prerelease.0, WSGI Reuse Fixes Dec 15, 2025
@posborne posborne force-pushed the posborne/wit-0.0.0-prerelease.0 branch from b1c1e30 to d88f8fa Compare December 16, 2025 23:44
Comment thread fastly_compute/wsgi.py Outdated
Copy link
Copy Markdown
Member

@erikrose erikrose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except I'm hoping we can land #26 in lieu of 67d16ea.

Debugging failures, I've found multiple times that I wanted additional
context, increase it.
A bit more DRY and should avoid doing what I just
did and missing an update to the cache key.
@posborne posborne force-pushed the posborne/wit-0.0.0-prerelease.0 branch from d88f8fa to 39ee544 Compare December 17, 2025 21:59
Copy link
Copy Markdown
Member

@erikrose erikrose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case you were wanting another review, here it is! :-D

@posborne posborne merged commit 1e09f3d into main Dec 17, 2025
3 checks passed
@posborne posborne deleted the posborne/wit-0.0.0-prerelease.0 branch December 17, 2025 22:39
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.

2 participants