-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't working
Description
The function get_slurmrestd_version needs to be upated
BEE/beeflow/common/worker/utils.py
Lines 41 to 54 in 83fe32a
| def get_slurmrestd_version(): | |
| """Get the newest slurmrestd version.""" | |
| resp = subprocess.run(["slurmrestd", "-s", "list"], check=True, stderr=subprocess.PIPE, | |
| text=True).stderr | |
| resp = resp.split("\n") | |
| # Confirm slurmrestd format is the same | |
| # If the slurmrestd list outputs has changed potentially something else has broken | |
| if "Possible OpenAPI plugins" not in resp[0]: | |
| print("Slurmrestd OpenAPI format has changed and things may break") | |
| api_versions = [line.split('/')[1] for line in resp[1:] if re.search(r"openapi/v\d+\.\d+\.\d+", | |
| line)] | |
| # Sort the versions and grab the newest one | |
| newest_api = sorted(api_versions, key=Version, reverse=True)[0] | |
| return newest_api |
The issue is that the way I was getting the api_version through slurmrestd -s list no longer works since slurm 24.11.x no longer uses versioned apis. So, instead we need to get it from slurmrestd -d list which looks like
Possible data_parser plugins:
data_parser/v0.0.39
data_parser/v0.0.40
data_parser/v0.0.41
Instead of slurmestd -s list output which looks like
Possible OpenAPI plugins:
openapi/dbv0.0.39
openapi/slurmctld
openapi/slurmdbd
openapi/v0.0.39
So it's really just a matter of updating the subprocess call and changing the regex, and that should do it.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working