ripe-gigabyte-88964
09/27/2023, 8:09 PMawait Effect
inside my goal_rule
native_engine.IntrinsicError: Side-effects are not allowed in this context: SideEffecting types must be acquired via parameters to `@rule`s.
ripe-gigabyte-88964
09/27/2023, 8:10 PMawait Effect(
InteractiveProcessResult,
InteractiveProcess,
InteractiveProcess.from_process(Process(
argv=[git_binary.path, "push"],
description="Push the CI state updates to Github",
input_digest=registry_digest,
env={"HOME": os.path.expanduser("~")}
)),
)
curved-television-6568
09/27/2023, 8:27 PM@goal_rule
async def my_goal(..., local_environment: ChosenLocalEnvironmentName) -> ..:
...
process = InteractiveProcess(...)
res = await Effect(
InteractiveProcessResult,
{process: InteractiveProcess, local_environment.val: EnvironmentName},
)
...
curved-television-6568
09/27/2023, 8:28 PMripe-gigabyte-88964
09/27/2023, 8:30 PMgoal_rule
still works using the normal syntax and both have environment_behavior = Goal.EnvironmentBehavior.LOCAL_ONLY
in the Goal
classcurved-television-6568
09/27/2023, 8:34 PMawait Effect
is not in a `goal_rule`… 🤷ripe-gigabyte-88964
09/27/2023, 8:36 PMSideEffecting types must be acquired via parameters to `@rule`s.
That makes it sound like I need to call an await Get
to even get the side-effecting objectcurved-television-6568
09/27/2023, 8:38 PM@rule
async def my_rule(param1: ParamType1, param2: ParamType2) -> ...
.. just trying to wrap my head around what that would actually mean in terms of side effecting types..curved-television-6568
09/27/2023, 8:40 PMripe-gigabyte-88964
09/27/2023, 8:40 PMawait Effect
ripe-gigabyte-88964
09/27/2023, 8:42 PMcurved-television-6568
09/27/2023, 8:42 PMcurved-television-6568
09/27/2023, 8:43 PMConsole
or Workspace
or something to your goal rule params.curved-television-6568
09/27/2023, 8:43 PMcurved-television-6568
09/27/2023, 8:43 PMcurved-television-6568
09/27/2023, 8:44 PMcurved-television-6568
09/27/2023, 8:45 PMSideEffecting
.ripe-gigabyte-88964
09/27/2023, 8:45 PMripe-gigabyte-88964
09/27/2023, 8:45 PMcurved-television-6568
09/27/2023, 8:45 PM