feat: task cleanup before end time in days#5422
feat: task cleanup before end time in days#5422klopfdreh wants to merge 8 commits intospring-attic:mainfrom
Conversation
|
@klopfdreh thanks again for another contribution! Do you mind rebasing and merging as there are currently conflicts and it is a bit difficult to see what has changed in main vs. in this PR (I did take a pass at that but realized it may be better if you could do that). I will keep an eye out and re-review once that is done. Thanks. |
|
@onobc - okidoki - I am going to do so, tomorrow! 👍 |
|
@onobc - well Edit: I also merged: spring-attic/spring-cloud-dataflow-ui#1940 but @oodamien already mentioned that the UI needs to be reworked a bit. |
|
Hi @klopfdreh , Sorry for the back and forth. I will make this my top priority tomorrow am (or whenever you get the updates in). Thanks. |
aa5dfb8 to
7c25d4f
Compare
|
Ah ok. I created a single commit with all changes and force pushed it to this PR. Just to ensure to have a backup: https://github.com/klopfdreh/spring-cloud-dataflow/tree/feature/cleanupEndTimeBackup |
There was a problem hiding this comment.
@klopfdreh thanks for the rebase+squash - it was super helpful. I have left a handful of comments to address.
Also, I noticed you added no tests. Then I quickly realized you added no tests because there are no tests in this newly added module. Since they are not in place now I will not trouble w/ you that burden - we will create the tests and include these new APIs in those tests.
...re/src/main/java/org/springframework/cloud/dataflow/server/service/TaskExecutionService.java
Outdated
Show resolved
Hide resolved
...re/src/main/java/org/springframework/cloud/dataflow/server/service/TaskExecutionService.java
Outdated
Show resolved
Hide resolved
...re/src/main/java/org/springframework/cloud/dataflow/server/service/TaskExecutionService.java
Outdated
Show resolved
Hide resolved
...-core/src/main/java/org/springframework/cloud/dataflow/server/service/TaskDeleteService.java
Outdated
Show resolved
Hide resolved
...ringframework/cloud/dataflow/aggregate/task/impl/AggregateDataFlowTaskExecutionQueryDao.java
Outdated
Show resolved
Hide resolved
...ringframework/cloud/dataflow/aggregate/task/impl/AggregateDataFlowTaskExecutionQueryDao.java
Show resolved
Hide resolved
...ringframework/cloud/dataflow/aggregate/task/impl/AggregateDataFlowTaskExecutionQueryDao.java
Outdated
Show resolved
Hide resolved
...in/java/org/springframework/cloud/dataflow/server/service/impl/DefaultTaskDeleteService.java
Show resolved
Hide resolved
...java/org/springframework/cloud/dataflow/server/service/impl/DefaultTaskExecutionService.java
Outdated
Show resolved
Hide resolved
...k/src/main/java/org/springframework/cloud/dataflow/aggregate/task/AggregateTaskExplorer.java
Outdated
Show resolved
Hide resolved
|
Thanks for the updates @klopfdreh . I replied to one of your comments but it is late (here) and I will continue the review in the morning. |
Thanks a lot for helping me out and create tests. I have only a limited time to file in changes. |
...ringframework/cloud/dataflow/aggregate/task/impl/AggregateDataFlowTaskExecutionQueryDao.java
Outdated
Show resolved
Hide resolved
|
|
||
| @Override | ||
| public Integer getAllTaskExecutionsCount(boolean onlyCompleted, String taskName, Integer days) { | ||
| if (days != null) { |
There was a problem hiding this comment.
@klopfdreh thanks for the updates to the cleanup path - looks great. I want to get this merged but I think the "what to do w/ END_TIME null when user specifies onlyCompleted='false'" still applies to the executions count path as well.
I totally understand you have limited time - thank you for. your patience while we go through our back/forth :) .
Let's figure out what we want to do here and I am more than willing to make those changes and we can co-author this - unless you have the cycles to make another update.
Case 1
If includeTasksEndedMinDaysAgo is specified then that implies onlyCompleted=true - it has to be in order to compare the dates.
- the new API
getAllTaskExecutionsCount(boolean onlyCompleted, String taskName, Integer includeTasksEndedMinDaysAgo)can have itsonlyCompletedparam removed and it would solve this case
Case 2
If includeTasksEndedMinDaysAgo is NOT specified then onlyCompleted=true|false makes sense.
- the already existing API
getAllTaskExecutionsCount(boolean onlyCompleted, String taskName)solves this one
Wdyt?
There was a problem hiding this comment.
You are completely right with the scenario if the END_TIME is null the onlyCompleted=false should still apply for counts! Thanks your a lot for the time to review and for the hints!
Sadly I am busy by solving issues at our integration and I don’t know when I am able to revisit to make changes again.
I would appreciate it very much if you could assist me a bit with those changes.
As this feature very important - I guess also for a lot of users of SCDF - it would be very nice to see it integrated soon as your time allows it.
Thank you a lot for the help and the code reviews and of course for the assistance!
There was a problem hiding this comment.
Thanks your a lot for the time to review and for the hints!
You are more than welcome - anytime.
Sadly I am busy by solving issues at our integration and I don’t know when I am able to revisit to make changes again.
I would appreciate it very much if you could assist me a bit with those changes.
No worries @klopfdreh . I will get it updated and integrated this weekend. ☮️ and thanks again.
|
Verifying my commits on top of @klopfdreh in #5453. If that passes the CI PR then we will merge it and close this one out a super ceded by it. |
* Add num days to task cleanup. See #5422 Co-authored-by: Tobias Soloschenko <tsoloschenko@apache.org>
|
Superceded by. #5453 |
Improvement:
Fix:
Fixes: #5423 / #5442
Needs to be integrated with: spring-attic/spring-cloud-dataflow-ui#1940