Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removing kafka event in DCS plugin for EOF received from DCS #615

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions core/integration/dcs/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,6 @@ func (p *Plugin) CallStack(data interface{}) (stack map[string]interface{}) {
})
}
return

}
stack["StartOfRun"] = func() (out string) { // must formally return string even when we return nothing
var err error
Expand Down Expand Up @@ -1416,17 +1415,6 @@ func (p *Plugin) CallStack(data interface{}) (stack map[string]interface{}) {
WithField("run", runNumber64).
Debug(logMsg)

the.EventWriterWithTopic(TOPIC).WriteEvent(&pb.Ev_IntegratedServiceEvent{
Name: call.GetName(),
OperationName: call.Func,
OperationStatus: pb.OpStatus_ONGOING,
OperationStep: "perform DCS call: StartOfRun",
OperationStepStatus: pb.OpStatus_DONE_ERROR,
EnvironmentId: envId,
Payload: string(payloadJson[:]),
Error: logMsg,
})

Comment on lines -1419 to -1429
Copy link
Member

@teo teo Sep 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with this change. Beyond the question of whether the stream io.EOF was timely or not from the DCS side, it could be argued that a stream being closed either way should not generate a Kafka event, because it concerns a technicality of DCS-ECS communication and says nothing about the actual state of the DCS.

However, the behaviour should be consistent across all DCS operations. @justonedev1 could you please make sure this change also applies to PFR and EOR?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, I will do so.

break // no more data
}
if errors.Is(err, context.DeadlineExceeded) {
Expand Down Expand Up @@ -1663,7 +1651,6 @@ func (p *Plugin) CallStack(data interface{}) (stack map[string]interface{}) {
dcsopOk = false
dcsFailedEcsDetectors = append(dcsFailedEcsDetectors, dcsToEcsDetector(v))
}

}
if dcsopOk {
p.pendingEORs[envId] = runNumber64
Expand Down
Loading