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

feat(taskworker): add routing override #87373

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

john-z-yang
Copy link
Member

Adds an automator modifiable config taskworker.route.overrides so we can override the routing during emergency.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 19, 2025
Copy link

codecov bot commented Mar 19, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
327 1 326 11
View the top 1 failed test(s) by shortest run time
::tests.sentry.taskworker.test_worker
Stack Traces | 0s run time
#x1B[1m#x1B[.../sentry/taskworker/test_worker.py#x1B[0m:14: in <module>
    import sentry.taskworker.tasks.examples as example_tasks
#x1B[1m#x1B[.../taskworker/tasks/examples.py#x1B[0m:11: in <module>
    exampletasks = taskregistry.create_namespace(name="examples")
#x1B[1m#x1B[.../sentry/taskworker/registry.py#x1B[0m:194: in create_namespace
    topic = self._router.route_namespace(name)
#x1B[1m#x1B[.../sentry/taskworker/router.py#x1B[0m:17: in route_namespace
    if name in options.get("taskworker.route.overrides"):
#x1B[1m#x1B[.../sentry/options/manager.py#x1B[0m:301: in get
    result = self.store.get(opt, silent=silent)
#x1B[1m#x1B[.../sentry/options/store.py#x1B[0m:97: in get
    result = self.get_store(key, silent=silent)
#x1B[1m#x1B[.../sentry/options/store.py#x1B[0m:193: in get_store
    value = self.model.objects.get(key=key.name).value
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/models/manager.py#x1B[0m:87: in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/models/query.py#x1B[0m:645: in get
    num = len(clone)
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/models/query.py#x1B[0m:382: in __len__
    self._fetch_all()
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/models/query.py#x1B[0m:1928: in _fetch_all
    self._result_cache = list(self._iterable_class(self))
#x1B[1m#x1B[31m.venv/lib/python3.13.../db/models/query.py#x1B[0m:91: in __iter__
    results = compiler.execute_sql(
#x1B[1m#x1B[31m.venv/lib/python3.13.../models/sql/compiler.py#x1B[0m:1572: in execute_sql
    cursor = self.connection.cursor()
#x1B[1m#x1B[31m.venv/lib/python3.13.../django/utils/asyncio.py#x1B[0m:26: in inner
    return func(*args, **kwargs)
#x1B[1m#x1B[31m.venv/lib/python3.13.../backends/base/base.py#x1B[0m:320: in cursor
    return self._cursor()
#x1B[1m#x1B[.../db/postgres/decorators.py#x1B[0m:40: in inner
    return func(self, *args, **kwargs)
#x1B[1m#x1B[.../db/postgres/base.py#x1B[0m:108: in _cursor
    return super()._cursor()
#x1B[1m#x1B[31m.venv/lib/python3.13.../backends/base/base.py#x1B[0m:296: in _cursor
    self.ensure_connection()
#x1B[1m#x1B[31mE   RuntimeError: Database access not allowed, use the "django_db" mark, or the "db" or "transactional_db" fixtures to enable it.#x1B[0m

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update task routing to use sentry-options as overrides
1 participant