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

Run job_config handlers in new tasks #2637

Conversation

majamassarini
Copy link
Member

@majamassarini majamassarini commented Nov 12, 2024

There is a correlation between this new exception in sentry
and some hard time limit errors, look at the graphs.

In splunk, the above celery task id, had more than 25,528 events associated and ran for a really long time.

If we run sequentially all the handlers for all the job_configs, for every entry in the db that needs babysitting we can reach the hard time limit for the task.
If we fail to babysit the "entries in the db", the tasks will sum up leading to more "hard time limit" exceptions.

@majamassarini majamassarini requested a review from a team as a code owner November 12, 2024 14:47
Copy link
Contributor

@majamassarini majamassarini force-pushed the parallelize-work-for-babysit-tasks branch 2 times, most recently from 0038fd1 to 6d41c24 Compare November 13, 2024 11:21
Copy link
Contributor

Copy link
Contributor

@majamassarini majamassarini force-pushed the parallelize-work-for-babysit-tasks branch from 6bc5293 to fc19acd Compare November 13, 2024 11:30
Copy link
Contributor

@majamassarini majamassarini force-pushed the parallelize-work-for-babysit-tasks branch from f222051 to fe2d4f1 Compare November 13, 2024 11:36
Copy link
Contributor

@majamassarini majamassarini force-pushed the parallelize-work-for-babysit-tasks branch from 90806f8 to 507bb5e Compare November 13, 2024 12:41
Copy link
Contributor

Copy link
Member

@lbarcziova lbarcziova left a comment

Choose a reason for hiding this comment

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

this is a great improvement, thanks Maja!

@@ -55,6 +57,13 @@
logger = logging.getLogger(__name__)


def celery_run_async(signatures: list[Signature]) -> None:
logger.debug("Signatures are going to be sent to Celery (from update_copr_build_state).")
Copy link
Member

Choose a reason for hiding this comment

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

this can be called also from update_testing_farm_run, so the log should be adjusted

If we run sequentially all the handlers for all
the job_configs, for every entry in the db
that needs babysitting we can reach
the hard time limit for the task.

I did not make the vm image build handlers
running in parallel, because now the code
needs the tasks output.

Co-authored-by: Nikola Forró <[email protected]>
@majamassarini majamassarini force-pushed the parallelize-work-for-babysit-tasks branch from 507bb5e to b24c82c Compare November 13, 2024 13:16
Copy link
Contributor

@majamassarini majamassarini added the mergeit When set, zuul wil gate and merge the PR. label Nov 13, 2024
Copy link
Contributor

Build succeeded (gate pipeline).
https://softwarefactory-project.io/zuul/t/packit-service/buildset/cf0aa521a72441fdbf91899c4c56c326

✔️ pre-commit SUCCESS in 2m 07s

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 2004555 into packit:main Nov 13, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mergeit When set, zuul wil gate and merge the PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants