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

Revert backend leak check #586

Merged
merged 1 commit into from
Apr 23, 2024
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
10 changes: 0 additions & 10 deletions runner_manager/models/runner_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,16 +313,6 @@ def healthcheck(
):
"""Healthcheck runner group."""
runners = self.get_runners()
backend_runners = self.backend.list()
# Check if there's a runner that is not in the database
if len(runners) != len(backend_runners):
for backend_runner in backend_runners:
if backend_runner not in runners:
# A runner has leaked from the database/runner manager
# let's save it and add it to the list of runners
backend_runner.save()
runners.append(backend_runner)

for runner in runners:
runner.update_from_github(github)
if runner.time_to_live_expired(time_to_live):
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/jobs/test_healthchecks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from hypothesis import given, settings
from hypothesis import strategies as st
from pytest import mark
from redis_om import Migrator
from rq import Queue

Expand Down Expand Up @@ -136,6 +137,7 @@ def test_healthcheck_job(
assert len(runner_group.get_runners()) == 1


@mark.skip(reason="The check was reverted due to killing healthy runners")
def test_healthcheck_backend_leak(
runner_group: RunnerGroup,
settings: Settings,
Expand Down
Loading