reanahub / reana-client

REANA command-line client
http://reana-client.readthedocs.io/
MIT License
10 stars 45 forks source link

cli: `info` error when connecting to older clusters #627

Closed tiborsimko closed 1 year ago

tiborsimko commented 1 year ago

Current behaviour

After recent changes in info endpoint response, the client replies well to "latest" clusters:

$ reana-client info
List of supported compute backends: kubernetes
Default timeout for Kubernetes jobs: 604800
Default memory limit for Kubernetes jobs: 4Gi
Default workspace: /var/reana
Maximum allowed memory limit for Kubernetes jobs: None
Maximum timeout for Kubernetes jobs: 1209600
Maximum retention period in days for workspace files: None
List of available workspaces: /var/reana

but it shows a traceback when connecting to "older" clusters that don't have this new information:

$ reana-client info
List of supported compute backends: kubernetes, htcondorcern, slurmcern
Default workspace: /var/reana
List of available workspaces: /var/reana
==> ERROR: Could not list cluster info:
'NoneType' object has no attribute 'get'

Expected behaviour

The client should not assume the presence of the new fields; if some are not present, then nothing should be printed, only the available information, as the Go client does:

$ ./reana-client-go info
List of supported compute backends: kubernetes, htcondorcern, slurmcern
Default workspace: /var/reana
List of available workspaces: /var/reana