Skip to content

Do not pull back locked issues/PRs in scheduled events queries #6506

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

Merged
merged 1 commit into from
Jul 13, 2023

Conversation

JimSuplizio
Copy link
Contributor

@JimSuplizio JimSuplizio commented Jul 13, 2023

Locking the issues after 90 days is a brand new rule. It's also the end of a long path (requiring 90 days of inactivity after 7 and then 14 days of inactivity respectively). As it turns out, after an issue has been closed and locked someone can come back and reopen the issue but leave it locked. The problem with locked issues is comments can't be added which is what most of our scheduled tasks do. This was causing processing failures. The correct solution is to modify the query to omit locked issues from the results. It's also worth noting that these queries should have been omitting locked items from the query result to begin with. Notice that the LockClosedIssues only ever looks for issues that aren't already locked which is what the other queries should have been doing to begin with.

@JimSuplizio JimSuplizio added the GitHub Event Processor Anything related to the GitHub Event Processor, commonly known as JimBot label Jul 13, 2023
@JimSuplizio JimSuplizio requested a review from a team as a code owner July 13, 2023 21:12
@JimSuplizio JimSuplizio self-assigned this Jul 13, 2023
@weshaggard
Copy link
Member

@JimSuplizio one other thought here is if an issue is locked but open should we consider unlocking or closing the issue?

@JimSuplizio
Copy link
Contributor Author

@JimSuplizio one other thought here is if an issue is locked but open should we consider unlocking or closing the issue?

Adding @jsquire since this is probably something he's going to want to mull over.
This shouldn't be a common occurrence but when it happens it'll happen because of someone with permissions doing something. Being that we really don't know their intent, I don't see us being able to do something automated. We certainly do not want to unlock or re-close the issue. Having a scheduled task unlock the issue is going to ultimately play tug of war with the scheduled task that locks the issue. We could possibly do something with things that are both open and unlocked which would at least start the chain again but it's unclear if we should.

@JimSuplizio JimSuplizio merged commit 5de04b8 into Azure:main Jul 13, 2023
@JimSuplizio JimSuplizio deleted the ScheduledOmitLockedFromSearch branch July 13, 2023 21:30
@jsquire
Copy link
Member

jsquire commented Jul 14, 2023

I'd agree that when an issue is reopened, the conversation should be unlocked. Ideally, the folks reopening the issue would remember to do that, but I suspect that it will be forgotten. I'm in favor of adding a rule to catch this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GitHub Event Processor Anything related to the GitHub Event Processor, commonly known as JimBot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants