thoth-station / mi-scheduler

This repository schedules workflows for thoth-station/mi project
GNU General Public License v3.0
0 stars 8 forks source link

Scheduling failed due to unprocessable entity #254

Closed xtuchyna closed 2 years ago

xtuchyna commented 2 years ago

Describe the bug Same problem as #249 but with different context

LOGS

{"name": "thoth.mi-scheduler", "levelname": "INFO", "module": "app", "lineno": 128, "funcname": "schedule_for_kebechet_analysis", "created": 1666789797.1353104, "asctime": "2022-10-26 13:09:57,135", "msecs": 135.31041145324707, "relative_created": 28993.46899986267, "process": 1, "message": "Scheduled mi-kebechet analysis with id 'mi-analysis-thoth-station-lab-analysis-thoth-221026130957-45038993994a48f3'"}
Traceback (most recent call last):
  File "app.py", line 201, in <module>
    main(auto_envvar_prefix="SCHEDULE")
  File "/opt/app-root/lib64/python3.8/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/opt/app-root/lib64/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/opt/app-root/lib64/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/app-root/lib64/python3.8/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "app.py", line 193, in main
    Schedule(github=gh, openshift=oc, repositories=kebechet_repos, subdir=subdir).schedule_for_kebechet_analysis()
  File "app.py", line 121, in schedule_for_kebechet_analysis
    workflow_id = self.oc.schedule_mi_workflow(
  File "/opt/app-root/lib64/python3.8/site-packages/thoth/common/openshift.py", line 1547, in schedule_mi_workflow
    return self._schedule_workflow(
  File "/opt/app-root/lib64/python3.8/site-packages/thoth/common/openshift.py", line 1144, in _schedule_workflow
    return workflow(**parameters)
  File "/opt/app-root/lib64/python3.8/site-packages/thoth/common/workflows.py", line 828, in submit_mi
    workflow_id: Optional[str] = self.submit_workflow_from_template(
  File "/opt/app-root/lib64/python3.8/site-packages/thoth/common/workflows.py", line 503, in submit_workflow_from_template
    workflow_id = self.submit_workflow(
  File "/opt/app-root/lib64/python3.8/site-packages/thoth/common/workflows.py", line 459, in submit_workflow
    created: models.V1alpha1Workflow = self.api.create_namespaced_workflow(  # noqa
  File "/opt/app-root/lib64/python3.8/site-packages/argo/workflows/client/api/v1alpha1_api.py", line 309, in create_namespaced_workflow
    return self.create_namespaced_workflow_with_http_info(namespace, body, **kwargs)  # noqa: E501
  File "/opt/app-root/lib64/python3.8/site-packages/argo/workflows/client/api/v1alpha1_api.py", line 392, in create_namespaced_workflow_with_http_info
    return self.api_client.call_api(
  File "/opt/app-root/lib64/python3.8/site-packages/argo/workflows/client/api_client.py", line 364, in call_api
    return self.__call_api(resource_path, method,
  File "/opt/app-root/lib64/python3.8/site-packages/argo/workflows/client/api_client.py", line 188, in __call_api
    raise e
  File "/opt/app-root/lib64/python3.8/site-packages/argo/workflows/client/api_client.py", line 181, in __call_api
    response_data = self.request(
  File "/opt/app-root/lib64/python3.8/site-packages/argo/workflows/client/api_client.py", line 407, in request
    return self.rest_client.POST(url,
  File "/opt/app-root/lib64/python3.8/site-packages/argo/workflows/client/rest.py", line 265, in POST
    return self.request("POST", url,
  File "/opt/app-root/lib64/python3.8/site-packages/argo/workflows/client/rest.py", line 224, in request
    raise ApiException(http_resp=r)
argo.workflows.client.exceptions.ApiException: (422)
Reason: Unprocessable Entity
HTTP response headers: HTTPHeaderDict({'Audit-Id': 'bfa909bb-5e89-401a-9d87-aca7f235de39', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'X-Kubernetes-Pf-Flowschema-Uid': '59b5659f-a297-44da-8b14-ce23ddcd57c5', 'X-Kubernetes-Pf-Prioritylevel-Uid': '7e6bfd5c-9de3-41f9-8925-7dd28871b5fc', 'Date': 'Wed, 26 Oct 2022 13:09:57 GMT', 'Content-Length': '1268'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Workflow.argoproj.io \"mi-analysis-aicoe-aiops-maling_list_analysis_toolkit-analysis-thoth-221026130957-574d01b742c00826\" is invalid: metadata.name: Invalid value: \"mi-analysis-aicoe-aiops-maling_list_analysis_toolkit-analysis-thoth-221026130957-574d01b742c00826\": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')","reason":"Invalid","details":{"name":"mi-analysis-aicoe-aiops-maling_list_analysis_toolkit-analysis-thoth-221026130957-574d01b742c00826","group":"argoproj.io","kind":"Workflow","causes":[{"reason":"FieldValueInvalid","message":"Invalid value: \"mi-analysis-aicoe-aiops-maling_list_analysis_toolkit-analysis-thoth-221026130957-574d01b742c00826\": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')","field":"metadata.name"}]},"code":422}
xtuchyna commented 2 years ago

The unprocessable entity context appears to be also in mentioned issue, this is therefore duplicate and I am closing it