Conversation
|
We can ignore CI failure on this PR as the upstream client is updated to this change in kubernetes-client/python#353 and if CI passes there, it would be good enough. |
8b386bb to
ca29238
Compare
| config = type.__call__(Configuration) | ||
| loader.load_and_set(config) | ||
| Configuration.set_default(config) | ||
| print("ZZZ1: %s" % config.api_key) |
There was a problem hiding this comment.
The PR is still a Work In Progress :)
| to be used with any API object. This will allow the caller to concurrently | ||
| talk with multiple clusters.""" | ||
| client_config = ConfigurationObject() | ||
| client_config = type.__call__(Configuration) |
There was a problem hiding this comment.
We need a fresh configuration object not the default one. With the change in Configuration class in swagger-codegen (that we did), creating a configuration object will give you the default object that has been set before. But here if we get that, we would have mixed old/new configuration. We rather want a fresh Configuration object with __init__ default values not the set_default 'ed object.
| header.append("Sec-WebSocket-Protocol: %s" % | ||
| configuration.ws_streaming_protocol) | ||
| if headers and 'sec-websocket-protocol' in headers: | ||
| header.append("sec-websocket-protocol: %s" % headers['authorization']) |
There was a problem hiding this comment.
Not autorization but 'sec-websocket-protocol'
There was a problem hiding this comment.
Indeed it can be use get with default value:
headers.get('sec-websocket-procotol', 'v4.channel.k8s.io')
There was a problem hiding this comment.
doesn't help much because if headers is None we still want a default value.
There was a problem hiding this comment.
Mehdy, we are checking for
'sec-websocket-protocol' in headers
BUT then using on line 52
headers['authorization']
There was a problem hiding this comment.
line 52 should be
header.append("sec-websocket-protocol: %s" % headers['sec-websocket-protocol'])
|
Now this is ready to review. |
|
@pokoli @dims Can you help reviewing this PR? Please ignore CI failure. That won't fix until I submit this and merge kubernetes-client/python#353 |
…aring to use swagger-codegen HEAD
|
LGTM 👍 |
Ref: kubernetes-client/python#341