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

fix: delayed detection of job ending for crons #69

Merged
merged 6 commits into from
Dec 5, 2023

Conversation

Jiahui-Zhang-20
Copy link
Contributor

Previously:

The job informer relied on the number of successful pods to be correct or a failed pod to be present in the job object to checkin at the end of a job. This did not send the event within the expected time durations.

Moreover, whether a checkin is the beginning or end of a job was determined by the type of event handler, which was incorrect, since a job did not necessarily get deleted when it was either completed or failed.

Now:

The function triggered by the event handler looks at the number of active pods, successful pods, and failed pods to determine whether the job just begun, is still in progress, or have ended.

Also, the status of a job after ending is determined by the Conditions slice in the job status struct.

@Jiahui-Zhang-20 Jiahui-Zhang-20 changed the title fix: fix delayed detection of job ending for crons fix: delayed detection of job ending for crons Nov 30, 2023
informer_crons.go Outdated Show resolved Hide resolved
crons.go Outdated Show resolved Hide resolved
crons.go Show resolved Hide resolved
crons.go Show resolved Hide resolved
@Jiahui-Zhang-20 Jiahui-Zhang-20 merged commit 00ba82f into master Dec 5, 2023
3 checks passed
@Jiahui-Zhang-20 Jiahui-Zhang-20 deleted the jz-fix-crons-monitor branch December 5, 2023 19:44
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.

2 participants