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: fix graph diffs in dashboard when node aliases are used #9099

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

utkuozdemir
Copy link
Member

When talosctl dashboard is used with node "aliases" (e.g., node names or machine IDs in Omni) passed via -n flag, the graphs in the monitor tab were not rendered correctly: The matching of the old and current data were done incorrectly.

Fix this by doing the comparison over the non-resolved node names, not over the resolved ones.

@@ -18,6 +18,11 @@ type Data struct {
// Data per each node.
Nodes map[string]*Node

// UnresolvedNodes contain the same Node data as Nodes
Copy link
Member

Choose a reason for hiding this comment

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

is this some kind of a race that we resolve after the graphs start working?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nope, it wasn't a race, the comparison was done wrongly in a consistent way. So when a node alias (name etc.) was used, the graphs were never updating. it went unnoticed.

Also, I now solved the issue in a different way, so this code is no more there.

When `talosctl dashboard` is used with node "aliases" (e.g., node names or machine IDs in Omni) passed via `-n` flag, the graphs in the monitor tab were not rendered correctly: The matching of the old and current data were done incorrectly.

Fix this by pushing node alias->IP resolution down to the (api & log) data sources of the dashboard, by passing a resolver to them.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
@utkuozdemir
Copy link
Member Author

/m

@talos-bot talos-bot merged commit 9d34158 into siderolabs:main Aug 7, 2024
47 checks passed
@utkuozdemir utkuozdemir deleted the fix-dashboard-perf-graphs branch August 7, 2024 13:55
@smira smira mentioned this pull request Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backported
Development

Successfully merging this pull request may close these issues.

3 participants