Skip to content

fix: remove lastActionType from execution state#363

Merged
chybisov merged 2 commits intomainfrom
fix-last-action-type
Mar 17, 2026
Merged

fix: remove lastActionType from execution state#363
chybisov merged 2 commits intomainfrom
fix-last-action-type

Conversation

@effie-ms
Copy link
Copy Markdown
Contributor

Which Linear task is linked to this PR?

https://linear.app/lifi-linear/issue/EMB-310/bug-execution-status-failed-but-no-action-marked-failed-on-reload

Why was it implemented this way?

On retry after a failed step (e.g. RECEIVING_CHAIN wait-for-status), a subsequent failure set execution.status to FAILED without marking any action as FAILED, so the UI had no indication of which action failed.

Causes:

  • Error handling in BaseStepExecutor only marked an action as FAILED when it could resolve it via step.execution.lastActionType.
  • lastActionType was cleared in prepareRestart and in StatusManager.initializeExecution when resuming from FAILED, so the catch had no action to update.

Solution: Since actions are added and updated in the order of creation, use the last action in execution.actions as the failing action and remove lastActionType from the codebase.

Why: Single source of truth (pipeline order = last element is current). The bug came from lastActionType being cleared in multiple places while the actions array held the real state; removing the field removes that type of bugs. After prepareRestart, the last element is the action we're retrying, so marking it FAILED is correct. Alternative was to set/preserve lastActionType in prepareRestart and init, deriving from the array was chosen to avoid redundant state and keep a single source of truth.

Checklist before requesting a review

  • I have performed a self-review and testing of my code.
  • This pull request is focused and addresses a single problem.

@effie-ms effie-ms self-assigned this Mar 16, 2026
@chybisov chybisov merged commit 8328202 into main Mar 17, 2026
2 checks passed
@chybisov chybisov deleted the fix-last-action-type branch March 17, 2026 12:16
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