Just realizing now that TWNTranslatewiki.net isn't served on WMF hardware, and might be overwhelmed by a small number of scoring requestswe cannot make direct requests to their API from WMF production. We're getting timeout errors at the momentORES architecture relies on these requests, although I was ableso we'll need to run one successful smoke test request this morningmake changes one way or another.
https://ores.wikimedia.org/v3/scores/translatewiki/8570713Alternatives suggested so far:
```* Make TWN API requests through the HTTPS proxy.
{* Run a new ORES instance from WMCE, which would only be responsible for TWN scoring.
"error": {
"code": "internal server error",
"message": "Traceback (most recent call last):\n File \"/srv/deployment/ores/deploy/venv/lib/python3.5/site-packages/urllib3/connection.py\", line 159, in _new_conn\n (self._dns_host, self.port), self.timeout, **extra_kw)\n File \"/srv/deployment/ores/deploy/venv/lib/python3.5/site-packages/urllib3/util/connection.py\", line 80, in create_connection\n raise err\n File \"/srv/deployment/ores/deploy/venv/lib/python3.5/site-packages/urllib3/util/connection.py\", line 70, in create_connection\n sock.connect(sa)\nsocket.timeout: timed out\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"/srv/deployment/ores/deploy/venv/lib/python3.5/site-packages/urllib3/connectionpool.py\", line 600, in urlopen\n chunked=chunked)\n File \"/srv/deployment/ores/deploy/venv/lib/python3.5/site-packages/urllib3/connectionpool.py\", line 343, in _make_request\n self._validate_conn(conn)\n File \"/srv/deployment/ores/deploy/venv/lib/python3.5/site-packages/urllib3/connectionpool.py\", line 839, in _validate_conn\n conn.connect()\n File \"/srv/deployment/ores/deploy/venv/lib/python3.5/site-packages/urllib3/connection.py\", line 301, in connect\n conn = self._new_conn()\n File \"/srv/deployment/ores/deploy/venv/lib/python3.5/site-packages/urllib3/connection.py\", line 164, in _new_conn\n (self.host, self.timeout))\nurllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.VerifiedHTTPSConnection object at 0x7f871fe0b908>, 'Connection to translatewiki.net timed out. (connect timeout=5.0)')\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"/srv/deployment/ores/deploy/venv/lib/python3.5/site-packages/requests/adapters.py\", line 449, in send\n timeout=timeout\n File \"/srv/deployment/ores/deploy/venv/lib/python3.5/site-packages/urllib3/connectionpool.py\", line 638, in urlopen\n _stacktrace=sys.exc_info()[2])\n File \"/srv/deployment/ores/deploy/venv/lib/python3.5/site-packages/urllib3/util/retry.py\", line 398, in increment\n raise MaxRetryError(_pool, url, error or ResponseError(cause))\nurllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='translatewiki.net', port=443): Max retries exceeded with url: /w/api.php?rvslots=main&revids=8570713&rvprop=comment%7Cuser%7Ccontentmodel%7Csize%7Cids%7Cuserid%7Ccontent%7Ctimestamp&prop=revisions&format=json&action=query (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x7f871fe0b908>, 'Connection to translatewiki.net timed out. (connect timeout=5.0)'))\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"/srv/deployment/ores/deploy/venv/lib/python3.5/site-packages/mwapi/session.py\", line 101, in _request\n auth=auth)\n File \"/srv/deployment/ores/deploy/venv/lib/python3.5/site-packages/requests/sessions.py\", line 533, in request\n resp = self.send(prep, **send_kwargs)\n File \"/srv/deployment/ores/deploy/venv/lib/python3.5/site-packages/requests/sessions.py\", line 646, in send\n r = adapter.send(request, **kwargs)\n File \"/srv/deployment/ores/deploy/venv/lib/python3.5/site-packages/requests/adapters.py\", line 504, in send\n raise ConnectTimeout(e, request=request)\nrequests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='translatewiki.net', port=443): Max retries exceeded with url: /w/api.php?rvslots=main&revids=8570713&rvprop=comment%7Cuser%7Ccontentmodel%7Csize%7Cids%7Cuserid%7Ccontent%7Ctimestamp&prop=revisions&format=json&action=query (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x7f871fe0b908>, 'Connection to translatewiki.net timed out. (connect timeout=5.0)'))\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File \"./ores/wsgi/routes/v3/util.py\", line 101, in process_score_request\n score_response = scoring_system.score(score_request)\n File \"./ores/scoring_systems/scoring_system.py\", line 59, in score\n response = self._score(request)\n File \"./ores/scoring_systems/celery_queue.py\", line 195, in _score\n return super()._score(*args, **kwargs)\n File \"./ores/scoring_systems/scoring_system.py\", line 104, in _score\n request, missing_model_set_revs)\n File \"./ores/scoring_systems/scoring_system.py\", line 151, in _extract_root_caches\n model_set, rev_ids, injection_caches=request.injection_caches)\n File \"./ores/scoring_context.py\", line 173, in extract_root_dependency_caches\n for rev_id, (error, _) in zip(rev_ids, error_root_vals):\n File \"/srv/deployment/ores/deploy/venv/lib/python3.5/site-packages/revscoring/extractors/api/extractor.py\", line 126, in _extract_many\n rev_docs = self.get_rev_doc_map(revids_to_lookup, rvprop=rvprop)\n File \"/srv/deployment/ores/deploy/venv/lib/python3.5/site-packages/revscoring/extractors/api/extractor.py\", line 233, in get_rev_doc_map\n return {rd['revid']: rd for rd in rev_docs}\n File \"/srv/deployment/ores/deploy/venv/lib/python3.5/site-packages/revscoring/extractors/api/extractor.py\", line 233, in <dictcomp>\n return {rd['revid']: rd for rd in rev_docs}\n File \"/srv/deployment/ores/deploy/venv/lib/python3.5/site-packages/revscoring/extractors/api/extractor.py\", line 244, in query_revisions_by_revids\n **params)\n File \"/srv/deployment/ores/deploy/venv/lib/python3.5/site-packages/mwapi/session.py\", line 309, in get\n continuation=continuation)\n File \"/srv/deployment/ores/deploy/venv/lib/python3.5/site-packages/mwapi/session.py\", line 171, in request\n files=files)\n File \"/srv/deployment/ores/deploy/venv/lib/python3.5/site-packages/mwapi/session.py\", line 103, in _request\n raise TimeoutError(str(e)) from e\nmwapi.errors.TimeoutError: HTTPSConnectionPool(host='translatewiki.net', port=443): Max retries exceeded with url: /w/api.php?rvslots=main&revids=8570713&rvprop=comment%7Cuser%7Ccontentmodel%7Csize%7Cids%7Cuserid%7Ccontent%7Ctimestamp&prop=revisions&format=json&action=query (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x7f871fe0b908>, 'Connection to translatewiki.net timed out. (connect timeout=5.0)'))\n"
}
}
```* Finally host TWN on WMF hardware.