cleaned some logging
This commit is contained in:
parent
7c913bec0e
commit
24bbe81638
@ -125,7 +125,7 @@ func LogKubernetesArgo(wfName string, namespace string, watcher watch.Interface)
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if len(wf.Status.Nodes) == 0 {
|
if len(wf.Status.Nodes) == 0 {
|
||||||
wfl.Debug().Msg("No node status yet") // The first output of the channel doesn't contain Nodes so we skip it
|
wfl.Info().Msg("No node status yet") // The first output of the channel doesn't contain Nodes so we skip it
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
7
main.go
7
main.go
@ -67,14 +67,14 @@ func main() {
|
|||||||
logger = u.GetLogger()
|
logger = u.GetLogger()
|
||||||
|
|
||||||
logger.Debug().Msg("Loki URL : " + conf.GetConfig().LokiURL)
|
logger.Debug().Msg("Loki URL : " + conf.GetConfig().LokiURL)
|
||||||
logger.Debug().Msg("Workflow executed : " + conf.GetConfig().ExecutionID)
|
logger.Info().Msg("Workflow executed : " + conf.GetConfig().ExecutionID)
|
||||||
exec := u.GetExecution(conf.GetConfig().ExecutionID)
|
exec := u.GetExecution(conf.GetConfig().ExecutionID)
|
||||||
if exec == nil {
|
if exec == nil {
|
||||||
logger.Fatal().Msg("Could not retrieve workflow ID from execution ID " + conf.GetConfig().ExecutionID + " on peer " + conf.GetConfig().PeerID)
|
logger.Fatal().Msg("Could not retrieve workflow ID from execution ID " + conf.GetConfig().ExecutionID + " on peer " + conf.GetConfig().PeerID)
|
||||||
}
|
}
|
||||||
conf.GetConfig().WorkflowID = exec.WorkflowID
|
conf.GetConfig().WorkflowID = exec.WorkflowID
|
||||||
|
|
||||||
logger.Debug().Msg("Starting construction of yaml argo for workflow :" + exec.WorkflowID)
|
logger.Info().Msg("Starting construction of yaml argo for workflow :" + exec.WorkflowID)
|
||||||
|
|
||||||
if _, err := os.Stat("./argo_workflows/"); os.IsNotExist(err) {
|
if _, err := os.Stat("./argo_workflows/"); os.IsNotExist(err) {
|
||||||
os.Mkdir("./argo_workflows/", 0755)
|
os.Mkdir("./argo_workflows/", 0755)
|
||||||
@ -102,9 +102,6 @@ func main() {
|
|||||||
|
|
||||||
workflowName = getContainerName(argoFilePath)
|
workflowName = getContainerName(argoFilePath)
|
||||||
|
|
||||||
wf_logger := u.GetWFLogger(workflowName)
|
|
||||||
wf_logger.Debug().Msg("Testing argo name")
|
|
||||||
|
|
||||||
if conf.GetConfig().KubeHost == "" {
|
if conf.GetConfig().KubeHost == "" {
|
||||||
// Not in a k8s environment, get conf from parameters
|
// Not in a k8s environment, get conf from parameters
|
||||||
logger.Info().Msg("Executes outside of k8s")
|
logger.Info().Msg("Executes outside of k8s")
|
||||||
|
@ -116,8 +116,6 @@ func (k *KubernetesTools) CreateAccessSecret(ns string, login string, password s
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (k *KubernetesTools) GetArgoWatch(executionId string, wfName string) (watch.Interface, error){
|
func (k *KubernetesTools) GetArgoWatch(executionId string, wfName string) (watch.Interface, error){
|
||||||
wfl := utils.GetWFLogger("")
|
|
||||||
wfl.Debug().Msg("Starting argo watch with argo lib")
|
|
||||||
options := metav1.ListOptions{FieldSelector: "metadata.name=oc-monitor-"+wfName}
|
options := metav1.ListOptions{FieldSelector: "metadata.name=oc-monitor-"+wfName}
|
||||||
|
|
||||||
watcher, err := k.VersionedSet.ArgoprojV1alpha1().Workflows(executionId).Watch(context.Background(), options)
|
watcher, err := k.VersionedSet.ArgoprojV1alpha1().Workflows(executionId).Watch(context.Background(), options)
|
||||||
|
Loading…
Reference in New Issue
Block a user