Skip to content

NATS events issue #1062

@prakarsh-dt

Description

@prakarsh-dt

NATS events issue

Checklist:

  • I've searched in the docs and FAQ for my answer
  • I've included steps to reproduce the bug.

Describe the bug

NATS events should be flushed to fix the issue.

Logs

{"level":"error","ts":1641191308.157099,"caller":"events/EventBuilder.go:125","msg":"found error on payload build for cd stages, skipping this error ","material":null,"stacktrace":"github.com/devtron-labs/devtron/client/events.(*EventSimpleFactoryImpl).BuildExtraCDData\n\t/go/src/github.com/devtron-labs/devtron/client/events/EventBuilder.go:125\ngithub.com/devtron-labs/devtron/pkg/app.(*AppServiceImpl).WriteCDSuccessEvent\n\t/go/src/github.com/devtron-labs/devtron/pkg/app/AppService.go:275"}
panic: runtime error: index out of range [0] with length 0

goroutine 168 [running]:
github.com/devtron-labs/devtron/pkg/pipeline.(*WorkflowDagExecutorImpl).buildWFRequest(0xc00067e580, 0xc0011a8820, 0xc0022b8480, 0xc001748a00, 0x1, 0xc0022025a0, 0xc0021d2e98, 0x40848b)
	/go/src/github.com/devtron-labs/devtron/pkg/pipeline/WorkflowDagExecutor.go:492 +0x19d3
github.com/devtron-labs/devtron/pkg/pipeline.(*WorkflowDagExecutorImpl).TriggerPostStage(0xc00067e580, 0xc0022b8480, 0xc001748a00, 0x1, 0x0, 0x0)
	/go/src/github.com/devtron-labs/devtron/pkg/pipeline/WorkflowDagExecutor.go:418 +0x1f4
github.com/devtron-labs/devtron/pkg/pipeline.(*WorkflowDagExecutorImpl).HandleDeploymentSuccessEvent(0xc00067e580, 0xc001df20c0, 0x28, 0x10, 0x0)
	/go/src/github.com/devtron-labs/devtron/pkg/pipeline/WorkflowDagExecutor.go:615 +0x15f
github.com/devtron-labs/devtron/api/router/pubsub.(*ApplicationStatusUpdateHandlerImpl).Subscribe.func1(0xc0011c2480)
	/go/src/github.com/devtron-labs/devtron/api/router/pubsub/ApplicationStatusUpdateHandler.go:88 +0x798
github.com/nats-io/stan%2ego.(*conn).processMsg(0xc00092a000, 0xc0003cce10)
	/go/src/github.com/devtron-labs/devtron/vendor/github.com/nats-io/stan.go/stan.go:835 +0x242
github.com/nats-io/nats%2ego.(*Conn).waitForMsgs(0xc000762000, 0xc0001546c0)
	/go/src/github.com/devtron-labs/devtron/vendor/github.com/nats-io/nats.go/nats.go:2099 +0x342
created by github.com/nats-io/nats%2ego.(*Conn).subscribe
	/go/src/github.com/devtron-labs/devtron/vendor/github.com/nats-io/nats.go/nats.go:2856 +0x4cc

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions