Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork21
Open
Description
Code of Conduct
- I agree to follow this project's Code of Conduct
AI Policy
- I agree to follow this project's AI Policy, or I agree that AI was not used while creating this issue.
Versions
Elixir 1.18.4
Erlang 28.1
Operating system
MacOS
Current Behavior
I get the following error when trying to run a reactor with a switch in a production environment.Note I could not reproduce this in dev under the same exact circumstances.
"Step `:populate_scope` depends on the result of a step named `:create_personal_organization` which cannot be found"populate_scope is a switch with a step that has an dependency on create_personal_organization. create_personal_organization is always there and runs.
Full reactor error
{:error,%Reactor.Error.Internal{errors:[%Reactor.Error.Internal.PlanError{graph:#Graphtype:directed,vertices:[%Reactor.Step{arguments:[%Reactor.Argument{description:nil,name::scope,source:%Reactor.Template.Result{name::create_personal_organization,sub_path:[]},transform:nil},%Reactor.Argument{description:nil,name::user_token,source:%Reactor.Template.Result{name::create_session_token,sub_path:[]},transform:nil}],async?:true,context:%{},description:nil,impl:{Reactor.Step.AnonFn,[run:&MyApp.run_0_generated_7FC63DDD3EF079552823333AF540F2EF/1,compensate:nil,undo:nil,backoff:nil]},name::populate_scope,max_retries::infinity,ref::populate_scope,transform:nil,guards:[]}],edges:[] >,message:"Step `:populate_scope` depends on the result of a step named `:create_personal_organization` which cannot be found",reactor:nil,step:%Reactor.Step{arguments:[%Reactor.Argument{description:nil,name::scope,source:%Reactor.Template.Result{name::create_personal_organization,sub_path:[]},transform:nil},%Reactor.Argument{description:nil,name::user_token,source:%Reactor.Template.Result{name::create_session_token,sub_path:[]},transform:nil}],async?:true,context:%{},description:nil,impl:{Reactor.Step.AnonFn,[run:&MyApp.run_0_generated_7FC63DDD3EF079552823333AF540F2EF/1,compensate:nil,undo:nil,backoff:nil]},name::populate_scope,max_retries::infinity,ref::populate_scope,transform:nil,guards:[]},splode:Reactor.Error,bread_crumbs:[],vars:[],path:[],stacktrace:#Splode.Stacktrace<>,class::reactor}],splode:Reactor.Error,bread_crumbs:[],vars:[],path:[],stacktrace:#Splode.Stacktrace<>,class::reactor}}
Reproduction
switch:populate_scopedoon(input(:params))matches?&(Map.get(&1,"invite_token")!=nil)dostep:populate_scopedoargument(:user_token,result(:create_session_token))argument(:scope,result(:accept_organization_invite))wait_for(:create_personal_organization)run(fn%{scope:scope,user_token:token}->{:ok,token}=Sessions.put_organization(scope,token,scope.org.id){:ok,%{scope:scope,user_token:token.token}}end)endenddefaultdostep:populate_scopedoargument(:user_token,result(:create_session_token))argument(:scope,result(:create_personal_organization))run(fn%{scope:scope,user_token:token}->{:ok,token}=Sessions.put_organization(scope,token,scope.org.id){:ok,%{scope:scope,user_token:token.token}}end)endend
Minimal reproduction would be this switch, note the switch and steps are the same exact name (because I wanted the switch to return the results).
I assume the external step can really be any step. There is nothing special with it.
Expected Behavior
The inner step of a switch knows about external steps and can depend on them