Skip to content

feat: add age based removal of runs#288

Open
HuntTheSun wants to merge 11 commits into
MarketSquare:mainfrom
HuntTheSun:timerange_deletion
Open

feat: add age based removal of runs#288
HuntTheSun wants to merge 11 commits into
MarketSquare:mainfrom
HuntTheSun:timerange_deletion

Conversation

@HuntTheSun
Copy link
Copy Markdown
Contributor

@HuntTheSun HuntTheSun commented May 13, 2026

Implementation of #280

I switched it from time= to age= as its more specific, I can gladly switch it to sth else if you want.

The tests pass, except the help-text tests, I'm having a weird issue with the argparse output doubling brackets,
I'm hoping they will pass in the pipeline :)

Edit: I realized I hadn't included the help.txt changes, oops. The issue with the helptext brackets persists for me though.
Is the helptext double bracket problem somehow just on my end or did you run into this also?

If you have any wishes on changes please let me know

Thanks in advance!

@HuntTheSun HuntTheSun force-pushed the timerange_deletion branch from fdeba03 to f4d28b7 Compare May 13, 2026 10:05
@HuntTheSun
Copy link
Copy Markdown
Contributor Author

HuntTheSun commented May 15, 2026

@timdegroot1996 To be honest im a bit stumped by the help case failures due to the double [] output in the argparse help print.
I know we had sth like this last year and I think the root cause was a argparse lib version mismatch, but I'm not sure.
Do you know what's the issue/fix here by any chance?
Here is the log.html

@timdegroot1996
Copy link
Copy Markdown
Collaborator

@HuntTheSun I think the difference is literally an extra newline at the end of the comparison file haha. I put both of them into vscode and replaced the regex [[] with [, and []] with ], and then this was the only difference:

image

I will look at the PR today as well but that should be an easy fix 👍

Comment thread robotframework_dashboard/arguments.py
Comment thread robotframework_dashboard/database.py
@timdegroot1996
Copy link
Copy Markdown
Collaborator

1 last comment on the PR, the code looks good otherwise. You didn't implement the age parameter in the server.py or in the admin.html when the server is running. If you want I can implement that, otherwise I think it would be good to add that in this PR as well.

@timdegroot1996 timdegroot1996 linked an issue May 16, 2026 that may be closed by this pull request
@HuntTheSun
Copy link
Copy Markdown
Contributor Author

@timdegroot1996

Thank you for looking it over!
I will implement it and get back to you.

@HuntTheSun HuntTheSun force-pushed the timerange_deletion branch from 91be6cc to fb03ed0 Compare May 20, 2026 07:30
HuntTheSun and others added 6 commits May 20, 2026 09:33
Signed-off-by: HuntTheSun <HuntTheSun@users.noreply.github.com>
Signed-off-by: HuntTheSun <HuntTheSun@users.noreply.github.com>
Signed-off-by: HuntTheSun <HuntTheSun@users.noreply.github.com>
Signed-off-by: HuntTheSun <HuntTheSun@users.noreply.github.com>
Signed-off-by: HuntTheSun <HuntTheSun@users.noreply.github.com>
Signed-off-by: HuntTheSun <HuntTheSun@users.noreply.github.com>
@HuntTheSun HuntTheSun force-pushed the timerange_deletion branch from fb03ed0 to 71f0d36 Compare May 20, 2026 07:33
Signed-off-by: HuntTheSun <HuntTheSun@users.noreply.github.com>
Signed-off-by: HuntTheSun <HuntTheSun@users.noreply.github.com>
@HuntTheSun
Copy link
Copy Markdown
Contributor Author

@timdegroot1996

I implemented the server functionality you mentioned, I hope its alright, I am unfamiliar with the server feature.

I'm still struggling with the help.txt output, I can't quite understand why the double [[]] keep popping up.
Why are they in the help.txt if the --help flag only prints single [] ?
Is that a DOS vs unix encoding issue or a library or terminal discrepancy?

How do you handle this when updating the arguments.py?
I can't just do python -m robotdashboard.main --help > help.txt since my terminal output doesnt match the test help.txt format (no double brackets, different arg format)

@timdegroot1996
Copy link
Copy Markdown
Collaborator

@HuntTheSun I will review the implementation tonight!

Regarding the help, the [[] is a way to escape the string in the Should Match keyword. This is seen as a regex or something similar and if you dont use the brackets around it, it is mishandled.

What I usually do is just copy the one that isnt matching from the failing log file, so the actual output, and then only manually fix the brackets to be [[] instead of [ and []] for ]. It is kind of tedious but it helps to stay sharp about what has changed and if that is a logical change 😅

@timdegroot1996
Copy link
Copy Markdown
Collaborator

I looked over the code and this looks clear and well implemented to me. The server I would have to play around with to be 100% sure, but I assume you tested it and it behaved the same as the CLI when testing. If that's the case once we resolve the test this can be merged!

Signed-off-by: HuntTheSun <HuntTheSun@users.noreply.github.com>
Signed-off-by: HuntTheSun <HuntTheSun@users.noreply.github.com>
Signed-off-by: HuntTheSun <HuntTheSun@users.noreply.github.com>
@timdegroot1996
Copy link
Copy Markdown
Collaborator

@HuntTheSun let me know when this is finished so I can merge it! I will probably do that this weekend when I make a new release with some additional features.

@HuntTheSun
Copy link
Copy Markdown
Contributor Author

What I usually do is just copy the one that isnt matching from the failing log file, so the actual output, and then only manually fix the brackets to be [[] instead of [ and []] for ]. It is kind of tedious but it helps to stay sharp about what has changed and if that is a logical change 😅

Thank you, now I get it. I was also having some issues because my local python was newer than the one in the container, changing long/short flag print behavior.

I looked over the code and this looks clear and well implemented to me. The server I would have to play around with to be 100% sure, but I assume you tested it and it behaved the same as the CLI when testing. If that's the case once we resolve the test this can be merged!

I did test the admin ui behavior, its the same as cli.
By the way the Test "Add Filter Profile With Date Filters" was flaky, I haven't yet gotten to checking why, are you aware of flaky tests (or maybe an test execution issue generally?)
CI Job in question
{'fromDate': '', 'fromTime': '00:25'} != {'fromDate': '2025-03-13', 'fromTime': '00:25'}

let me know when this is finished so I can merge it! I will probably do that this weekend when I make a new release with some additional features.

I think its ready to merge, if you want to squash it. If I should squash the commits please let me know, I will squash and force push

@timdegroot1996
Copy link
Copy Markdown
Collaborator

Thank you, now I get it. I was also having some issues because my local python was newer than the one in the container, changing long/short flag print behavior.

Glad you resolved it!

By the way the Test "Add Filter Profile With Date Filters" was flaky, I haven't yet gotten to checking why, are you aware of flaky tests (or maybe an test execution issue generally

I haven't encountered this before, but if it remains an issue we will have to investigate and improve this test!

I think its ready to merge, if you want to squash it. If I should squash the commits please let me know, I will squash and force push

I will do that this weekend, thanks for the updates and fixes of the tests!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Remove runs from db with time range

2 participants