Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reset the counter after processed commits in branch #1058

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 3 additions & 1 deletion grimoire_elk/enriched/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,9 @@ def add_commit_branches(self, git_repo, enrich_backend):

if commit_count:
self.__process_commits_in_branch(enrich_backend, git_repo.uri, branch_name, to_process)

# reset the counter
to_process = []
commit_count = 0
except Exception as e:
logger.error("[git] Skip adding branch info for repo {} due to {}".format(git_repo.uri, e))
return
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
title: 'reset the counter after processed commits in branch '
category: fixed
author: ChenqiShan <[email protected]>
issue:
notes: >
During the study enrich_git_branches, we reset the counter only after if commit_count == MAX_BULK_UPDATE_SIZE:.We should also reset the counter after if commit_count: by the same way.Otherwise, to_process list will be added to next for Loop when branched has been added by "if commit_count:".