From 73f3b6cee5dd76166476714fb703b980a3eead79 Mon Sep 17 00:00:00 2001 From: Adrian Edwards Date: Fri, 20 Mar 2026 19:07:28 -0400 Subject: [PATCH 1/3] mark a lib config fetcher as deprecated for future removal Signed-off-by: Adrian Edwards --- collectoss/application/db/lib.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/collectoss/application/db/lib.py b/collectoss/application/db/lib.py index 4d719d1ac..ed7613d11 100644 --- a/collectoss/application/db/lib.py +++ b/collectoss/application/db/lib.py @@ -9,6 +9,7 @@ from sqlalchemy.exc import OperationalError from psycopg2.errors import DeadlockDetected from typing import List, Any, Optional, Union +from typing_extensions import deprecated from collectoss.application.db.models import Config, Repo, Commit, WorkerOauth, Issue, PullRequest, PullRequestReview, ContributorsAlias,UnresolvedCommitEmail, Contributor, CollectionStatus, UserGroup, RepoGroup from collectoss.tasks.util.collection_state import CollectionState @@ -18,7 +19,7 @@ logger = logging.getLogger("db_lib") - +@deprecated("This is a legacy method. Use AugurConfig.get_value instead") def get_value(section_name: str, setting_name: str) -> Optional[Any]: """Get the value of a setting from the config. From 9a68982f351efdf0c46570dc62062d952f7579b4 Mon Sep 17 00:00:00 2001 From: Adrian Edwards Date: Fri, 20 Mar 2026 19:08:13 -0400 Subject: [PATCH 2/3] mark GitHubRandomKeyAuth as deprecated Signed-off-by: Adrian Edwards --- collectoss/tasks/github/util/github_random_key_auth.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/collectoss/tasks/github/util/github_random_key_auth.py b/collectoss/tasks/github/util/github_random_key_auth.py index 6797ba785..1dbbd2d65 100644 --- a/collectoss/tasks/github/util/github_random_key_auth.py +++ b/collectoss/tasks/github/util/github_random_key_auth.py @@ -3,7 +3,9 @@ from collectoss.tasks.util.random_key_auth import RandomKeyAuth from collectoss.tasks.github.util.github_api_key_handler import GithubApiKeyHandler from sqlalchemy.orm import Session +from typing_extensions import deprecated +@deprecated("This class is deprecated. Use the KeyClient interface to the Keymanager process instead.") class GithubRandomKeyAuth(RandomKeyAuth): """Defines a github specific RandomKeyAuth class so github collections can have a class randomly selects an api key for each request From 7327356663fc43c934a05dee4f12251ec83af251 Mon Sep 17 00:00:00 2001 From: Adrian Edwards Date: Fri, 20 Mar 2026 19:21:14 -0400 Subject: [PATCH 3/3] find some deprecated things based on comments Signed-off-by: Adrian Edwards --- .../git/util/facade_worker/facade_worker/repofetch.py | 8 ++++---- .../contributor_interfaceable/contributor_interface.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/collectoss/tasks/git/util/facade_worker/facade_worker/repofetch.py b/collectoss/tasks/git/util/facade_worker/facade_worker/repofetch.py index 658ddc1d0..3f7ab07e9 100644 --- a/collectoss/tasks/git/util/facade_worker/facade_worker/repofetch.py +++ b/collectoss/tasks/git/util/facade_worker/facade_worker/repofetch.py @@ -36,6 +36,7 @@ from collectoss.application.db.models.augur_operations import CollectionStatus from collectoss.application.db.util import execute_session_query, convert_orm_list_to_dict_list from collectoss.application.db.lib import execute_sql, get_repo_by_repo_git +from typing_extensions import deprecated class GitCloneError(Exception): pass @@ -174,8 +175,7 @@ def git_repo_initialize(facade_helper, session, repo_git): facade_helper.log_activity('Info', f"Fetching new repos (complete)") -# Deprecated functionality. No longer used -# Should be re-purposed in start_tasks when tasks are being scheduled +@deprecated("Deprecated functionality. No longer used. Should be re-purposed in start_tasks when tasks are being scheduled") def check_for_repo_updates(session, repo_git): # Check the last time a repo was updated and if it has been longer than the @@ -244,7 +244,7 @@ def check_for_repo_updates(session, repo_git): # Deprecated. No longer used. - +@deprecated("This functionality is deprecated and won't work with present facade versions") def force_repo_updates(session, repo_git): raise NotImplementedError( "This functionality is deprecated and won't work with present facade versions") @@ -263,7 +263,7 @@ def force_repo_updates(session, repo_git): # Deprecated. No longer used. - +@deprecated("This functionality is deprecated and won't work with present facade versions") def force_repo_analysis(session, repo_git): raise NotImplementedError( "This functionality is deprecated and won't work with present facade versions") diff --git a/collectoss/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py b/collectoss/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py index 1e064f033..36fb67488 100644 --- a/collectoss/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py +++ b/collectoss/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py @@ -8,7 +8,7 @@ # Debugger from collectoss.tasks.github.util.github_paginator import GithubApiResult from collectoss.application.db.lib import get_repo_by_repo_id, bulk_insert_dicts, execute_sql, get_contributors_by_github_user_id - +from typing_extensions import deprecated ##TODO: maybe have a TaskSession class that holds information about the database, logger, config, etc. @@ -27,7 +27,7 @@ def clean_dict(d): return {k: ("" if v is None else v) for k, v in d.items()} -# deprecated in favor of GithubDataAcess.get_resource() +@deprecated("Please use GithubDataAcess.get_resource() instead") def request_dict_from_endpoint(logger, session, url, timeout_wait=10): """Hit the endpoint specified by the url and return the json that it returns if it returns a dict.