-
Notifications
You must be signed in to change notification settings - Fork 39
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
Quality of life fixes for batch test development #623
Merged
sinteur
merged 8 commits into
internetstandards:master
from
maertsen:initial-batch-fixes
Nov 19, 2021
Merged
Quality of life fixes for batch test development #623
sinteur
merged 8 commits into
internetstandards:master
from
maertsen:initial-batch-fixes
Nov 19, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
maertsen
force-pushed
the
initial-batch-fixes
branch
5 times, most recently
from
October 29, 2021 12:00
967c599
to
8509120
Compare
maertsen
changed the title
Initial batch fixes
Quality of life fixes for batch test development
Oct 29, 2021
Made using `celery upgrade settings internetnl/settings.py-dist --django` Signed-off-by: Maarten Aertsen <maarten.aertsen@ncsc.nl>
This commit makes several changes to improve consistency: - rename `(checks.tasks.update.)ranking` to `update_hof` - refer to all tasks by their fully qualified path - configure schedule intervals in `internetnl/settings.py` - unconditionally define tasks, but only enable them when necessary in the scheduler. Ie. remove `if ENABLE_BATCH:` conditionals. Fixes: 4407156 Signed-off-by: Maarten Aertsen <maarten.aertsen@ncsc.nl>
This commit changes queue configuration in the following way: - move the scheduler to its own queue `batch_scheduler` - rename `worker_slow` to `batch_slow` for the batch_async* tasks This change necessitates a configuration change to the way Celery is started. Assign workers to the two queues defined above. To retain the previous mapping between queues and workers, explicitly map the `batch_scheduler` and `worker_slow` to the worker that previously implicitly worked the default the `celery` queue. Signed-off-by: Maarten Aertsen <maarten.aertsen@ncsc.nl>
To enable the batch test prior to this change, it was necessary to set `ENABLE_BATCH = True` and to remove the `CELERY_TASK_ROUTES` for the frontend. This commit simply enables both when `ENABLE_BATCH = True`. The effect of this change is that frontend tasks are routed to the same celery queues regardless of whether the batch testing facility is enabled. This simplifies understanding of the system. This change necessitates a configuration change to the way Celery is started. Assign workers to the `db_worker` and `slow_db_worker` queues. Signed-off-by: Maarten Aertsen <maarten.aertsen@ncsc.nl>
Simplify developing for the batch test by extending the existing docker setup. To activate the batch test in docker, do the following: ``` cd docker/ export ENABLE_BATCH=True docker-compose up -d && docker-compose logs -f ``` Signed-off-by: Maarten Aertsen <maarten.aertsen@ncsc.nl>
Signed-off-by: Maarten Aertsen <maarten.aertsen@ncsc.nl>
Signed-off-by: Maarten Aertsen <maarten.aertsen@ncsc.nl>
Signed-off-by: Maarten Aertsen <maarten.aertsen@ncsc.nl>
maertsen
force-pushed
the
initial-batch-fixes
branch
from
November 18, 2021 13:02
590095f
to
e00d6cc
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes improvements to the use of celery and docker while working on #30. Make sure to read through the individual commit messages, some changes impact the way batch environments are deployed.
I am happy to add a commit to add to the changelog once this PR has seen review.