Skip to content

Conversation

@TeddyCr
Copy link
Collaborator

@TeddyCr TeddyCr commented Oct 23, 2025

Describe your changes:

Fixes #20463

implement retention for test case results and profile data. The default retention period is 1440 days (or 4 years worth of data) -- configurable by users.

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

Improvement

  • I have added tests around the new logic.
  • For connector/ingestion changes: I updated the documentation.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements retention policies for test case results and profile data to manage data growth over time. The default retention period is set to 1440 days (approximately 4 years) for both data types, allowing users to configure these values as needed.

Key Changes:

  • Added retention configuration fields for test case results and profile data to the Data Retention Application schema
  • Implemented cleanup methods in the DataRetention class to delete old test case results and profile data based on retention periods
  • Added database migration scripts to set default retention values for existing installations

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
DataRetentionApplication.json (UI schema) Added testCaseResultsRetentionPeriod and profileDataRetentionPeriod fields with 1440-day defaults
DataRetentionApplication.md Added documentation sections for the new retention period configuration fields
dataRetentionConfiguration.json (spec) Added retention period fields to the application configuration schema definition
EntityProfileResourceTest.java Added test to verify profile data deletion by timestamp cutoff
TestCaseResourceTest.java Added test to verify test case results deletion by timestamp cutoff
DataRetentionApplication.json (service config) Updated default application configuration with new retention period values
EntityTimeSeriesDAO.java Added deleteTestCaseResultsBeforeCutOff method for time-series data cleanup
DataRetention.java Implemented cleanup logic for test case results and profile data with DAO references
postDataMigrationSQLScript.sql (postgres) Added migration to set default retention values for existing DataRetentionApplication
postDataMigrationSQLScript.sql (mysql) Added migration to set default retention values for existing DataRetentionApplication

manerow
manerow previously approved these changes Oct 23, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 23, 2025

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 63%
63.07% (46715/74069) 39.88% (21993/55142) 43.5% (7012/16121)

@sonarqubecloud
Copy link

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ingestion safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Retention Application] Cleanup test case results

2 participants