Skip to content

Activities that return with interrupted flag should be successfully reported as Completed #731

@Spikhalskiy

Description

@Spikhalskiy

Expected Behavior

If Activity

  • never noticed and interrupted flag or
  • caught an interrupted exception, restored the interrupted flag, and continued to run or returned a result
    should be reported as Completed with its returned value.

Actual Behavior

According to #722 (comment)
if activity returns with an interrupted flag turned on, subsequent gRPC calls fail and the Activity result never gets reported.

Proposed solution

  • We should write a stable reproducible test close to a test that was changed in Removed unnecessary thread interrupt  #722
  • When Activity returns with interrupted flag = "true", we should hide the flag, report the result of Activity execution to the server, and return the flag back after that allowing the thread pool to stop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions