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

Make the perl code deterministic #1563

Closed
wants to merge 1 commit into from
Closed

Make the perl code deterministic #1563

wants to merge 1 commit into from

Conversation

niclan
Copy link
Contributor

@niclan niclan commented Jul 25, 2023

No description provided.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 5656295672

  • 0 of 4 (0.0%) changed or added relevant lines in 1 file are covered.
  • 3 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.05%) to 51.064%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/Munin/Master/Graph.pm 0 4 0.0%
Files with Coverage Reduction New Missed Lines %
lib/Munin/Master/Graph.pm 1 3.1%
lib/Munin/Master/UpdateWorker.pm 2 92.61%
Totals Coverage Status
Change from base Build 5462822496: -0.05%
Covered Lines: 1104
Relevant Lines: 2162

💛 - Coveralls

@niclan niclan marked this pull request as draft July 25, 2023 11:44
@steveschnepp
Copy link
Member

steveschnepp commented Jul 25, 2023

What do you think about making graph.pm and html.pm dumb and all the ordering precomputed during update amd stored in the DB?

that would open the way to a very simple per-request override, and probably ease debugging.

@yunal
Copy link
Contributor

yunal commented Jul 25, 2023

Moving field ordering to the munin-update would work well both for html and graphing. Do you want to give it a go? Beware: It needs to preserve the order of "config" not "fetch".

The current query in graph.pm does not seem deterministic but I guess I need to get it on a debug test bench :I

Also the graphs seem to be using the default palette, which is really weird to me.

@steveschnepp
Copy link
Member

Moving field ordering to the munin-update would work well both for html and graphing. Do you want to give it a go?

That would be great!

Note that :

  • I usually favor ordering directly via the SQL. So priority & ordering is best stored inside the DB as a specific field
  • I think there's already some work about it. Not sure about its state, but we should not have too many ways to implement the same thing 😉

Beware: It needs to preserve the order of "config" not "fetch".

That's indeed my understanding also. As fetch shall only contain values & ext_info, no metadata. There was an issue about what to do with fetch only fields, and my advice was to store the data, but not display them.

That way the config error is much more apparent, yet we don't loose data. The user can still delete the RRD himself if was a config mistake.

The current query in graph.pm does not seem deterministic but I guess I need to get it on a debug test bench :I

Graph & HTML should be as dumb as possible : even the query should simply leverage ORDER BY.
I'm trying to keep any data massaging to a minimal level inside both. That usually makes the DB self explanatory, and ease understanding, as it offers a structured way of the whole state.

Also the graphs seem to be using the default palette, which is really weird to me.

Ah, that's possible, as I might have missed it. Sorry!

@niclan
Copy link
Contributor Author

niclan commented Jul 26, 2023

There is already code to merge graph_order and field_order here https://github.com/munin-monitoring/munin/blob/master/lib/Munin/Master/UpdateWorker.pm#L669

@niclan
Copy link
Contributor Author

niclan commented Jul 26, 2023

This PR is made redundant by #1566

@niclan niclan closed this Jul 26, 2023
@niclan niclan deleted the graph_order-things branch July 26, 2023 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants