Inist-CNRS / Inist-CNRS/web-services
Le suivi des précalculs peut engendrer des erreurs
Open
Nobody has claimed this yet.
- Dominant language
- Hurl
- Stars
- 14
- Forks
- 1
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 9
Description
Exemple d'erreur :
File "/app/public/./v1/lda.py", line 131, in <module>
push_to_gateway('*************', job=job_name, registry=registry)
File "/usr/local/lib/python3.9/site-packages/prometheus_client/exposition.py", line 527, in push_to_gateway
_use_gateway('PUT', gateway, job, registry, grouping_key, timeout, handler)
File "/usr/local/lib/python3.9/site-packages/prometheus_client/exposition.py", line 619, in _use_gateway
handler(
File "/usr/local/lib/python3.9/site-packages/prometheus_client/exposition.py", line 379, in handle
resp = build_opener(base_handler).open(request, timeout=timeout)
File "/usr/local/lib/python3.9/urllib/request.py", line 523, in open
response = meth(req, response)
File "/usr/local/lib/python3.9/urllib/request.py", line 632, in http_response
response = self.parent.error(
File "/usr/local/lib/python3.9/urllib/request.py", line 561, in error
return self._call_chain(*args)
File "/usr/local/lib/python3.9/urllib/request.py", line 494, in _call_chain
result = func(*args)
File "/usr/local/lib/python3.9/urllib/request.py", line 641, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 503: Service Unavailable
Suggestion : utiliser un try - except - pass. Cela aurait l'avantage de faire tourner le précalcul même lorsque la machine jobs-metrics est indisponible ET de faire fonctionner les tests sur github.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in /app/public/./v1/lda.py around line 131, where push_to_gateway sends precalculation metrics to jobs-metrics. Reproduce or inspect the HTTP 503 failure, then run the repository tests on GitHub. Done means the precalculation continues when the metrics service is unavailable and the tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- prometheus, python
- Domain
- backend, observability
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100