Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Tracking terminated workflows in LRU cache #450

Merged
merged 4 commits into from
Sep 1, 2022

Conversation

hamersaw
Copy link
Contributor

@hamersaw hamersaw commented Jun 8, 2022

TL;DR

Adding a LRU filter cache to the resource version caching workflow store. We add the workflow resource version key if the workflow is successfully updated to a terminal phase. When workflows are requested with "get" we first lookup to see if the workflow has already been terminated. This fixes issues where we attempt to process a workflow that has already reached the terminal state, since the system is eventually consistent this may happen frequently.

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Complete description

^^^

Tracking Issue

fixes flyteorg/flyte#2546

Follow-up issue

NA

Signed-off-by: Daniel Rammer <daniel@union.ai>
Signed-off-by: Daniel Rammer <daniel@union.ai>
Signed-off-by: Daniel Rammer <daniel@union.ai>
@codecov
Copy link

codecov bot commented Jun 8, 2022

Codecov Report

Merging #450 (01ae5b1) into master (87c289c) will decrease coverage by 0.03%.
The diff coverage is 35.71%.

Copy link
Contributor

@ckiosidis ckiosidis left a comment

Choose a reason for hiding this comment

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

FYI we did the exact same thing in an internal job that streams lineage data and it improved performance massively.
We check the workflow status for success/failure and only cache those

@hamersaw hamersaw merged commit aa3e9a6 into master Sep 1, 2022
@hamersaw hamersaw deleted the bug/update-on-modified-crd branch September 1, 2022 15:07
eapolinario pushed a commit to eapolinario/flytepropeller that referenced this pull request Aug 9, 2023
* added lru filter to track terminated workflows

Signed-off-by: Daniel Rammer <daniel@union.ai>

* updated unit tests

Signed-off-by: Daniel Rammer <daniel@union.ai>

* add test on terminated filter

Signed-off-by: Daniel Rammer <daniel@union.ai>

Signed-off-by: Daniel Rammer <daniel@union.ai>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Calling update on modified FlyteWorkflow CRD
3 participants