Processing namespaced template fails
fridex opened this issue · 2 comments
fridex commented
The following call to process template fails with the exception reported bellow:
from openshift.client.apis import TemplateOpenshiftIoApi
TemplateOpenshiftIoApi().create_namespaced_processed_template_v1(namespace, template)
2018-07-31 20:31:09,749 [5990] ERROR thoth.user_api.api_v1: Invalid value for `raw`, must be a follow pattern or equal to `/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==\|[A-Za-z0-9+\/]{3}=)?$/`
--
| Traceback (most recent call last):
| File "/opt/app-root/lib/python3.6/site-packages/openshift/client/api_client.py", line 16, in _ApiClient__deserialize
| return super(ApiClient, self).__deserialize(data, klass)
| File "/opt/app-root/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 265, in __deserialize
| klass = getattr(models, klass)
| AttributeError: module 'kubernetes.client.models' has no attribute 'V1Template'
| During handling of the above exception, another exception occurred:
| Traceback (most recent call last):
| File "/opt/app-root/src/thoth_user_api/api_v1.py", line 52, in analyze
| 'pod_id': run_package_extract(**params),
| File "/opt/app-root/src/thoth_user_api/utils.py", line 188, in run_package_extract
| template = _oc_process(Configuration.THOTH_MIDDLETIER_NAMESPACE, template)
| File "/opt/app-root/src/thoth_user_api/utils.py", line 262, in _oc_process
| return TemplateOpenshiftIoApi().create_namespaced_processed_template_v1(namespace, template)
| File "/opt/app-root/lib/python3.6/site-packages/openshift/client/apis/template_openshift_io_api.py", line 58, in create_namespaced_processed_template_v1
| (data) = self.create_namespaced_processed_template_v1_with_http_info(namespace, body, **kwargs)
| File "/opt/app-root/lib/python3.6/site-packages/openshift/client/apis/template_openshift_io_api.py", line 143, in create_namespaced_processed_template_v1_with_http_info
| collection_formats=collection_formats)
| File "/opt/app-root/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 321, in call_api
| _return_http_data_only, collection_formats, _preload_content, _request_timeout)
| File "/opt/app-root/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 163, in __call_api
| return_data = self.deserialize(response_data, response_type)
| File "/opt/app-root/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 236, in deserialize
| return self.__deserialize(data, response_type)
| File "/opt/app-root/lib/python3.6/site-packages/openshift/client/api_client.py", line 22, in _ApiClient__deserialize
| return super(ApiClient, self).__deserialize_model(data, klass)
| File "/opt/app-root/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 620, in __deserialize_model
| kwargs[attr] = self.__deserialize(value, attr_type)
| File "/opt/app-root/lib/python3.6/site-packages/openshift/client/api_client.py", line 16, in _ApiClient__deserialize
| return super(ApiClient, self).__deserialize(data, klass)
| File "/opt/app-root/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 254, in __deserialize
| for sub_data in data]
| File "/opt/app-root/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 254, in <listcomp>
| for sub_data in data]
| File "/opt/app-root/lib/python3.6/site-packages/openshift/client/api_client.py", line 16, in _ApiClient__deserialize
| return super(ApiClient, self).__deserialize(data, klass)
| File "/opt/app-root/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 276, in __deserialize
| return self.__deserialize_model(data, klass)
| File "/opt/app-root/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 622, in __deserialize_model
| instance = klass(**kwargs)
| File "/opt/app-root/lib/python3.6/site-packages/kubernetes/client/models/runtime_raw_extension.py", line 49, in __init__
| self.raw = raw
| File "/opt/app-root/lib/python3.6/site-packages/kubernetes/client/models/runtime_raw_extension.py", line 74, in raw
| raise ValueError("Invalid value for `raw`, must be a follow pattern or equal to `/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==\|[A-Za-z0-9+\/]{3}=)?$/`")
| ValueError: Invalid value for `raw`, must be a follow pattern or equal to `/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==\|[A-Za-z0-9+\/]{3}=)?$/`
fabianvf commented
Closing, reopen if you see this again. I think the fix has been released though.