Skip to content

Commit

Permalink
Merge pull request #2814 from chaoss/dev-pr-patches
Browse files Browse the repository at this point in the history
Release fixes
  • Loading branch information
sgoggins authored Jun 10, 2024
2 parents 34a4f66 + 8c49085 commit 4e0ddcc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions augur/application/db/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,16 +216,16 @@ def facade_bulk_insert_commits(logger, records):
firsthalfRecords = records[:len(records)//2]
secondhalfRecords = records[len(records)//2:]

facade_bulk_insert_commits(logger, session,firsthalfRecords)
facade_bulk_insert_commits(logger, session,secondhalfRecords)
facade_bulk_insert_commits(logger, firsthalfRecords)
facade_bulk_insert_commits(logger, secondhalfRecords)
elif len(records) == 1 and isinstance(e,DataError) and "time zone displacement" in f"{e}":
commit_record = records[0]
#replace incomprehensible dates with epoch.
#2021-10-11 11:57:46 -0500
placeholder_date = "1970-01-01 00:00:15 -0500"

#Check for improper utc timezone offset
#UTC timezone offset should be betwen -14:00 and +14:00
#UTC timezone offset should be between -14:00 and +14:00

commit_record['author_timestamp'] = placeholder_date
commit_record['committer_timestamp'] = placeholder_date
Expand Down
4 changes: 2 additions & 2 deletions augur/tasks/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def add_repo(user_id, group_name, repo_url):

logger = logging.getLogger(add_org.__name__)

with GithubTaskSession() as session:
with GithubTaskSession(logger) as session:
result = UserRepo.add_github_repo(session, repo_url, user_id, group_name)

print(repo_url, result)
Expand All @@ -92,7 +92,7 @@ def add_org(user_id, group_name, org_url):

logger = logging.getLogger(add_org.__name__)

with GithubTaskSession() as session:
with GithubTaskSession(logger) as session:
result = UserRepo.add_github_org_repos(session, org_url, user_id, group_name)

print(org_url, result)
2 changes: 1 addition & 1 deletion augur/tasks/git/dependency_tasks/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def deps_model(session, repo_id,repo_git,repo_path,repo_name):
def generate_scorecard(logger, repo_git):
"""Runs scorecard on repo and stores data in database
:param repo_id: Repository ID
:param repo_git: URL path of the Repostiory
:param repo_git: URL path of the Repository
"""
repo = get_repo_by_repo_git(repo_git)
repo_id = repo.repo_id
Expand Down
12 changes: 6 additions & 6 deletions augur/tasks/git/facade_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ def trim_commits_post_analysis_facade_task(repo_git):
repo = get_repo_by_repo_git(repo_git)

#Get the huge list of commits to process.
absoulte_path = get_absolute_repo_path(facade_helper.repo_base_directory, repo.repo_id, repo.repo_path,repo.repo_name)
repo_loc = (f"{absoulte_path}/.git")
absolute_path = get_absolute_repo_path(facade_helper.repo_base_directory, repo.repo_id, repo.repo_path,repo.repo_name)
repo_loc = (f"{absolute_path}/.git")
# Grab the parents of HEAD

parent_commits = get_parent_commits_set(repo_loc, start_date)
Expand Down Expand Up @@ -181,8 +181,8 @@ def analyze_commits_in_parallel(repo_git, multithreaded: bool)-> None:
repo = get_repo_by_repo_id(repo_id)

#Get the huge list of commits to process.
absoulte_path = get_absolute_repo_path(facade_helper.repo_base_directory, repo.repo_id, repo.repo_path, repo.repo_name)
repo_loc = (f"{absoulte_path}/.git")
absolute_path = get_absolute_repo_path(facade_helper.repo_base_directory, repo.repo_id, repo.repo_path, repo.repo_name)
repo_loc = (f"{absolute_path}/.git")
# Grab the parents of HEAD

parent_commits = get_parent_commits_set(repo_loc, start_date)
Expand All @@ -203,8 +203,8 @@ def analyze_commits_in_parallel(repo_git, multithreaded: bool)-> None:
queue = list(missing_commits)

logger.info(f"Got to analysis!")
absoulte_path = get_absolute_repo_path(facade_helper.repo_base_directory, repo.repo_id, repo.repo_path,repo.repo_name)
repo_loc = (f"{absoulte_path}/.git")
absolute_path = get_absolute_repo_path(facade_helper.repo_base_directory, repo.repo_id, repo.repo_path,repo.repo_name)
repo_loc = (f"{absolute_path}/.git")

pendingCommitRecordsToInsert = []

Expand Down

0 comments on commit 4e0ddcc

Please sign in to comment.