Refactor minimizeIssueComments()
in "Schedule Friday" to avoid secondary rate limit
#7562
Labels
Complexity: Medium
Feature: Refactor GHA
Refactoring GitHub actions to fit latest architectural norms
Ready for Prioritization
role: back end/devOps
Tasks for back-end developers
size: 5pt
Can be done in 19-30 hours
Milestone
Overview
For each of the scheduled runs of "Schedule Friday" since Sept. 13th, the workflow has failed due to the
minimizeIssueComments()
function exceeding GitHub's secondary rate limit. We need to make changes to the workflow to avoid this error.Details
Upon review of the September 13th workflow logs, it can be shown that the automation made GraphQL calls 683 times in order to minimize these comments. Since most of these comments have already been closed by an earlier run of this automation, making GraphQL requests to close these already-closed comments is superfluous and contributes to exceeding the rate limit.
Therefore, the proposal is to change the existing limit of closing all comments older than 7 days, to closing comments older than 7 days but more recent than 28 days. This should reduce the total number of comments to process and hopefully will help us to stay under the secondary rate limit.
Action Items
Review the "Schedule Friday" workflow logs, starting with the September 13th run, and note the error occurring due to the secondary rate limit.
In add-label.js, locate the following code (near lines 190-200), and replace:
with:
After
const inactiveUpdatedByDays = 14;
, add new line:After
const fourteenDayCutoffTime
, add new lines:Although this issue involves GitHub Actions, testing is not required.
For Merge Team:
Ready for Merge Team
label.Resources/Instructions
The text was updated successfully, but these errors were encountered: