Skip to content

Conversation

@maciejdudko
Copy link
Contributor

What was changed

Added Category field to ApplicationFailureException.

Why?

Feature request: temporalio/features#614

Checklist

  1. Closes [Feature Request] Apply application failure logging and metrics behaviour according to ApplicationErrorCategory #448

  2. How was this tested: Added test GetResultAsync_BenignFailure_Throws

@maciejdudko maciejdudko requested a review from a team as a code owner May 28, 2025 00:55
@CLAassistant
Copy link

CLAassistant commented May 28, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@cretz cretz left a comment

Choose a reason for hiding this comment

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

Looks great! Looks like there may be some failure with the .NET SDK tests in https://github.com/temporalio/features? Also, looks like you may have to click/sign the CLA (not sure why it didn't take it from other places).

IReadOnlyCollection<object?>? details = null,
TimeSpan? nextRetryDelay = null)
TimeSpan? nextRetryDelay = null,
ApplicationErrorCategory category = ApplicationErrorCategory.Unspecified)
Copy link
Member

@cretz cretz May 28, 2025

Choose a reason for hiding this comment

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

Ok, something strange is happening with feature tests where it's getting:

System.MissingMethodException: Method not found: 'Void Temporalio.Exceptions.ApplicationFailureException..ctor(System.String, System.String, Boolean, System.Collections.Generic.IReadOnlyCollection`1<System.Object>, System.Nullable`1<System.TimeSpan>)'.
at activity.cancel_try_cancel.Feature.MyWorkflow.RunAsync()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at activity.cancel_try_cancel.Feature.MyWorkflow.RunAsync()
at InvokeStub_MyWorkflow.RunAsync(Object, Object, IntPtr*)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) --- End of stack trace from previous location ---
at Temporalio.Worker.WorkflowInstance.InboundImpl.ExecuteWorkflowAsync(ExecuteWorkflowInput input) in /home/runner/work/sdk-dotnet/sdk-dotnet/sdk-dotnet/src/Temporalio/Worker/WorkflowInstance.cs:line 1809
at Temporalio.Worker.WorkflowInstance.<InitializeWorkflow>b__180_1() in /home/runner/work/sdk-dotnet/sdk-dotnet/sdk-dotnet/src/Temporalio/Worker/WorkflowInstance.cs:line 1551
at Temporalio.Worker.WorkflowInstance.RunTopLevelAsync(Func`1 func) in /home/runner/work/sdk-dotnet/sdk-dotnet/sdk-dotnet/src/Temporalio/Worker/WorkflowInstance.cs:line 956
at Temporalio.Worker.WorkflowInstance.RunOnce(Boolean checkConditions) in /home/runner/work/sdk-dotnet/sdk-dotnet/sdk-dotnet/src/Temporalio/Worker/WorkflowInstance.cs:line 845
at Temporalio.Worker.WorkflowInstance.Activate(WorkflowActivation act) in /home/runner/work/sdk-dotnet/sdk-dotnet/sdk-dotnet/src/Temporalio/Worker/WorkflowInstance.cs:line 691

Something strange is happening here where the feature test is compiled against an older .NET SDK version than it is running against. That may have to be investigated unfortunately and may even have to update https://github.com/temporalio/features/blob/main/sdkbuild/dotnet.go if somehow it is compiling against the same version it is running against.

@maciejdudko
Copy link
Contributor Author

CI failure fix PR submitted: temporalio/features#628

@maciejdudko maciejdudko force-pushed the application-error-category branch from ab26dfe to 2f2081d Compare May 29, 2025 20:19
@maciejdudko maciejdudko merged commit fa93167 into temporalio:main May 29, 2025
9 checks passed
@maciejdudko maciejdudko deleted the application-error-category branch May 29, 2025 20:50
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.

[Feature Request] Apply application failure logging and metrics behaviour according to ApplicationErrorCategory

3 participants