[FAL-2076] use high priority queue for celery heartbeat check - #28034
[FAL-2076] use high priority queue for celery heartbeat check#28034pomegranited wants to merge 5 commits into
Conversation
|
Thanks for the pull request, @pomegranited! I've created OSPR-5883 to keep track of it in JIRA, where we prioritize reviews. Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
gabor-boros
left a comment
There was a problem hiding this comment.
👍 🎉
- I tested what's in the test instructions
- I read through the code
I checked for accessibility issuesIncludes documentation
|
@pomegranited Thank you for your contribution. Is this good for our review? |
|
@natabene Yep, ready for edx/community review. Thanks @gabor-boros ! Pinging @felipemontoya @ziafazal @bradenmacdonald for a core committer review, and @arbrandes FYI since we'll need this in lilac too. |
|
Hey @pomegranited this is great. I did not know about the In this case would it help to use |
Reverts previous fix. Makes HIGH_PRIORITY_QUEUE a derived setting, which allows HEARTBEAT_CELERY_ROUTING_KEY to use the correct config variant default. Adds test.
|
@felipemontoya Oo I don't know about I've done that with 0940b02, but since it adds a function, also had to add a test (and update the test settings). Will see whether that affects anything else? FYI, we generally override HEARTBEAT_EXTENDED_CHECKS:
- openedx.core.djangoapps.heartbeat.default_checks.check_celery
- openedx.core.djangoapps.django_comment_common.comment_client.utils.check_forum_heartbeat |
|
Your PR has finished running tests. There were no failures. |
|
@pomegranited, ACK! Scheduling a task to look into it once its merged. |
|
@felipemontoya I've applied your suggestions and added the necessary tests, and my sandbox is running with the latest code and working as expected. Are you able to review and merge this fix as core committer? |
|
Hey @pomegranited, I was queuing this until I could load it in a environment running master. However I have not had the time to do it. In terms of the approach and a static code analysis it looks correct to me and as a Core Commiter I would approve it. |
|
Thanks @felipemontoya ! For our scheduling, do you have an idea of when you'll be able to test this? |
|
I'm very sorry @pomegranited, I don't know when I will be able to review. As I said, from a static read I am good with the approach. Perhaps a different CC can take this PR from here. |
|
No worries @felipemontoya , thanks for letting me know! |
|
@pomegranited I think this may already be fixed by @feanil in #28066 - can you please check? If not, I can take this review. |
|
@bradenmacdonald Yep, the master periodic build heartbeat is working fine now, so https://github.com/edx/edx-platform/pull/28066 addressed this. I should have checked for open PRs before doing the rework here, and saved some duplicated effort! |
|
@pomegranited Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future. |
Description
This change fixes the default celery queue used for heartbeat checks in production, setting the default to the high-priority queue for LMS/Studio, respectively.
Currently, the
HEARTBEAT_CELERY_ROUTING_KEYdefaults to theHIGH_PRIORITY_QUEUEset inlms.env.common, which is a generic'edx.core.high'queue name.Unfortunately, since both the LMS and Studio
env.productionsettings files overrideHIGH_PRIORITY_QUEUEto be'edx.lms.core.high'(andedx.cms.core.highrespectively) before defining the list ofCELERY_QUEUES, the'edx.core.high'queue never gets created, and so the celery heartbeat check fails.This change marks
HEARTBEAT_CELERY_ROUTING_KEYas aderivedsetting, so that it can be lazily defaulted to the service variant'sHIGH_PRIORITY_QUEUE.Native default master settings (without this change)
Native default master settings (with this change)
Supporting information
This issue was introduced by https://github.com/edx/edx-platform/pull/23731 (edx@73fd2ed) and is present in
koa.master,lilac.master, andmaster.Testing instructions
Sandbox URL
Extra settings:
Deadline
No deadline on our side, but it could be affecting many people, so we'd like to get it merged ASAP.
Other information
HEARTBEAT_CELERY_ROUTING_KEY? courses.edx.org fails the celery extended heartbeat check.