conductor icon indicating copy to clipboard operation
conductor copied to clipboard

fix: latter task cannot be executed because taskResult.getLogs() can return null and decide(workflowId) will not be invoked

Open ColinZou opened this issue 1 year ago • 5 comments

…return null and decide(workflowId) will not be invoked

Pull Request type

  • [x] Bugfix
  • [ ] Feature
  • [ ] Refactoring (no functional changes, no api changes)
  • [ ] Build related changes
  • [ ] WHOSUSING.md
  • [ ] Other (please describe):

NOTE: Please remember to run ./gradlew spotlessApply to fix any format violations.

Changes in this PR Added null check for return value taskResult.getLogs before saving task execution log when update task.

ColinZou avatar Dec 12 '24 03:12 ColinZou

@jmigueprieto could you please check this PR. The input logs of TaskResult can be null somehow and nullpointer exception throws.

ColinZou avatar Jan 19 '25 13:01 ColinZou

@jmigueprieto could you please check this PR. The input logs of TaskResult can be null somehow and nullpointer exception throws.

Hey @ColinZou - Thanks for bringing this up. I'll take a look.

jmigueprieto avatar Jan 20 '25 12:01 jmigueprieto

I found this NPE when invoking update task from rest API. The update task API accepts logs=null and the NPE get triggered in the place I fixed.

ColinZou avatar Feb 13 '25 10:02 ColinZou

  • Add a test or explain the execution path that leads to a NPE
  • Change Optional usage.

Hi @ColinZou can you take care of the comments and we can merge.

v1r3n avatar Apr 04 '25 05:04 v1r3n

  • Add a test or explain the execution path that leads to a NPE I've reply the message. this one: I found this NPE when invoking update task from rest API. The update task API accepts logs=null and the NPE get triggered in the place I fixed.
  • Change Optional usage. It was DONE at Feb 5 2025.

Hi @ColinZou can you take care of the comments and we can merge.

@v1r3n I am really not sure which comment left to be resolved. Let me know if I misunderstood anything either from you or @jmigueprieto please.

ColinZou avatar Apr 04 '25 14:04 ColinZou