Implement Decaying Runs in CodeChecker

Abierto
#4,367 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 8 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
15/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python

Línea de trabajo

The issue names no specific files or tests. Start from the existing storage command and the server's run-deletion path, then look at how run records are stored in the database. Done would mean a lifetime can be set at storage time, expired runs are removed by a background job, and the lifetime is visible in the CLI and web UI. Agree the design with maintainers first, since the work spans schema, server, CLI and UI.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

CLI :computer: discussion :bulb: documentation :book: enhancement :star2: new feature :+1: server :desktop_computer: test :ballot_box_with_check: web :earth_africa:

Is your feature request related to a problem? Please describe.

There is a problem with CodeChecker runs accumulating and consuming excessive space on the server. For example, when using a Jenkins job to analyze a set of OpenSource projects, every build creates a new run in the CodeChecker server. These runs are not automatically cleaned up, leading to server storage issues over time.

Describe the solution you would like

Implement a "decaying runs" feature in CodeChecker with the following characteristics:

  1. Allow users to specify a lifetime for runs during the storage phase.
  2. Implement a backend mechanism that periodically cleans up runs older than their specified lifetime.
  3. Maintain backward compatibility by keeping runs indefinitely by default.
  4. Provide ways to view and modify the remaining time until deletion for runs in both the CLI and CodeChecker web UI.

Describe alternatives you have considered

  • Manual deletion of old runs: This requires constant monitoring and manual intervention, which is not scalable.
  • Fixed deletion schedule: This doesn't allow for flexibility in retention times for different types of runs.

Additional context

This feature would greatly improve the management of storage resources for CodeChecker servers, especially in CI/CD environments where new runs are frequently created.

Implementation details to consider:
  • Add a new parameter to the storage command to specify run lifetime.
  • Implement a background job in the server to check and delete expired runs.
  • Extend the database schema to include lifetime and expiration information for runs.
  • Update the CLI and web UI to display and allow modification of run lifetimes.
  • Ensure proper documentation of the new feature in the CodeChecker documentation.
  • Make sure to test the backend, the interaction with the web app and the CLI as well.
Lenguaje dominante
Python
Estrellas
2.6k
Forks
494
Merge medio
9 d 2 h
PR fusionados (30 d)
23

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Ericsson/codechecker

Todos los issues de Ericsson/codechecker

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.