Skip to content

Add identity to TerminatedFailureInfo + CanceledFailureInfo#745

Open
stephanos wants to merge 2 commits intomasterfrom
stephanos/termination-identity
Open

Add identity to TerminatedFailureInfo + CanceledFailureInfo#745
stephanos wants to merge 2 commits intomasterfrom
stephanos/termination-identity

Conversation

@stephanos
Copy link
Copy Markdown
Contributor

@stephanos stephanos commented Mar 27, 2026

What changed?

Add identity field to TerminatedFailureInfo and CanceledFailureInfo.

Why?

To allow storing the identity of the caller that requested the cancellation/termination; and allow clients to retrieve it.

Breaking changes

No

Server PR

NA - usage example:

&nexusoperationpb.OperationOutcome_Failed{
  Failure: &failurepb.Failure{
    Message: event.Reason,
	FailureInfo: &failurepb.Failure_TerminatedFailureInfo{
	  TerminatedFailureInfo: &failurepb.TerminatedFailureInfo{
        identity: event.Identity,
      },
    },
  },
}

@stephanos stephanos force-pushed the stephanos/termination-identity branch from d0c7dbd to d7d9fce Compare March 27, 2026 18:15
@stephanos stephanos marked this pull request as ready for review March 27, 2026 20:20
@stephanos stephanos requested review from a team March 27, 2026 20:20

message TerminatedFailureInfo {
// The identity of the worker or client that requested the termination.
string identity = 1;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does CanceledFailureInfo not need the same field? Like if we need the identity for terminate why not cancel?

Copy link
Copy Markdown
Contributor Author

@stephanos stephanos Mar 30, 2026

Choose a reason for hiding this comment

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

Seems reasonable to me to add it there, too. The only difference AFAICT is that it needs to be threaded through there from the original "cancel" request.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How is that different then terminate? Isn't it also threaded through?

@stephanos stephanos changed the title Add identity to TerminatedFailureInfo Add identity to TerminatedFailureInfo + CanceledFailureInfo Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants