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

Always run sync_versions on the default queue #11965

Merged
merged 3 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions readthedocs/core/views/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,6 @@ def trigger_sync_versions(project):
log.info("Skipping sync versions for project.", project_slug=project.slug)
return None

options = {}
if project.build_queue:
# respect the queue for this project
options["queue"] = project.build_queue

_, build_api_key = BuildAPIKey.objects.create_key(project=project)

log.debug(
Expand All @@ -117,7 +112,6 @@ def trigger_sync_versions(project):
sync_repository_task.apply_async(
args=[version.pk],
kwargs={"build_api_key": build_api_key},
**options,
)
return version.slug
except Exception:
Expand Down
5 changes: 4 additions & 1 deletion readthedocs/rtd_tests/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1806,6 +1806,9 @@ def test_webhook_skipped_project(self, trigger_build):
def test_sync_repository_custom_project_queue(
self, sync_repository_task, trigger_build
):
"""
Check that the custom queue isn't used for sync_repository_task.
"""
client = APIClient()
self.project.build_queue = "specific-build-queue"
self.project.save()
Expand Down Expand Up @@ -1836,7 +1839,7 @@ def test_sync_repository_custom_project_queue(
kwargs={
"build_api_key": mock.ANY,
},
queue="specific-build-queue",
# No queue
)

def test_github_webhook_for_branches(self, trigger_build):
Expand Down