Skip to content

Fix duplicate flows in dashboard tables caused by revisions#14580

Open
ayuxsh009 wants to merge 1 commit intokestra-io:developfrom
ayuxsh009:fix/dashboard-flows-duplicate-revisions
Open

Fix duplicate flows in dashboard tables caused by revisions#14580
ayuxsh009 wants to merge 1 commit intokestra-io:developfrom
ayuxsh009:fix/dashboard-flows-duplicate-revisions

Conversation

@ayuxsh009
Copy link
Contributor

Description

This PR fixes an issue where dashboard tables using the
io.kestra.plugin.core.dashboard.data.Flows data source displayed duplicate entries for the same flow when multiple revisions existed.

Previously, the Flows data source returned all revisions of each flow, which caused one logical flow to appear multiple times in table charts. This change ensures that only the latest revision of each flow is returned, so each flow appears exactly once in dashboards.


🔗 Related Issue

Closes #14506


🎨 Frontend Checklist

This PR does not include any frontend changes.


🛠️ Backend Checklist

  • Code compiles successfully and passes all checks
  • All unit and integration tests pass

📝 Additional Notes

Root Cause
When using the Flows dashboard data source, the fetchData() and fetchValue() methods queried directly from the flows table, which stores one row per revision. This caused each flow to appear multiple times in dashboard tables.

Solution
Both methods were updated to query from fromLastRevision(true) instead of jdbcRepository.getTable(), applying the existing window-function-based filter that returns only the latest revision of each flow.

Testing

  • All existing JDBC Flow Repository tests pass (58 passing)
  • Manually verified that after editing the same flow multiple times, the dashboard table shows a single entry corresponding to the latest revision

Verification Screenshot*

After editing the same flow multiple times (creating multiple revisions), the
“All Flows” dashboard table now shows only one row for the flow (latest revision),
confirming that duplicate entries are no longer displayed.
image

Copilot AI review requested due to automatic review settings February 12, 2026 15:59
@github-project-automation github-project-automation bot moved this to To review in Pull Requests Feb 12, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@MilosPaunovic MilosPaunovic requested a review from Skraye February 13, 2026 06:46
@MilosPaunovic MilosPaunovic added area/backend Needs backend code changes kind/external Pull requests raised by community contributors labels Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/backend Needs backend code changes kind/external Pull requests raised by community contributors

Projects

Status: To review

Development

Successfully merging this pull request may close these issues.

[Dashboard] Flow ID are duplicated because returned with their revision

2 participants

Comments