Skip to content

Commit

Permalink
Handle a user whose account was deleted. (apache#30192)
Browse files Browse the repository at this point in the history
* Handle a user whose account was deleted.

* Regroup items on the dashboard.
  • Loading branch information
tvalentyn authored Feb 5, 2024
1 parent 7f91baa commit d5aa44c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .test-infra/metrics/sync/github/sync_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@
'Beam Metrics Report',
'Build and Version Runner Docker Image',
'PreCommit GHA',
'pr-bot-prs-needing-attention',
'PreCommit RAT',
'Assign or close an issue',
'PostCommit Website Test',
Expand All @@ -339,8 +338,10 @@
'PreCommit Whitespace',
'Publish Beam SDK Snapshots',
'Cancel Stale Dataflow Jobs',
'pr-bot-new-prs',
'pr-bot-pr-updates',
'pr-bot-new-prs'
'pr-bot-prs-needing-attention',
'pr-bot-update-reviewers'
]

MISC_TESTS = [
Expand All @@ -355,7 +356,6 @@
'Cancel',
'PostCommit PortableJar Spark',
'PreCommit Integration and Load Test Framework',
'pr-bot-update-reviewers',
'PostCommit TransformService Direct',
'Cut Release Branch',
'Generate issue report',
Expand Down Expand Up @@ -404,7 +404,7 @@ def get_dashboard_category(workflow_name):
return 'go'
if workflow_name in MISC_TESTS:
return 'misc'

print(f'No category found for workflow: {workflow_name}')
print('Falling back to rules based assignment')

Expand Down Expand Up @@ -471,7 +471,7 @@ def get_token():
git_integration = GithubIntegration(GH_APP_ID, GH_PEM_KEY)
token = git_integration.get_access_token(GH_APP_INSTALLATION_ID).token
return f'Bearer {token}'

@backoff.on_exception(backoff.constant, aiohttp.ClientResponseError, max_tries=5)
async def fetch(url, semaphore, params=None, headers=None, request_id=None):
async with semaphore:
Expand Down Expand Up @@ -574,7 +574,7 @@ def append_workflow_runs(workflow, runs):
else:
workflow_ids_to_fetch_extra_runs.pop(workflow_id, None)
print(f"Successfully fetched details for: {workflow.filename}")

page = math.ceil(
int(GH_NUMBER_OF_WORKFLOW_RUNS_TO_FETCH) / number_of_entries_per_page
) + 1
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/pr-bot/updateReviewers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ async function getReviewersForPull(pull: any): Promise<string[]> {

for (const comment of comments) {
if (
comment.user &&
comment.user.login &&
comment.user.login !== pull.user.login &&
comment.user.login !== BOT_NAME
Expand Down

0 comments on commit d5aa44c

Please sign in to comment.