Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Enable realtime metric gc after its workflow is completed. Fixes #12790 #12830

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jswxstw
Copy link
Contributor

@jswxstw jswxstw commented Mar 21, 2024

Fixes #12790

Motivation

Realtime metrics may be cleaned up, even if the workflow is still running.

Modifications

Adding two boolean value: realtime and complete in metric to indicate whether the metric is realtime type and whether it is completed.
Enable realtime metric gc only after its workflow is completed.

Verification

local test and UT

workflow/metrics/metrics.go Show resolved Hide resolved
workflow/metrics/metrics.go Show resolved Hide resolved
workflow/metrics/metrics.go Show resolved Hide resolved
workflow/metrics/server.go Outdated Show resolved Hide resolved
@agilgur5 agilgur5 added area/metrics area/gc Garbage collection, such as TTLs, retentionPolicy, delays, and more labels Mar 21, 2024
workflow/metrics/metrics_test.go Outdated Show resolved Hide resolved
Copy link
Member

@Joibel Joibel left a comment

Choose a reason for hiding this comment

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

Thanks for your patience. LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gc Garbage collection, such as TTLs, retentionPolicy, delays, and more area/metrics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Real-time metrics disappear while workflow is running when metricTTL is < workflow run time.
3 participants