hydrate functions then classes in container entrypoint #2583
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.
Describe your changes
#2364 introduced a subtle requirement that hydrating a class requires that the class service function for the class is hydrated first.
in
_run_app
we make sure toresolver.load
an object'sdeps
before loading the object itself, but in container entrypoint we are hydrating a class before we hydrate the class service function, so the_method_functions
of theCls
was empty because the class service function was unhydrated (itsmethod_handle_metadata
attribute was not populated).this PR changes the entrypoint to load the app's functions, then its classes