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

Additional job check #37

Merged
merged 8 commits into from
Dec 5, 2023
Merged

Additional job check #37

merged 8 commits into from
Dec 5, 2023

Conversation

maronuu
Copy link
Collaborator

@maronuu maronuu commented Nov 21, 2023

Add status checking of submitted child job, in order to return earlier when the job failed.

Also updated unit tests.

kannon/master.py Outdated Show resolved Hide resolved
@maronuu maronuu marked this pull request as ready for review November 21, 2023 08:17
@maronuu maronuu changed the title Feature/additional job check Additional job check Nov 21, 2023
@maronuu maronuu requested a review from Hi-king November 21, 2023 10:16
kannon/master.py Outdated
if task.make_unique_id() in launched_task_ids:
if task.make_unique_id() in self.task_id_to_job_name:
# check if task is still running on child job
assert self._check_child_task_status(task), f"Child task {self._gen_task_info(task)} failed."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to keep the master node running while the child nodes are running. If we add ownerReference to child node, the running child nodes will be killed by Kubernetes. #38

What do you think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kitagry
Sorry for late reply!

You mean we should not kill the master node while one or more child nodes are running, right?

In the current implementation, the master node fails right after finding a child node failed, even when other child nodes are still living.
And, in my opinion, when it finds out that a child node fails, it means a failure of the whole pipeline, so I would prefer the current one.

However, as you pointed out, there might be a need for the strategy where we do not stop the master node and all living child nodes keep running even other child nodes fail.
So, I'll create an issue about it, and prefer keeping the current implementation for now.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maronuu @kitagry I agree with @mamo3gr

I think it's ok to kill the master (and other children with !38 ) for now.

I'm not sure how it's problematic to kill them because they may have gokart caches and easy to retry.

Let's add other option if we confirm any problem.

kannon/master.py Outdated
if task.make_unique_id() in launched_task_ids:
if task.make_unique_id() in self.task_id_to_job_name:
# check if task is still running on child job
assert self._check_child_task_status(task), f"Child task {self._gen_task_info(task)} failed."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assert will not be called, because this method raise error if job is not succeed.

Copy link
Collaborator Author

@maronuu maronuu Dec 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, now fixed!

@maronuu maronuu requested a review from kitagry December 4, 2023 06:05
@maronuu maronuu merged commit 588e87f into main Dec 5, 2023
5 checks passed
@kitagry kitagry deleted the feature/additional_job_check branch December 5, 2023 14:22
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.

3 participants