feat: log runs jsonl before db removal#295
Conversation
|
I will look into .jsonl and your implementation tonight. I havent used it before so I can check if it makes sense then. Regarding the other features let me review and then answer those as well. Thanks for starting the implementation and you are of course free to do so! 😄 |
|
As always I reviewed the code but that all looks fine so I just added some ideas regarding the implementation. Let me know what you think of the suggestions! Regarding your questions
I think it can already be used in the server right? That part of the code should also pass through the same remove_run functions in the database and So once you call the server like |
Signed-off-by: HuntTheSun <HuntTheSun@users.noreply.github.com>
Addresses review feedback on the initial implementation: - Rename --log-removed-runs to --logremoved for consistency with other flags - Accept optional type selection: run, suite, test, keyword, all (default) Format: --logremoved [type1:type2:]path or --logremoved [types] - Introduce LogRemovedConfig NamedTuple to carry types + path cleanly - Extend logged data to suites, tests and keywords based on selected types - Default output path (robot_removed_runs_YYYYMMDD-HHMMSS.jsonl) when no path given Signed-off-by: HuntTheSun <HuntTheSun@users.noreply.github.com>
4292950 to
e37eb3f
Compare
|
Hi @timdegroot1996 , I realized I need to ask some clarifying questions, sorry. Ive pushed the changes to the inital draft in feat: rework --logremoved with type selection
By the way, the CI/CD robot-tests job "Initialize Browser library" kept on running for 20+ minutes. |
|
@timdegroot1996 Edit: I just realized my yml formatter changed the workflow quotation signs... sigh. Please tell me when I should fix it (if you wont drop the commit) , I will force push after you are okay with the current PR. |
|
@HuntTheSun hahaha stuff like that happens, very relatable 😄! As in regards to the costs, no worries. When you have a public github repo everything you do is free, even actions. So there won't be any costs for this.
Does that mean that will fix the pipeline again? If so then you can just fix it on your end and I will simply squah and merge that commit. No need to do any complex stuff, the history isn't that important anyway. By the way, are you done with this PR and can I start the review? It's status is still "Draft" so I want to make sure before I start. |
|
@timdegroot1996
So is it alright that there is no timestamp of deletion? Thank you so much for your work! |
Yeah no idea. Maybe the servers hosting the browser library binaries were having some issues. But the timeout is a great fix! Ah I missed the comments below.
I see you changed the status so I'll try to review it tonight! Maybe today if I have some spare time somewhere, I'll do my best. |
|
Hi @HuntTheSun again sorry for the delay on the review. I found a few small improvements for which I opened some comments. Apart from that it looks good to me. I will merge this once you have finished the final 3 comments. Regarding these comments:
|
|
Thank you for the review and don't worry about the delay :)
By the way, the "non-fix" timeout reared its ugly head, somehow the rf browser init job doesnt seem to like me :) I don't really know how to approach the flaky job timeout... |
|
Sorry I'm still struggling with the rfbrowser init workaround :/ Edit: Sorry if it bothers you, I just wanted to check why it wouldnt work so I made a bunch of commits changing the workflow, please drop them (or tell me to rebase once the rfbrowser stage is handled). |
|
Hi, I've given up for today with making the rfbrowser init play nice, I will just retry running it on friday, maybe somethings wrong with the VM or cache, unless you have a better idea or suggestion? |
|
Alright, it's friday and it's still timing out... thank you for your work and support :) |
|
@HuntTheSun I'm sorry for responding so late. I've started a new assignment so my last week was way too busy. Regarding the fixes, everything looks nice! So we can start looking toward merging this. Thanks for your extra work. Regarding the pipeline, I have no idea why this is happening. I know there are a few things happening:
If I can't get it to fix somewhere today or tomorrow I might just merge with a failing pipeline as I think it's already fine as is. But let's see if we can get this to work. |
|
@HuntTheSun welp that seemed to solve it 😅. Merging this PR once you set it to ready to merge, thanks again for the work! |
Initialized Browser Library step ran for 30+ minutes in https://github.com/MarketSquare/robotframework-dashboard/actions/runs/26509444417/job/78070141986?pr=295#logs Pushed to cancel and fix pipeline Feel free to drop commit if you want another way of handling this 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>
12be361 to
706cccc
Compare
|
Hi @timdegroot1996, thank you for fixing the ci/cd, I wouldn't have figured that out in a long time. I removed the commits documenting my heroic struggle and shameful defeat with the pipeline. |
|
@HuntTheSun you're very welcome and this was indeed a tough one. I got a bit lucky that updating the versions solved it right away... I'm going to remember the term "heroic struggle" haha 😄! |
Implementation of #282
Hi @timdegroot1996 , i hoped it's alright I moved forward with a draft implementation, I'm not sure how elegantly I handled arg passing and the custom-db tbh.
Questions
Is .jsonl an okay format?
I chose .jsonl because runs are removed one by one, so logging them one by one makes the most sense, which jsonl was invented to make easier. Batch collecting runs to log could cause inconsistencies if something is cancelled/exited during the execution. Also .jsonl is way easier to get the format right compared to .json when logging runs one by one.
Should I explore other formats or is jsonl alright?
Should I also implement feature in the server?
Thank you in advance!