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

Add last error related information to ActivityTaskStartedEventAttributes #15

Merged
merged 1 commit into from
Mar 13, 2020

Conversation

emrahs
Copy link
Contributor

@emrahs emrahs commented Mar 12, 2020

Adding the fields that are needed to expose information about retried activity task execution errors. See the related Cadence issue for more details: uber/cadence#1873

We had 3 ways to make this change:

  1. [Proposed] Creating two simple fields: lastFailureReason and lastFailureDetails.
  2. Defining a new struct (ie. ActivityTaskError) that contains these error-related fields. In the future, we could add more details to this struct such as when the failure was hit, which event ID this failure corresponds to, etc., and reuse it in other places.
  3. Having a list of structs in the ActivityTaskStartedEventAttributes event to make this even more extensible in case we want to expose "last N errors" instead of the "last" error.

I like Option 3 more due to its extensibility but decided to go with Option 1 for sake of consistency with ActivityTaskTimedOutEventAttributes and PendingActivityInfo structs.

…entAttributes

These fields are needed to expose information about the retried activity task execution errors.
More details are available at: uber/cadence#187
@emrahs emrahs self-assigned this Mar 12, 2020
@emrahs emrahs merged commit cf8b627 into master Mar 13, 2020
@emrahs emrahs deleted the add-last-error-to-activity-start-event branch March 13, 2020 00:05
@@ -0,0 +1 @@
.idea/
Copy link

Choose a reason for hiding this comment

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

What is that?

emrahs added a commit to uber/cadence that referenced this pull request Mar 13, 2020
Exposes the lastFailureReason and lastFailureDetails, which exist in the mutable state, through
the ActivityTaskStartedEvent in the history. The fields were added to ActivityTaskStartedEvent
as part of uber/cadence-idl#15

Resolves: #1873
emrahs added a commit to uber/cadence that referenced this pull request Mar 20, 2020
* Record error info for retried activities (#1873)

Exposes the lastFailureReason and lastFailureDetails, which exist in the mutable state, through
the ActivityTaskStartedEvent in the history. The fields were added to ActivityTaskStartedEvent
as part of uber/cadence-idl#15

* Add tests to verify error info in retried activities
anish531213 pushed a commit to uber/cadence that referenced this pull request Apr 10, 2020
* Record error info for retried activities (#1873)

Exposes the lastFailureReason and lastFailureDetails, which exist in the mutable state, through
the ActivityTaskStartedEvent in the history. The fields were added to ActivityTaskStartedEvent
as part of uber/cadence-idl#15

* Add tests to verify error info in retried activities
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.

3 participants