furiko-io / furiko

Kubernetes cron and batch job platform
https://furiko.io
Apache License 2.0
483 stars 21 forks source link

feat(jobconfig): Add LastExecuted to status #113

Closed irvinlim closed 1 year ago

irvinlim commented 1 year ago

Adds .status.lastExecuted which represents the latest execution time of a JobConfig.

If the Job is in a Queued state, it is not considered to have executed, so the execution time actually refers to the startTime for a Job. The lastExecuted value thus is the latest out of all startTimes.


Example test case, using a JobConfig with 3 adhoc Jobs:

image

codecov[bot] commented 1 year ago

Codecov Report

Base: 64.22% // Head: 64.32% // Increases project coverage by +0.10% :tada:

Coverage data is based on head (50161ed) compared to base (8621be9). Patch coverage: 96.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #113 +/- ## ========================================== + Coverage 64.22% 64.32% +0.10% ========================================== Files 207 207 Lines 11079 11103 +24 ========================================== + Hits 7115 7142 +27 + Misses 3574 3572 -2 + Partials 390 389 -1 ``` | [Impacted Files](https://codecov.io/gh/furiko-io/furiko/pull/113?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=furiko-io) | Coverage Δ | | |---|---|---| | [apis/execution/v1alpha1/jobconfig\_types.go](https://codecov.io/gh/furiko-io/furiko/pull/113?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=furiko-io#diff-YXBpcy9leGVjdXRpb24vdjFhbHBoYTEvam9iY29uZmlnX3R5cGVzLmdv) | `100.00% <ø> (ø)` | | | [pkg/runtime/testing/reconciler.go](https://codecov.io/gh/furiko-io/furiko/pull/113?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=furiko-io#diff-cGtnL3J1bnRpbWUvdGVzdGluZy9yZWNvbmNpbGVyLmdv) | `75.91% <85.71%> (+3.39%)` | :arrow_up: | | [apis/execution/v1alpha1/zz\_generated.deepcopy.go](https://codecov.io/gh/furiko-io/furiko/pull/113?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=furiko-io#diff-YXBpcy9leGVjdXRpb24vdjFhbHBoYTEvenpfZ2VuZXJhdGVkLmRlZXBjb3B5Lmdv) | `59.88% <100.00%> (+0.23%)` | :arrow_up: | | [...tion/controllers/jobconfigcontroller/reconciler.go](https://codecov.io/gh/furiko-io/furiko/pull/113?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=furiko-io#diff-cGtnL2V4ZWN1dGlvbi9jb250cm9sbGVycy9qb2Jjb25maWdjb250cm9sbGVyL3JlY29uY2lsZXIuZ28=) | `86.32% <100.00%> (+0.35%)` | :arrow_up: | | [pkg/execution/util/jobconfig/job\_utils.go](https://codecov.io/gh/furiko-io/furiko/pull/113?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=furiko-io#diff-cGtnL2V4ZWN1dGlvbi91dGlsL2pvYmNvbmZpZy9qb2JfdXRpbHMuZ28=) | `80.00% <100.00%> (+3.43%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=furiko-io). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=furiko-io)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.