Skip to content
This repository was archived by the owner on Dec 13, 2023. It is now read-only.

Fix unused version in Running Workflows metric#3386

Merged
apanicker-nflx merged 5 commits intoNetflix:mainfrom
james-deee:jd/workflow-in-progress-stat
Jan 24, 2023
Merged

Fix unused version in Running Workflows metric#3386
apanicker-nflx merged 5 commits intoNetflix:mainfrom
james-deee:jd/workflow-in-progress-stat

Conversation

@james-deee
Copy link
Contributor

Pull Request type

  • [X ] Bugfix
  • [ X] Refactoring (no functional changes, no api changes)

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

Changes in this PR

Describe the new behavior from this PR, and why it's needed
The current "running workflows" metric doesn't record what it thinks it's recording. The query for getPendingWorkflowCount ONLY takes a name parameter. There is no concept of version. So, the metric is just repeated AND, the same query is run over and over and over again for X versions.

This is a performance improvement as well. If someone were to have 100++ of versions for a workflow, this Monitor was making the same exact query over and over for those X versions.

This is more correct given the structure we currently have setup for pending workflows.

Alternatives considered

Describe alternative implementation you have considered
In the future, we could look at adding the version to for backends that are maintaining a "pending workfow" set. Right now that doesn't exist, so this is better given the actual structure we have right now.

image

@apanicker-nflx apanicker-nflx merged commit 58707e2 into Netflix:main Jan 24, 2023
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.

2 participants