neolith run: say when a connection closes, and bound what it reads after a refusal
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- backend, networking
Research direction
Start with src/neolith/_server.py and its tests after issue #129 has merged. Read how Django's WSGIRequestHandler.handle_one_request selects ServerHandler, then trace the server's response handling for draining, refused requests with unread bodies, and bodyless statuses. Done means the tests cover all three expected connection behaviors, including the documented case where draining starts after headers are sent.
Written by the indexing model from the issue text.
Description
Found by running the HTTP connector (#128) against the provider endpoints (#129) on one tree. Three points about connections under neolith run:
- Drain. A response that finishes while the host is draining carries no
Connection: close, so the caller's pool keeps a connection the server is about to close, and the next call on it fails asunavailable. Expected: while draining, each response saysConnection: closeand the connection closes after it. One case stays and is documented: Drain that begins after the headers are sent. - An unread request body. After an early refusal, such as a call with no credential, the server reads the rest of the request body into memory in one read. Expected: it is discarded in fixed-size pieces up to a bound, and past the bound the connection is closed.
- An empty reply. Every 204 closes the connection, because a response with no
Content-Lengthis treated as unframed, so each empty reply costs the caller a new connection. Expected: a status that admits no body (1xx, 204, 304) keeps the connection.
All three need the server to build its own response handler, since Django's WSGIRequestHandler.handle_one_request names ServerHandler directly. runserver and the test live server keep Django's behaviour, and the documentation says so.
Scope: src/neolith/_server.py and its tests, once #129 has merged. The sentences of ADR 0011 that describe these are handled in #133.
- Dominant language
- Python
- Stars
- 1
- Forks
- 0
- Avg merge
- 5h 30m
- Merged PRs (30d)
- 85
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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.
More from stack314/django-neolith
-
help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
stack314/django-neolith#142 · 1 comment ·
Maintainers usually reply within 1 day
-
help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
stack314/django-neolith#141 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
stack314/django-neolith#140 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
stack314/django-neolith#126 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
stack314/django-neolith#119 · 2 comments ·
Maintainers usually reply within 1 day
All issues in stack314/django-neolith
Similar issues
-
automated endpoint-dead needs-curation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
almanac-data/climate-almanac#138 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
OceanDataTools/openrvdas#760 ·
Maintainers usually reply within 1 day
-
level/subtask type/enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
wazuh/wazuh-virtual-machines#1091 ·
Maintainers usually reply within 1 day
-
Python: Bug: ChatMessageContent.from_element drops AudioContent and BinaryContent into raw TextContentPossibly taken @halcyon-past claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
microsoft/semantic-kernel#14824 · 1 comment ·
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
LedgerHQ/app-bitcoin-legacy#306 ·