diff --git a/services/test_analytics/tests/test_ta_cache_rollups.py b/services/test_analytics/tests/test_ta_cache_rollups.py index c8cf3b7b0..1b5288ed3 100644 --- a/services/test_analytics/tests/test_ta_cache_rollups.py +++ b/services/test_analytics/tests/test_ta_cache_rollups.py @@ -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", ) @@ -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", ) @@ -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", ) diff --git a/tasks/cache_test_rollups.py b/tasks/cache_test_rollups.py index 1af4fd099..f194f5e57 100644 --- a/tasks/cache_test_rollups.py +++ b/tasks/cache_test_rollups.py @@ -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( diff --git a/tasks/tests/unit/test_cache_test_rollups.py b/tasks/tests/unit/test_cache_test_rollups.py index aa4c931a5..a43c48365 100644 --- a/tasks/tests/unit/test_cache_test_rollups.py +++ b/tasks/tests/unit/test_cache_test_rollups.py @@ -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} @@ -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, ) @@ -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, ) @@ -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, ) @@ -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",