-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Site connection exceptions #127
Comments
Sorry for misunderstanding your ticket. I am opening a new issue #128 for better description |
No problem at all. What I am trying is to be able to work with Fedcloud even if one or more sites are unavailable, like in this case. I think it will be very beneficial if a single site cannot disrupt the program operation. If it can help, I can attempt to do a PR myself if I have time, although I am not familiar with the code. |
Yes, the code should be error-proofing. I tried to catch all exceptions, but some of them still manage to leak out :-). Thank you for reporting. Fixing it would be simple (adding Timeout exception to this line https://github.com/tdviet/fedcloudclient/blob/master/fedcloudclient/endpoint.py#L214). And some sensible error messages should be useful instead of ignoring the errors ("pass"). I will do it when I have time. |
Thanks. I can give it a try tomorrow if you like. I just did a "quick-and-dirty" solution at the code by adding:
At https://github.com/tdviet/fedcloudclient/blob/master/fedcloudclient/endpoint.py#L190, just to have it working. Tomorrow I will look for a more elegant way to fix this... |
OMG. I made mistake twice :) in the haste (advised you to change line 214 instead line 190). Thank you for fixing this issue. Once you finish, just make a pull request and I will merge it to the main branch. |
Well, in fact I assume both places should be modified the same way, but I would normally unify both methods (for example with an abstraction via a lambda in Java). I will look for the homologous in Python. I just addressed the one that affected my case. |
I have finished the change, and I will do a PR in a few hours.
I hope I could help! |
I have seen that the problem with the certificates is explained here So, probably, instead of my previous suggestion, the code will have to be modified to actually inform the user about this situation. The problem currently is that the access to the site failed silently and there is no way for the user to know about the TLS error message explained in the PPT. I can do a new PR if you do not have time. |
I have made some new changes and I will do a new PR:
Please, review the last point, as I am not sure there this function is used somewhere. |
The "list" function in endpoint module is the "fedcloud endpoint list" command. By default, "click" lib uses function name as command name. If we want to change the function name, we need to configure to make "fedcloud endpoint list" to call the new function name |
Oh I see. I knew that this could break some things. Perhaps something like:
Source: https://stackoverflow.com/questions/35567753/python-click-library-rename-argument |
So far, I haven't found an elegant way to do it. |
There is a current issue in one of the sites, which is affecting the program operation:
I cannot retrieve any information because of this single site. I would suggest to capture the exception, continue processing the rest of the sites, and at the end provide the expected output with some warning about the failing sites (in stderr or some place where it can be easily removed if the output is later processed in a script).
The text was updated successfully, but these errors were encountered: