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

Old test results should have an ability to be discarded/deleted #57

Closed
Sedemicra opened this issue Jan 29, 2018 · 8 comments
Closed

Old test results should have an ability to be discarded/deleted #57

Sedemicra opened this issue Jan 29, 2018 · 8 comments
Assignees
Projects
Milestone

Comments

@Sedemicra
Copy link

I know it is possible to determine how many runs are displayed in the report html. Is it also possible to determine how many is kept in general?
I will be having many runs and over time the logs will grow massive, which I would like to avoid. I would like to be able to set a limit based on either a number of runs or time to completely delete all older logs. I haven't been able to find such possibility. Is there one? If not, would it be possible to have such feature implemented?
Thanks in advance!

@elv1s42 elv1s42 self-assigned this Jan 29, 2018
@elv1s42
Copy link
Member

elv1s42 commented Jan 29, 2018

Hi @axinom-raido !

You can set up the default amount of test runs and tests to be loaded by editing settings .json file:
https://github.com/GHPReporter/Ghpr.Core#about-settings-file

Deleting old test runs may be implemented later as part of Ghpr.Console functionality.

Thank you

@Sedemicra
Copy link
Author

Thank you for confirming my suspicions.
Being able to set the limit of how many testruns are preserved in total would be much appreciated feature as it would help to keep total logs in reasonable size without losing the latest results. I guess I need to look for an alternative until such option is available.
Thanks again for quick answer.

@elv1s42 elv1s42 changed the title Can old test results be discarded/deleted? Old test results should have an ability to be discarded/deleted Jun 13, 2018
@elv1s42 elv1s42 added this to Backlog in Ghpr Common via automation Jun 13, 2018
@elv1s42
Copy link
Member

elv1s42 commented Jun 13, 2018

Hi @axinom-raido !
Can you please let me know what exact data you want to able to delete?

The plan is to implement this feature as part of Ghpr.Console application and give users an ability to detele old runs (probably by passing date argument into console app and deleting all data older than the given date)

@elv1s42 elv1s42 moved this from Backlog to ToDo in Ghpr Common Jun 13, 2018
@Sedemicra
Copy link
Author

Hi, thanks for bringing this up.
Basically our interest would be to have the possibility to set both the number of reports to keep and time range for how long to keep them.
Ideally on each testrun when a report is generated there would be 2 checks:

  1. If a number of reports to keep is defined as x, only the last x reports are kept and any older ones are fully discarded.
  2. If the time range is set i.e. as y days every report older than y days is discarded.
    In case of both conditions are set we would apply the most strict one.

Since you asked what data exactly we would like to delete - the answer is everything older than the set parameters described above.
Ideally these restrictions could be defined in the same file where we define the number of reports displayed in html. This way the configurations would be in the same location making it relatively easy to change them and apply on next run.

@elv1s42
Copy link
Member

elv1s42 commented Jun 14, 2018

Hi @axinom-raido !
Thank you very much for detailed explanation. Agreed to create "clean up" job that can be run after a new report is generated.

@elv1s42 elv1s42 moved this from ToDo (Prioritised from the Backlog) to InProgress (Dev/QA work) in Ghpr Common Jun 14, 2018
@elv1s42 elv1s42 moved this from InProgress (Dev/QA) to ToDo (Prioritised) in Ghpr Common Jun 28, 2018
@elv1s42 elv1s42 moved this from ToDo (Prioritised) to InProgress (Dev/QA) in Ghpr Common Jul 6, 2018
@elv1s42 elv1s42 added this to the v0.9.2 milestone Aug 29, 2018
@elv1s42
Copy link
Member

elv1s42 commented Aug 29, 2018

Now old runs can be deleted using retention section from reporter .json settings:

 "retention": {
   "amount": 10,
   "till": "2018-06-29 10:00:00"
 }

This clean up job will run each time after the new report is generated.
amount - total runs that will be left, all other will be deleted.
till - all runs with finish date older than this value will be deleted too.

There is no way to restore the data, so please use these settings carefully.

@elv1s42 elv1s42 moved this from InProgress (Dev/QA) to Done (Aw. Release) in Ghpr Common Aug 29, 2018
@elv1s42 elv1s42 moved this from Done (Aw. Release) to Released (all work done and released) in Ghpr Common Sep 3, 2018
@elv1s42
Copy link
Member

elv1s42 commented Sep 3, 2018

Released in v0.9.2

@elv1s42 elv1s42 closed this as completed Sep 3, 2018
@Sedemicra
Copy link
Author

Thank you. Will try this out once I get time.

@elv1s42 elv1s42 moved this from Released (NuGet package) to Archive in Ghpr Common Sep 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Ghpr Common
  
Archive
Development

No branches or pull requests

2 participants