Catch HTTP errors when downloading core agent
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start in src/scout_apm/core/core_agent_manager.py, following download(), download_package(), and untar() from the reported traceback. Check how HTTP responses and filesystem failures are currently handled; done means failed downloads do not reach tarfile extraction or start the agent, and the failure is logged and returned clearly.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
At current the download code doesn't check for status code or other failures when downloading the core agent package.
Overriding SCOUT_CORE_AGENT_TRIPLE can lead to invalid URL's for the core agent package, which leads to the S3 404 page being attempted to be opened as a tarfile:
~/Documents/Projects/scout_apm_python/src/scout_apm/core/core_agent_manager.py in download(self)
55
56 def download(self):
---> 57 self.downloader.download()
58
59 def run(self):
~/Documents/Projects/scout_apm_python/src/scout_apm/core/core_agent_manager.py in download(self)
143 try:
144 self.download_package()
--> 145 self.untar()
146 except OSError:
147 logger.exception("Exception raised while downloading Core Agent")
~/Documents/Projects/scout_apm_python/src/scout_apm/core/core_agent_manager.py in untar(self)
192
193 def untar(self):
--> 194 t = tarfile.open(self.package_location, "r")
195 t.extractall(self.destination)
196
~/.pyenv/versions/3.7.4/lib/python3.7/tarfile.py in open(cls, name, mode, fileobj, bufsize, **kwargs)
1576 fileobj.seek(saved_pos)
1577 continue
-> 1578 raise ReadError("file could not be opened successfully")
1579
1580 elif ":" in mode:
ReadError: file could not be opened successfully
We should catch all kinds of HTTP or filesystem errors (FS getting full!) and workaround correspondingly (mostly by logging, returning failure, and not starting the agent).
- Lingua principale
- Python
- Stelle
- 77
- Fork
- 19
- Merge medio
- 1g 9h
- PR unite (30g)
- 5
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di scoutapp/scout_apm_python
-
botwork
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
scoutapp/scout_apm_python#841 ·
-
botwork
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
scoutapp/scout_apm_python#837 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
scoutapp/scout_apm_python#815 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
scoutapp/scout_apm_python#791 ·
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
scoutapp/scout_apm_python#789 ·
Tutte le issue di scoutapp/scout_apm_python
Issue simili
-
agent-ready documentation needs-triage
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
-
documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
instance instance add
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
searxng/searx-instances#939 · 1 commento ·
-
area-deployment area-integrations triage:bot-seen
Difficoltà 2/5 Mezza giornata Idoneità per principianti 86/100