@@ -488,6 +488,9 @@ func (envs *Manager) CreateEnvironment(workflowPath string, userVars map[string]
488488 WithError (err ).
489489 Warnf ("auto-transitioning environment failed %s, cleanup in progress" , op )
490490
491+ the .EventWriterWithTopic (topic .Environment ).WriteEvent (
492+ NewEnvGoErrorEvent (env , fmt .Sprintf ("%s failed: %v" , op , err )),
493+ )
491494 err := env .TryTransition (NewGoErrorTransition (
492495 envs .taskman ),
493496 )
@@ -592,6 +595,9 @@ func (envs *Manager) CreateEnvironment(workflowPath string, userVars map[string]
592595 WithField ("level" , infologger .IL_Devel ).
593596 Error ("environment deployment and configuration error, cleanup in progress" )
594597
598+ the .EventWriterWithTopic (topic .Environment ).WriteEvent (
599+ NewEnvGoErrorEvent (env , fmt .Sprintf ("deployment or configuration failed: %v" , err )),
600+ )
595601 errTxErr := env .TryTransition (NewGoErrorTransition (
596602 envs .taskman ),
597603 )
@@ -1052,6 +1058,9 @@ func (envs *Manager) handleIntegratedServiceEvent(evt event.IntegratedServiceEve
10521058 }
10531059
10541060 if env .CurrentState () != "ERROR" {
1061+ the .EventWriterWithTopic (topic .Environment ).WriteEvent (
1062+ NewEnvGoErrorEvent (env , "ODC partition went to ERROR during RUNNING" ),
1063+ )
10551064 err = env .TryTransition (NewGoErrorTransition (envs .taskman ))
10561065 if err != nil {
10571066 log .WithPrefix ("scheduler" ).
@@ -1376,6 +1385,9 @@ func (envs *Manager) CreateAutoEnvironment(workflowPath string, userVars map[str
13761385 WithError (err ).
13771386 Warnf ("auto-transitioning environment failed %s, cleanup in progress" , op )
13781387
1388+ the .EventWriterWithTopic (topic .Environment ).WriteEvent (
1389+ NewEnvGoErrorEvent (env , fmt .Sprintf ("%s failed: %v" , op , err )),
1390+ )
13791391 err := env .TryTransition (NewGoErrorTransition (
13801392 envs .taskman ),
13811393 )
0 commit comments