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

Resource pool status #1123

Merged
merged 4 commits into from
Jan 4, 2024

Conversation

jameshcorbett
Copy link
Member

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.

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.
Copy link
Member

@milroy milroy left a 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:

and then make a simple sharness test (i.e. t10001-resourcegraph.t) that runs t10001-resourcegraph.py like this:

test_expect_success 'flux resource list works' '

@milroy
Copy link
Member

milroy commented Jan 4, 2024

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.

I think we'll end up leaving the JGF reader's default to up to avoid having to change a lot of the current sharness tests.

@jameshcorbett
Copy link
Member Author

You'll need to add the test to CMakeLists here:

Done and pushed!

and then make a simple sharness test (i.e. t10001-resourcegraph.t) that runs t10001-resourcegraph.py like this:

How come? The python test outputs TAP already, since I copied the pycotap package over from flux-core.

Problem: there are no tests for the Python resourcegraph class.

Add some basic tests.
@milroy
Copy link
Member

milroy commented Jan 4, 2024

How come? The python test outputs TAP already, since I copied the pycotap package over from flux-core.

You're right. I messed up the PATH in my testing which confused me about how sharness was executing the test.

Copy link
Member

@milroy milroy left a 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.

@jameshcorbett
Copy link
Member Author

Thanks! Setting MWP

@jameshcorbett jameshcorbett added the merge-when-passing mergify.io - merge PR automatically once CI passes label Jan 4, 2024
Copy link

codecov bot commented Jan 4, 2024

Codecov Report

Merging #1123 (801329f) into master (d51c81f) will decrease coverage by 0.5%.
The diff coverage is 83.3%.

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     
Files Coverage Δ
src/python/fluxion/resourcegraph/V1.py 78.0% <83.3%> (ø)

... and 3 files with indirect coverage changes

@mergify mergify bot merged commit 17f6f3d into flux-framework:master Jan 4, 2024
22 of 23 checks passed
@jameshcorbett jameshcorbett deleted the resource-pool-status branch January 4, 2024 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-when-passing mergify.io - merge PR automatically once CI passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants