[SE-4860] make SINGLE_BEAT_IDENTIFIER configurable - #6586
Conversation
|
Thanks for the pull request, @gabor-boros! I've created OSPR-6145 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 as you can:
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 Thank you for your contribution. Please let me know once this is ready for our review. |
af33d26 to
b62c528
Compare
pomegranited
left a comment
There was a problem hiding this comment.
@gabor-boros This change seems to do more than just make SINGLE_BEAT_IDENTIFIER configurable.. Have asked for clarity, and suggested some changes.
pomegranited
left a comment
There was a problem hiding this comment.
👍
- I tested this on the PR sandbox.
- I read through the code
-
I checked for accessibility issuesN/A -
Includes documentationN/A -- as per the PR template checklist, this PR does not add any defaults which need to be overridden, so no CHANGELOG entry is necessary. -
I made sure any change in configuration variables is reflected in the correspondingN/A
client'sconfiguration-securerepository.
@jmbowman Can you confirm that edX is not using celerybeat and so this change should not affect you guys?
I'll merge this as core commiter in 2 days if there are no objections on your side. CC @natabene
Agrendalath
left a comment
There was a problem hiding this comment.
👍
- I tested this: I've checked heartbeats and periodic tasks in the sandbox
- I read through the code
- I checked for accessibility issues: n/a
- Includes documentation: no
⚠️ - I made sure any change in configuration variables is reflected in the corresponding client's
configuration-securerepository: n/a
Signed-off-by: Gabor Boros <gabor.brs@gmail.com>
b62c528 to
f7a5fc9
Compare
Signed-off-by: Gabor Boros <gabor.brs@gmail.com>
|
@Agrendalath I believe all the requested changes are addressed. The app server is provisioning with the new changes. |
Signed-off-by: Gabor Boros <gabor.brs@gmail.com>
e71f18b to
a8fd3f8
Compare
|
@gabor-boros 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
…ed#6586) * feat: make SINGLE_BEAT_IDENTIFIER configurable * fix: celery 5.0+ does not support --app as a worker flag * refactor: remove duplicated app declaration * fix: --config flag is global since Celery 5.0+ * fix: replace single-beat with an updated version * fix: add missing comma * fix: replace maxtasksperchild worker flag * refactor: address PR review comments Signed-off-by: Gabor Boros <gabor.brs@gmail.com> * refactor: remove celery<5 adjustments Signed-off-by: Gabor Boros <gabor.brs@gmail.com> * fix: set single-beat autorestart Signed-off-by: Gabor Boros <gabor.brs@gmail.com>
…ed#6586) * feat: make SINGLE_BEAT_IDENTIFIER configurable * fix: celery 5.0+ does not support --app as a worker flag * refactor: remove duplicated app declaration * fix: --config flag is global since Celery 5.0+ * fix: replace single-beat with an updated version * fix: add missing comma * fix: replace maxtasksperchild worker flag * refactor: address PR review comments Signed-off-by: Gabor Boros <gabor.brs@gmail.com> * refactor: remove celery<5 adjustments Signed-off-by: Gabor Boros <gabor.brs@gmail.com> * fix: set single-beat autorestart Signed-off-by: Gabor Boros <gabor.brs@gmail.com>
…upported#6586) * feat: make SINGLE_BEAT_IDENTIFIER configurable * fix: celery 5.0+ does not support --app as a worker flag * refactor: remove duplicated app declaration * fix: --config flag is global since Celery 5.0+ * fix: replace single-beat with an updated version * fix: add missing comma * fix: replace maxtasksperchild worker flag * refactor: address PR review comments Signed-off-by: Gabor Boros <gabor.brs@gmail.com> * refactor: remove celery<5 adjustments Signed-off-by: Gabor Boros <gabor.brs@gmail.com> * fix: set single-beat autorestart Signed-off-by: Gabor Boros <gabor.brs@gmail.com>
…upported#6586) * feat: make SINGLE_BEAT_IDENTIFIER configurable * fix: celery 5.0+ does not support --app as a worker flag * refactor: remove duplicated app declaration * fix: --config flag is global since Celery 5.0+ * fix: replace single-beat with an updated version * fix: add missing comma * fix: replace maxtasksperchild worker flag * refactor: address PR review comments Signed-off-by: Gabor Boros <gabor.brs@gmail.com> * refactor: remove celery<5 adjustments Signed-off-by: Gabor Boros <gabor.brs@gmail.com> * fix: set single-beat autorestart Signed-off-by: Gabor Boros <gabor.brs@gmail.com>
…upported#6586) * feat: make SINGLE_BEAT_IDENTIFIER configurable * fix: celery 5.0+ does not support --app as a worker flag * refactor: remove duplicated app declaration * fix: --config flag is global since Celery 5.0+ * fix: replace single-beat with an updated version * fix: add missing comma * fix: replace maxtasksperchild worker flag * refactor: address PR review comments Signed-off-by: Gabor Boros <gabor.brs@gmail.com> * refactor: remove celery<5 adjustments Signed-off-by: Gabor Boros <gabor.brs@gmail.com> * fix: set single-beat autorestart Signed-off-by: Gabor Boros <gabor.brs@gmail.com>
Description
This PR allows setting separate users for single-beat and celery brokers, allows authentication, and setting the single-beat identifier for future fine-grained access control using Redis ACLs.
Also, we are replacing the source url of the package, hence the original code became outdated and
akachanov:masteris ahead of the original repo by fixing issues and removing incompatible code.Supporting information
Some months ago edX platform was not capable of doing periodic scheduling of celery tasks. Therefore we added celerybeat to the platform. The only issue with celerybeat is that it cannot run more than once. If multiple celerybeat schedulers are running at the same time, the same task can be scheduled multiple times resulting in unwanted behaviours. Here comes
single-beatinto picture that ensures (using redis) that no more than one celerybeat processes are running.Akachanov removed Tornadis that was published in 2018 for the last time and broke with the newest Celery. Using Akachanov's fork ensures that single-beat is still working with the newest Celery and he also seems to fixed some reconnect issues -- I assume hence the celerybeat process restarts, since I cannot see any errors and periodically scheduled tasks are processed as expected.
Dependencies
Related to https://github.com/edx/edx-platform/pull/29046, which upgrades celery in edx-platform.
Sandbox
https://pr29046.sandbox.opencraft.hosting
Testing instructions
Deadline
ASAP
Other information
N/A