Tracing temp directories are never cleaned up when keywords are called from Python outside a Robot Framework run
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Tranquilo
- Stack tecnológico
- playwright, python
- Área
- testing-qa
Línea de trabajo
Empieza en Browser/keywords/playwright_state.py alrededor de la línea 911 y sigue close_context() hasta el vaciado de su trace. Compara ese recorrido con la limpieza en Browser/browser.py:838-848, que solo se ejecuta desde el listener hook _start_suite. Reproduce el ejemplo solo de Python y confirma que cerrar un contexto con tracing no deja ningún directorio bajo browser/traces/temp//.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Tracing writes its working files to browser/traces/temp/<uuid>/ (Browser/keywords/playwright_state.py:911). Those are cleaned up from the _start_suite listener hook (Browser/browser.py:838-848), which only fires during a Robot Framework run. When keywords are called directly from Python the hook never runs, so the temp directories accumulate and are never removed.
Reproduce
from Browser import Browser
browser = Browser()
browser.new_browser("webkit", headless=True)
browser.new_context(tracing=True)
browser.new_page("https://robotframework-browser.org")
browser.close_context()
browser.close_browser("ALL")
Observed afterwards, left in place:
browser/traces/temp/<uuid>/
<name>.trace
<name>.network
resources/*.jpeg
The trace zip itself is produced correctly by close_context(); it is only the temp working directory that is left behind, once per traced context.
Note that with the default outputdir these land inside the installed package rather than the caller's working directory — that part is a separate issue about the relative default outputdir, and it is filed on its own. This report is about the cleanup never happening at all, which remains true even when outputdir is absolute.
Suggested fix
Remove the temp directory when the trace is flushed in close_context(), rather than relying on a listener hook that only exists during a Robot Framework run.
Environment
Browser 20.3.0, Robot Framework 7.4.1, Python 3.14.7, macOS, webkit.
- Lenguaje dominante
- Python
- Estrellas
- 662
- Forks
- 149
- Merge medio
- 6 h 13 min
- PR fusionados (30 d)
- 121
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de MarketSquare/robotframework-browser
-
priority: high
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
MarketSquare/robotframework-browser#5306 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
MarketSquare/robotframework-browser#5503 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 78/100
MarketSquare/robotframework-browser#5502 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 54/100
MarketSquare/robotframework-browser#5501 ·
Los mantenedores suelen responder en 1 día
-
Accept a list of credentials in `httpCredentials` of `New Context` and `New Persistent Context`Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 76/100
MarketSquare/robotframework-browser#5500 ·
Los mantenedores suelen responder en 1 día
Todos los issues de MarketSquare/robotframework-browser
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
igormcsouza/tether#278 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 91/100
aws-samples/sample-per-model-bedrock#803 ·
Los mantenedores suelen responder en 1 día
-
documentation p1
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
huggingface/accelerate#4511 ·
Los mantenedores suelen responder en 1 día
-
follow-up
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día