-
Notifications
You must be signed in to change notification settings - Fork 42
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
Resource pool status #1123
Resource pool status #1123
Conversation
0889b88
to
12e52b4
Compare
Problem: the FluxionResourcePoolV1 does not support setting vertex status. However, some resources, such as rabbits, should be initialized as down, and are only known to Fluxion through JGF produced by the FluxResourcePool class. Add a 'status' parameter to the FluxionResourcePoolV1 constructor, with a default of 'up' to maintain backwards compatibility.
Problem: some Python resourcegraph super() invocations use the old Python 2 super() syntax with arguments. Use the Python 3 syntax with no arguments.
Problem: there should be tests for the Fluxion Python code, but there is no framework for testing python code under TAP. Add the pycotap package.
12e52b4
to
f95f926
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is looking good overall, but the test isn't currently being run.
You'll need to add the test to CMakeLists here:
Line 88 in d51c81f
) |
and then make a simple sharness test (i.e. t10001-resourcegraph.t
) that runs t10001-resourcegraph.py
like this:
flux-sched/t/t3301-system-latestart.t
Line 31 in d51c81f
test_expect_success 'flux resource list works' ' |
I think we'll end up leaving the JGF reader's default to |
f95f926
to
24ab265
Compare
Done and pushed!
How come? The python test outputs TAP already, since I copied the pycotap package over from flux-core. |
24ab265
to
0777d85
Compare
Problem: there are no tests for the Python resourcegraph class. Add some basic tests.
0777d85
to
801329f
Compare
You're right. I messed up the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! This is ready to be merged.
Thanks! Setting MWP |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #1123 +/- ##
========================================
- Coverage 70.1% 69.7% -0.5%
========================================
Files 90 94 +4
Lines 12264 12723 +459
========================================
+ Hits 8605 8868 +263
- Misses 3659 3855 +196
|
Problem: the FluxionResourcePoolV1 does not support setting
vertex status. However, some resources, such as rabbits, should
be initialized as down, and are only known to Fluxion through
JGF produced by the FluxResourcePool class.
Add a 'status' parameter to the FluxionResourcePoolV1 constructor,
with a default of 'up' to maintain backwards compatibility.
It sounds like there's a chance we'll change the JGF reader's default to 'down' in which case we'd want to change the behavior of the ResourceGraph class as well, I think.