Skip to content

[chore] Mark issues as stale after 60 days#14881

Merged
codeboten merged 8 commits intoopen-telemetry:mainfrom
evan-bradley:mark-issues-stale
Oct 18, 2022
Merged

[chore] Mark issues as stale after 60 days#14881
codeboten merged 8 commits intoopen-telemetry:mainfrom
evan-bradley:mark-issues-stale

Conversation

@evan-bradley
Copy link
Copy Markdown
Contributor

@evan-bradley evan-bradley commented Oct 11, 2022

Description:

This marks issues as stale after 60 days, exempting issues that are labeled with never stale. Upon being marked stale, code owners for any corresponding package labels are pinged.

Issues are closed after 180 days (roughly 6 months) of total inactivity (4 months after the Stale label is applied), and are given the closed as inactive label so they can be easily found later.

Link to tracking Issue:
Resolves #12731

Testing:

I tested this on my personal repository. Here is a screenshot of the bot pinging code owners:

bot pinging code owners on issue

@evan-bradley evan-bradley requested review from a team and dmitryax October 11, 2022 16:29
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented Oct 11, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: evan-bradley / name: Evan Bradley (65e9e200efa7cd9f1c3442ff242bea6afa87dde0)

@evan-bradley
Copy link
Copy Markdown
Contributor Author

@open-telemetry/collector-contrib-approvers I'd welcome additional input on this approach. I'll also bring this up as a discussion item at tomorrow's SIG meeting.

@djaglowski
Copy link
Copy Markdown
Member

I think I'd prefer that the "never-stale" label is applied only by triagers/approvers/maintainers. Otherwise, I think it would be applied inconsistently.

@evan-bradley
Copy link
Copy Markdown
Contributor Author

@djaglowski That's a fair point. I'll remove it from the workflow.

@bogdandrutu
Copy link
Copy Markdown
Member

We discuss during the SIG meeting:

  • Mark stale after 60
  • Close after 180 (60 marking + 120)
  • Mark issues with a label if possible "close by stale bot"

@evan-bradley
Copy link
Copy Markdown
Contributor Author

Thanks @bogdandrutu. I've implemented all of these settings for the stale bot. Closed issues are labeled with closed as inactive.

@evan-bradley evan-bradley requested a review from a team October 12, 2022 17:44
Copy link
Copy Markdown
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good, one question though. Will running ping-codeowners-for-issue add a comment triggering the issue to no longer be stale?

@evan-bradley
Copy link
Copy Markdown
Contributor Author

@codeboten Pinging code owners shouldn't remove the stale label, the action has logic to filter out other bots when considering the last updated date.

@evan-bradley
Copy link
Copy Markdown
Contributor Author

I'm running some tests to confirm the stale action's behavior. I will report back when everything looks good.

@evan-bradley
Copy link
Copy Markdown
Contributor Author

In regard to whether pinging code owners will remove the stale label, I've decided to have the same workflow mark issues as stale and ping code owners to ensure there is no conflict. The stale action checks when the stale label was applied and uses that to determine the last updated date, so a comment by another bot will move this date forward and look like an update to the stale bot. There is technically a 15 second period where we could post a comment after the label has been applied, but I don't want to rely on that and it's not publicly documented behavior anyway. The behavior to filter out bot comments that I mentioned previously does apply, but from what I can tell really only matters for comments in that 15 second window.

The "mark issues as stale" workflow will now run on a schedule to check 30 of the least-recently updated issues in the repository which don't have the "Stale" or "never stale" labels. For each retrieved issue not updated for at least 60 days, it will leave a comment that the issue is stale and notify code owners if any are associated with component labels, then mark the issue as stale. The stale bot will then handle removing the stale label if the issue is updated, or closing the issue if another 120 days has elapsed since the stale label was applied. Issues are closed as "not planned" and are given the "closed as stale" label so we can find them later.

I've configured the workflow to start off by marking issues as stale once a week so as not to flood anyone's inbox. Currently about 500 issues in the contrib repository would be considered stale. So at a rate of 30 issues/week, the workflow should finish processing currently-stale issues over the next 20 weeks or so when also considering issues that become stale in that period.

@evan-bradley
Copy link
Copy Markdown
Contributor Author

I've tested this on my personal fork and haven't encountered any issues. I've included a screenshot of what it looks like below. Note that I set the "stale" and "close" periods to 0 days so they take effect as soon as the workflows run.

stale issue test

@codeboten codeboten merged commit bd43e73 into open-telemetry:main Oct 18, 2022
shalper2 pushed a commit to shalper2/opentelemetry-collector-contrib that referenced this pull request Dec 6, 2022
This marks issues as stale after 60 days, exempting issues that are labeled with never stale. Upon being marked stale, code owners for any corresponding package labels are pinged.

Issues are closed after 180 days (roughly 6 months) of total inactivity (4 months after the Stale label is applied), and are given the closed as inactive label so they can be easily found later.
@plantfansam plantfansam mentioned this pull request Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[chore] Track unmaintained issues

9 participants