apache / airavata-mft

Apache Airavata Managed File Transfer Services
https://airavata.apache.org
Apache License 2.0
32 stars 39 forks source link

Rich error handling in CLI when communicating with MFT Server #94

Closed DImuthuUpe closed 1 year ago

DImuthuUpe commented 1 year ago

Related to the discussion going in https://github.com/apache/airavata-mft/issues/93#issuecomment-1496242557. Presently the connection failures to MFT service from the CLI throw a StatusCode.UNAVAILABLE exception which is generic to gRPC. We need to capture these errors and print user-friendly error messages and steps to debug the issue.

One example place that requires the fix: https://github.com/apache/airavata-mft/blob/master/python-cli/mft_cli/airavata_mft_cli/storage/__init__.py#L66

slimandslam commented 1 year ago

Yes. Unless you are running the daemon in some kind of HA configuration (e.g. using redundancy and Zookeeper, for example), you shouldn't ever assume that the daemon is running. The CLI should, at least, know that it failed to contact the daemon and give some sort of clear error message, like, "cannot contact daemon", imho.

praneethchityala commented 1 year ago

@DImuthuUpe I will be looking into this, will post updates once I have them. @slimandslam thank you for the suggestion.