diff --git a/chaoscenter/graphql/server/go.mod b/chaoscenter/graphql/server/go.mod index 64daa412204..11cbef84fc5 100644 --- a/chaoscenter/graphql/server/go.mod +++ b/chaoscenter/graphql/server/go.mod @@ -15,7 +15,7 @@ require ( github.com/gorilla/websocket v1.5.1 github.com/jinzhu/copier v0.4.0 github.com/kelseyhightower/envconfig v1.4.0 - github.com/litmuschaos/chaos-operator v0.0.0-20230718113617-6819a4be12e4 + github.com/litmuschaos/chaos-operator v0.0.0-20240601063404-e96a7ee7f1f7 github.com/litmuschaos/chaos-scheduler v0.0.0-20220714173615-d7513d616a71 github.com/mrz1836/go-sanitize v1.3.2 github.com/pkg/errors v0.9.1 diff --git a/chaoscenter/graphql/server/go.sum b/chaoscenter/graphql/server/go.sum index dd1808f83b7..00306f1ae24 100644 --- a/chaoscenter/graphql/server/go.sum +++ b/chaoscenter/graphql/server/go.sum @@ -778,8 +778,8 @@ github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9 github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= github.com/litmuschaos/chaos-operator v0.0.0-20210610071657-a58dbd939e73/go.mod h1:QMjfAVIfwcpj/P1jikyz5+C5vWICiUXsFZMR7Ihnzro= github.com/litmuschaos/chaos-operator v0.0.0-20220714075136-66fee1fb7ef7/go.mod h1:m8jQuijmZ9PxCbrvWy0QXL0ji558hUCuD9Q5JAKB12Q= -github.com/litmuschaos/chaos-operator v0.0.0-20230718113617-6819a4be12e4 h1:GVU1jK8Gb9OaYuU3iDyU/FE3uZYmBwAEB95VY41SYJ8= -github.com/litmuschaos/chaos-operator v0.0.0-20230718113617-6819a4be12e4/go.mod h1:i6wMEZRQoHjUy4bhq6ePuA2FChX1b7WBR2lH09iM0tU= +github.com/litmuschaos/chaos-operator v0.0.0-20240601063404-e96a7ee7f1f7 h1:W4+NpHoBJnbPL4x9WTDJWIg219ElfQjjjs4V7VfDBKM= +github.com/litmuschaos/chaos-operator v0.0.0-20240601063404-e96a7ee7f1f7/go.mod h1:7aAslOjCI8sens0OA3gtQDDa7PO0af3n9U15PXGhpXI= github.com/litmuschaos/chaos-scheduler v0.0.0-20220714173615-d7513d616a71 h1:V9/txTSub+FzFE+h48mlQgJ427vaYqKqvzGmzt6XSfw= github.com/litmuschaos/chaos-scheduler v0.0.0-20220714173615-d7513d616a71/go.mod h1:Edc10opZte1DHcKt0mxyqt64XKPVFAtQ8cghBltZTjs= github.com/litmuschaos/elves v0.0.0-20201107015738-552d74669e3c/go.mod h1:DsbHGNUq/78NZozWVVI9Q6eBei4I+JjlkkD5aibJ3MQ= diff --git a/chaoscenter/subscriber/go.mod b/chaoscenter/subscriber/go.mod index 81a05f9074f..3e41c79faac 100644 --- a/chaoscenter/subscriber/go.mod +++ b/chaoscenter/subscriber/go.mod @@ -9,7 +9,7 @@ require ( github.com/golang/mock v1.6.0 github.com/gorilla/websocket v1.5.1 github.com/kelseyhightower/envconfig v1.4.0 - github.com/litmuschaos/chaos-operator v0.0.0-20230718113617-6819a4be12e4 + github.com/litmuschaos/chaos-operator v0.0.0-20240601063404-e96a7ee7f1f7 github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.9.0 gopkg.in/yaml.v2 v2.4.0 diff --git a/chaoscenter/subscriber/go.sum b/chaoscenter/subscriber/go.sum index 5cbdec1a6ca..7a757b6b65d 100644 --- a/chaoscenter/subscriber/go.sum +++ b/chaoscenter/subscriber/go.sum @@ -188,8 +188,8 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/litmuschaos/chaos-operator v0.0.0-20230718113617-6819a4be12e4 h1:GVU1jK8Gb9OaYuU3iDyU/FE3uZYmBwAEB95VY41SYJ8= -github.com/litmuschaos/chaos-operator v0.0.0-20230718113617-6819a4be12e4/go.mod h1:i6wMEZRQoHjUy4bhq6ePuA2FChX1b7WBR2lH09iM0tU= +github.com/litmuschaos/chaos-operator v0.0.0-20240601063404-e96a7ee7f1f7 h1:W4+NpHoBJnbPL4x9WTDJWIg219ElfQjjjs4V7VfDBKM= +github.com/litmuschaos/chaos-operator v0.0.0-20240601063404-e96a7ee7f1f7/go.mod h1:7aAslOjCI8sens0OA3gtQDDa7PO0af3n9U15PXGhpXI= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= diff --git a/chaoscenter/subscriber/pkg/events/util.go b/chaoscenter/subscriber/pkg/events/util.go index 996882c01fb..65a59e5eeb9 100644 --- a/chaoscenter/subscriber/pkg/events/util.go +++ b/chaoscenter/subscriber/pkg/events/util.go @@ -108,16 +108,12 @@ func (ev *subscriberEvents) CheckChaosData(nodeStatus v1alpha13.NodeStatus, work } func getNameFromLog(log string) string { - s := regexp.MustCompile(`\n\nChaosEngine Name : .*\n\n`).FindString(log) - if s == "" { + re := regexp.MustCompile(`ChaosEngine Name : ([\w-]+)`) + match := re.FindStringSubmatch(log) + if len(match) < 2 { return "" } - s = strings.TrimSpace(s) - name := strings.Split(s, ": ") - if len(name) != 2 { - return "" - } - return name[1] + return match[1] } // StrConvTime converts unix timestamp to string