-
-
Notifications
You must be signed in to change notification settings - Fork 637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose an API to pass multiple Params to an engine request #6871
Conversation
Commits should be useful to review independently. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I havent reviewed the rust part yet, but the python part is looking good! there are some legit test failures - one of which I highlighted in review.
Looks great!
This method should be called by exactly one scheduling thread, but the Step objects returned | ||
by this method are intended to be executed in multiple threads, and then satisfied by the | ||
scheduling thread. | ||
:return: A tuple of (root, Return) tuples and (root, Throw) tuples. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i havent seen this return format before, but makes it a lot cleaner!
if returns: | ||
state = returns[0][1] | ||
else: | ||
state = throws[0][1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q:
- is it possible to have both returns and throws? in which case the logic seems to ignore throws.
- is there certain expectation on
execute
's return value, e.g.len(throws) + len(returns) = len(request.roots)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes to your second question, so in this case: no to your first question.
### Problem As described in #5869, we need a way to consume `Options` in the new engine in order to provide access to `Subsystems` in `@rules`. ### Solution Convert `OptionsBootstrapper` and `Config` into `datatype`s in order to give them useful eq/hash implementations. Then, modify the `@rules` that were added in #5889 to consume the `Params` API added in #6871 and expose a `ScopedOptions` wrapper around the set of options for a `Scope`. ### Result `@rules` can consume `ScopedOptions`, although there should probably be built-in rules that can consume `ScopedOptions` to create `Subsystems`. Nonetheless, let's say that this "fixes #5869", and open a followup for actually exposing `Subsystems` to `@rules` in a generic way.
Problem
Although consumption of multiple
Params
is now supported, there is currently no way to actually provide them to a request. See #6478 for more info.Solution
Expose and test the ability to pass in a small
Params
datatype as a subject, which is flattened into a corresponding set of rust-sideParams
inadd_root_select
.Result
Fixes #6478.