-
Notifications
You must be signed in to change notification settings - Fork 93
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
Remove HTTP fallback #2355
Remove HTTP fallback #2355
Conversation
fi | ||
set +x | ||
|
||
set +e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will change this to a symlink instead of a copy of test header.
lib/cylc/network/daemon.py
Outdated
@@ -19,5 +19,5 @@ | |||
|
|||
from cylc.network.method import METHOD | |||
|
|||
if METHOD == "https": | |||
if METHOD == "https" or "http": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be if METHOD == "https" or METHOD == "http":
or if METHOD in ["https", "http"]:
(As discussed offline, please be aware that |
(Site test battery OK in my environment.) |
(Profile battery 😐 neutral in my environment, as expected.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now looking good.
Passes the comms_protocol/schema to the BaseCommsClient from task message,py and also added a check to see if we have it already stored in the contact file before going to the global config file.
65298da
to
c7bc6eb
Compare
@@ -38,6 +39,11 @@ | |||
" falling back to HTTP: {0}\n" | |||
) | |||
|
|||
ERROR_NO_HTTPS_SUPPORT = ( | |||
"ERROR: server has no HTTPS support," + | |||
" configure user's global.rc file to use HTTPS : {0}\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't that be "to use HTTP" (no S!).
Better wording might be "configure your global.rc file to use HTTP" (as the the person receiving this warning will be the user in question).
return comms_prtcl | ||
except (AttributeError, KeyError, TypeError, ValueError): | ||
raise KeyError("No suite contact info for comms protocol found") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to be worried about back-compatibility here, for already-running suites?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will fall back to finding it from the global.rc file if not in the contact file here, which already has a default setting of https in previous versions. But yes, what if the old running suite is using http...I will have to think about how to handle this...
(Already-running suites using https should be ok with this)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, roger that.
http_request_items) | ||
sys.stderr.write(ERROR_NO_HTTPS_SUPPORT.format(exc)) | ||
raise CylcError("Cannot issue a https command" | ||
" over unsecured http.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not really an "https command". Maybe just "Cannot issue commands over unsecured http"?
http_request_items) | ||
sys.stderr.write(ERROR_NO_HTTPS_SUPPORT.format(exc)) | ||
raise CylcError("Cannot issue a https command" | ||
" over unsecured http.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good now.
To close #2204:
e.g. in
global.rc