Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.
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: 3 additions & 3 deletions services/test_analytics/tests/test_ta_cache_rollups.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def test_cache_test_rollups(storage, snapshot):

CacheTestRollupsTask().run_impl(
_db_session=None,
repoid=1,
repo_id=1,
branch=None,
impl_type="new",
)
Expand Down Expand Up @@ -170,7 +170,7 @@ def test_cache_test_rollups_use_timeseries_main(storage, snapshot):

CacheTestRollupsTask().run_impl(
_db_session=None,
repoid=1,
repo_id=1,
branch="main",
impl_type="new",
)
Expand Down Expand Up @@ -262,7 +262,7 @@ def test_cache_test_rollups_use_timeseries_branch(storage, snapshot):

CacheTestRollupsTask().run_impl(
_db_session=None,
repoid=1,
repo_id=1,
branch="feature",
impl_type="new",
)
Expand Down
7 changes: 1 addition & 6 deletions tasks/cache_test_rollups.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,11 @@ def run_impl(
self,
_db_session,
branch: str,
repo_id: int | None = None,
repoid: int | None = None,
repo_id: int,
update_date: bool = True,
impl_type: Literal["old", "new", "both"] = "old",
**kwargs,
):
repo_id = repo_id or repoid
if repo_id is None:
raise ValueError("repo_id or repoid must be provided")

redis_conn = get_redis_connection()
try:
with redis_conn.lock(
Expand Down
10 changes: 5 additions & 5 deletions tasks/tests/unit/test_cache_test_rollups.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def test_cache_test_rollups(self, mock_storage, transactional_db):

task = CacheTestRollupsTask()
result = task.run_impl(
_db_session=None, repoid=self.repo.repoid, branch="main"
_db_session=None, repo_id=self.repo.repoid, branch="main"
)
assert result == {"success": True}

Expand Down Expand Up @@ -191,7 +191,7 @@ def test_cache_test_rollups_no_update_date(self, mock_storage, transactional_db)
task = CacheTestRollupsTask()
_ = task.run_impl(
_db_session=None,
repoid=rollup_date.repository_id,
repo_id=rollup_date.repository_id,
branch=rollup_date.branch,
update_date=False,
)
Expand All @@ -213,7 +213,7 @@ def test_cache_test_rollups_update_date(self, mock_storage, transactional_db):
task = CacheTestRollupsTask()
_ = task.run_impl(
_db_session=None,
repoid=rollup_date.repository_id,
repo_id=rollup_date.repository_id,
branch="main",
update_date=True,
)
Expand All @@ -231,7 +231,7 @@ def test_cache_test_rollups_update_date_does_not_exist(
task = CacheTestRollupsTask()
_ = task.run_impl(
_db_session=None,
repoid=self.repo.repoid,
repo_id=self.repo.repoid,
branch="main",
update_date=True,
)
Expand All @@ -249,7 +249,7 @@ def test_cache_test_rollups_both(self, mock_storage, transactional_db, mocker):
with time_machine.travel(dt.datetime.now(dt.UTC), tick=False):
_ = task.run_impl(
_db_session=None,
repoid=self.repo.repoid,
repo_id=self.repo.repoid,
branch="main",
update_date=True,
impl_type="both",
Expand Down
Loading