fix(operators): prevent infinite recursion when calling non-explore operators#886
Merged
Merged
Conversation
run_general_operation_core_closure was calling the decorator function not the decorated (wrapped) function. As a result this caused a recursion run_general_operation_core_closure -> orchestrate_general_operation -> run_general_operation_core_closure -> orchestrate_general_operation etc. This was because the function passed to run_general_operation_core_closure was the wrapped function before #805. This was changed to the wrapper function in #805 but the actual call was not updated to account for this.
Function is not present after #805
Installing trim for orchestration tests adds two more custom experiments
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.
Bug reported in #884, bug created in #805
The operator function decorators wrap an operator function, so that when the wrapper is called, the general operator orchestration function is called to execute the wrapped function (the operator function the developer writes and decorates)
Pre #805 an internal function was receiving the un-decorated, original operator function and calling it.
in #805 this functions interface was changed so it received the decorated function, however the call was not updated to account for this (it should have accessed the wrapped function and called it).
As a result that internal call called the wrapper, which called the outermost orchestration function again and a recursive loop kicks off.
operator_wrapper() -> general_orchestration(operator metadata) -> ... -> Internal Function(operator wrapper) -> operator_wrapper()
Instead of
operator_wrapper() -> general_orchestration(operator metadata) -> ... -> Internal Function(operator wrapper) -> unwrap(operator_wrapper)()