cryostatio / cryostatio/cryostat
[Question] Should Target Analysis trim previous archived snapshots?
- Dominant language
- Java
- Stars
- 57
- Forks
- 17
- Avg merge
- 15h 39m
- Merged PRs (30d)
- 42
Description
### Describe the feature


Since https://github.com/cryostatio/cryostat/pull/859 / https://github.com/cryostatio/cryostat-web/pull/1589 , analysis of individual Active Recordings is no longer supported via the UI (but remains available in the API). Instead, there is a new pipelined operation for "Target Analysis" which:
1. Requires at least one other Active Recording is present in the Target
2. Creates a Snapshot recording at the moment of request, with the `autoanalyze=true` label
3. Immediately archives the Snapshot, then deletes the Active Snapshot
4. The `autoanalyze=true` label on the archived recording triggers batch processing of the recording automated analysis report, and the result is also cached
5. The UI retrieves the cached result and renders it
If the user repeatedly requests analyses of targets, then archived Snapshots will continue to accumulate in storage, along with their cached analysis report documents. The latest result from that target will also be retained in the AnalysisReportAggregator even if the corresponding archived recording is deleted.
So, should the target analysis operation also trim previous archived Snapshots that were generated by the same operation, to prevent cluttering the storage? The historical data and analysis results would be dropped, which might be unexpected.
Or perhaps these recordings should have another unique label applied to them like `source=target-analysis` which can be used to select them together for bulk deletion in the UI while avoiding accidentally selecting other recordings that were captured for other reasons? This way the data is retained so long as the user wants it, and they can also easily purge the data when it is not wanted. However, this does also require the user to perform this operation on a per-Target basis, which would be cumbersome. Maybe there could be some additional UI widget somewhere to do an archives-wide purge by label?
### Anything other information?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.