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

Fix slurmrestd version function #953

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions beeflow/client/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import datetime
import time
import importlib.metadata
import packaging
from packaging.version import Version

import daemon
import typer
Expand Down Expand Up @@ -175,7 +175,8 @@ def get_slurmrestd_version():
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=packaging.version.Version, reverse=True)[0]
newest_api = sorted(api_versions, key=Version, reverse=True)[0]
print(f"Inferred slurmrestd version: {newest_api}")
return newest_api


Expand Down