In T347015#9188042, the recommendation-api-ng was deployed on LiftWing staging and an internal endpoint was set.
When we query the spec parameter, the endpoint works well:
# working within 15716.rec-api-staging-endpoint screen kevinbazira@deploy2002:/srv/deployment-charts/helmfile.d/ml-services$ curl https://recommendation-api-ng.k8s-ml-staging.discovery.wmnet:31443/api/spec {"basePath":"/api","consumes":["application/json"],"definitions":{"Article":{"properties":{"pageviews":{"description":"pageviews","type":"integer"},"rank":{"description":"rank","type":"number"},"title":{"description":"title","type":"string"},"wikidata_id":{"description":"wikidata_id","type":"string"}},"required":["rank","title","wikidata_id"],"type":"object"}},"info":{"title":"API","version":"1.0"},"paths":{"/":{"get":{"deprecated":true,"description":"Gets recommendations of source articles that are missing in the target","operationId":"get_legacy_article","parameters":[{"description":"Source wiki project language code","in":"query","name":"s","required":true,"type":"string"},{"description":"Target wiki project language code","in":"query","name":"t","required":true,"type":"string"},{"default":12,"description":"Number of recommendations to fetch","in":"query","maximum":24,"minimum":0,"name":"n","type":"integer"},{"description":"Seed article for personalized recommendations that can also be a list separated by \"|\"","in":"query","name":"article","pattern":"^([^|]+(\\|[^|]+)*)?$","type":"string"},{"default":true,"description":"Whether to include pageview counts","in":"query","name":"pageviews","type":"boolean"},{"collectionFormat":"multi","default":"morelike","description":"Which search algorithm to use if a seed is specified","enum":["morelike","wiki"],"in":"query","name":"search","type":"string"}],"responses":{"200":{"description":"Success","schema":{"items":{"$ref":"#/definitions/Article"},"type":"array"}}},"tags":["default"]}},"/spec":{"get":{"operationId":"get_spec","responses":{"200":{"description":"Success"}},"tags":["default"]}}},"produces":["application/json"],"responses":{"MaskError":{"description":"When any error occurs on mask"},"ParseError":{"description":"When a mask can't be parsed"}},"swagger":"2.0","tags":[{"description":"Default namespace","name":"default"}]}
But when we query other parameters, the endpoint hangs and on checking the pod, we get a readiness probe failed error:
# working within 15716.rec-api-staging-endpoint screen kevinbazira@deploy2002:~$ curl 'https://recommendation-api-ng.k8s-ml-staging.discovery.wmnet:31443/api/?s=en&t=fr&n=3&article=Apple' # working outside the screen kevinbazira@deploy2002:~$ kube_env recommendation-api-ng ml-staging-codfw kevinbazira@deploy2002:~$ kubectl get pods NAME READY STATUS RESTARTS AGE recommendation-api-ng-main-7b8659c6f7-46dpd 1/2 Running 0 5d13h kevinbazira@deploy2002:~$ kubectl describe pod recommendation-api-ng-main-7b8659c6f7-46dpd ... Readiness probe failed: Get "http://10.194.61.138:8080/api/spec": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
The goal of this task is to find out what is causing this internal endpoint failure and a possible solution.