Repository navigation
Conversation
moetemp
force-pushed
the
moe/up/python-endpointless-resource-import
branch
from
October 27, 2026 09:08
eb0a9ba to
d40b114
Compare
moetemp
force-pushed
the
moe/up/ts-endpointless-resource-return
branch
from
October 27, 2026 18:07
6f89d5e to
c56987c
Compare
moetemp
force-pushed
the
moe/up/python-endpointless-resource-import
branch
from
October 27, 2026 18:07
d40b114 to
77e3bad
Compare
moetemp
force-pushed
the
moe/up/ts-endpointless-resource-return
branch
from
October 27, 2026 19:00
c56987c to
bd6ed47
Compare
moetemp
force-pushed
the
moe/up/python-endpointless-resource-import
branch
from
October 27, 2026 19:00
77e3bad to
3739131
Compare
The client of a service with no endpoint builds a returned resource from its class, but services.py imported the class only under TYPE_CHECKING. So the call failed with NameError. A test opens and closes Brook's writer from a Workflow through a real endpoint.
moetemp
force-pushed
the
moe/up/python-endpointless-resource-import
branch
from
October 28, 2026 00:24
3739131 to
d70f5f1
Compare
2 of 3 tasks
Owner
Author
|
Closing this. The Streams stack doesn't need it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed?
This PR imports the resource class that the Python
<Service>Clientof a service with no@nexus.endpointbuilds from an answer.services.pyimports it at run time, next to itsbind_*_clienthelper. A resource class that only annotations name stays underTYPE_CHECKING.Depends on #73 (UPSTREAM-15).
Part of the Brook review series.
Why?
The method calls the class to build the resource, but
services.pyimported it only underTYPE_CHECKING. So the call failed withNameErrorat run time. An operation that returns the resource type itself, as inuser-service, already imported it. Only a holder answer, such as the writer'swriter-result, showed the bug.How did you test it?
The new sample test
test_a_client_with_no_endpoint_builds_the_returned_resourceopens and closes Brook's writer from a Workflow, through a real Nexus endpoint. Without the fix, it fails withNameError: name 'Writer' is not defined.cargo validatepasses.