Closed milroy closed 1 month ago
Might want to include a test that the RPC works with the flux-core tooling (if it's already there and I missed it sorry!)
$ flux module stats sched-fluxion-resource
$ flux module stats --clear sched-fluxion-resource
Might want to include a test that the RPC works with the flux-core tooling (if it's already there and I missed it sorry!)
There are tests that run flux module stats sched-fluxion-resource
(they don't check the output, though), but nothing runs --clear
. This functionality doesn't seem to warrant creating a new sharness test, but it's not immediately obvious which test I could add it to. Maybe t4000-match-params.t
?
Ah OK, probably fine then! For clear, the topic string either matches or it doesn't so ti's a pretty low risk thing for a regression!
Also, does anyone have insight into how to deal with the pylint test failure?
src/cmd/flux-ion-resource.py:436:0: R0915: Too many statements (51/50) (too-many-statements)
It suggests that I need to rewrite the main
function to split it up, but it's not obvious how to do that given it's dealing with a large number of arguments. Also, I can't reproduce the error in the bookworm
CI image.
I'd just disable the check for that function:
# pylint: disable=too-many-statements
I think that comment goes right above the affected function.
Ah OK, probably fine then! For clear, the topic string either matches or it doesn't so ti's a pretty low risk thing for a regression!
I thought it was best to add a test_expect_success
test to check for both.
Oh one more thing - stats is usually made available to guests without restriction, unless there is something exposed there that could be a problem. It is just one less thing that requires you to sudo to access.
I made your suggested change, but I didn't need sudo to run stats
before.
I made your suggested change, but I didn't need sudo to run stats before.
Thanks! Would only be needed when running multi-user (where the user running flux is not you).
Thanks for the feedback @garlick! Setting MWP.
Gathering match data is important for diagnosing performance problems in Fluxion. This PR updates the
stat
RPC topic to respond to flux-core as expected and implementsclear ()
functionality.Resolves issue #1166.