@@ -489,6 +489,9 @@ func (envs *Manager) CreateEnvironment(workflowPath string, userVars map[string]
489489 WithError (err ).
490490 Warnf ("auto-transitioning environment failed %s, cleanup in progress" , op )
491491
492+ the .EventWriterWithTopic (topic .Environment ).WriteEvent (
493+ NewEnvGoErrorEvent (env , fmt .Sprintf ("%s failed: %v" , op , err )),
494+ )
492495 err := env .TryTransition (NewGoErrorTransition (
493496 envs .taskman ),
494497 )
@@ -593,6 +596,9 @@ func (envs *Manager) CreateEnvironment(workflowPath string, userVars map[string]
593596 WithField ("level" , infologger .IL_Devel ).
594597 Error ("environment deployment and configuration error, cleanup in progress" )
595598
599+ the .EventWriterWithTopic (topic .Environment ).WriteEvent (
600+ NewEnvGoErrorEvent (env , fmt .Sprintf ("deployment or configuration failed: %v" , err )),
601+ )
596602 errTxErr := env .TryTransition (NewGoErrorTransition (
597603 envs .taskman ),
598604 )
@@ -1053,6 +1059,9 @@ func (envs *Manager) handleIntegratedServiceEvent(evt event.IntegratedServiceEve
10531059 }
10541060
10551061 if env .CurrentState () != "ERROR" {
1062+ the .EventWriterWithTopic (topic .Environment ).WriteEvent (
1063+ NewEnvGoErrorEvent (env , "ODC partition went to ERROR during RUNNING" ),
1064+ )
10561065 err = env .TryTransition (NewGoErrorTransition (envs .taskman ))
10571066 if err != nil {
10581067 log .WithPrefix ("scheduler" ).
@@ -1467,6 +1476,9 @@ func (envs *Manager) CreateAutoEnvironment(workflowPath string, userVars map[str
14671476 WithError (err ).
14681477 Warnf ("auto-transitioning environment failed %s, cleanup in progress" , op )
14691478
1479+ the .EventWriterWithTopic (topic .Environment ).WriteEvent (
1480+ NewEnvGoErrorEvent (env , fmt .Sprintf ("%s failed: %v" , op , err )),
1481+ )
14701482 err := env .TryTransition (NewGoErrorTransition (
14711483 envs .taskman ),
14721484 )
0 commit comments