Skip to content

Commit

Permalink
Fix bug in gitlab api handler
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Brain <[email protected]>
  • Loading branch information
ABrain7710 committed Dec 9, 2023
1 parent 13eb449 commit 05b53ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions augur/tasks/gitlab/gitlab_api_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ def retrieve_data(self, url: str) -> Tuple[Optional[List[dict]], Optional[httpx.

response = hit_api(self.key_manager, url, self.logger, timeout)

num_attempts += 1

if response is None:
if timeout_count == 10:
self.logger.error(f"Request timed out 10 times for {url}")
Expand Down Expand Up @@ -211,6 +213,7 @@ def retrieve_data(self, url: str) -> Tuple[Optional[List[dict]], Optional[httpx.
return page_data, response, GitlabApiResult.SUCCESS

self.logger.warning(f"Unhandled gitlab response. Status code: {response.status_code}. Body: {response.json()}")



self.logger.error("Unable to collect data in 10 attempts")
Expand Down
2 changes: 1 addition & 1 deletion augur/tasks/start_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def primary_repo_collect_phase_gitlab(repo_git):
#collect_merge_request_reviewers.s(repo_git),
collect_merge_request_metadata.s(repo_git),
collect_merge_request_commits.s(repo_git),
#collect_merge_request_files.s(repo_git),
collect_merge_request_files.s(repo_git),
collect_gitlab_merge_request_events.si(repo_git),
)),
chain(collect_gitlab_issues.si(repo_git), group(
Expand Down

0 comments on commit 05b53ec

Please sign in to comment.