Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Decaying Runs in CodeChecker #4367

Open
gamesh411 opened this issue Oct 17, 2024 · 0 comments
Open

Implement Decaying Runs in CodeChecker #4367

gamesh411 opened this issue Oct 17, 2024 · 0 comments
Labels
CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands documentation 📖 Changes to documentation. enhancement 🌟 new feature 👍 New feature request server 🖥️ test ☑️ Adding or refactoring tests web 🌍 Related to the web app

Comments

@gamesh411
Copy link
Collaborator

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.
@gamesh411 gamesh411 added enhancement 🌟 CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands test ☑️ Adding or refactoring tests documentation 📖 Changes to documentation. server 🖥️ web 🌍 Related to the web app new feature 👍 New feature request labels Oct 17, 2024
@gamesh411 gamesh411 added this to the release 6.26.0 milestone Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands documentation 📖 Changes to documentation. enhancement 🌟 new feature 👍 New feature request server 🖥️ test ☑️ Adding or refactoring tests web 🌍 Related to the web app
Projects
None yet
Development

No branches or pull requests

1 participant