-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Option to delay conflict checking of old pull requests until page view #27779
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
Conversation
[repository.pull-request] CHECK_ONLY_LAST_UPDATED_DAYS specifies the number of days in which the PR must have been last updated for conflict checking to happen immediately when the base branch is updated. The default value of -1 behaves exactly as before with no delay. With 0 all conflict checking will be delayed until page view. We have found that 1 day works well in practice. This mostly eliminates the "Merge conflict checking is in progress. Try again in few moments." message when conflict checking is slow for big repositories and many pull requests. PRs that are actively being worked on will be checked immediately, while for others are likely to actually get checked in the next few seconds. Even better would be to auto-update the page as GitHub does, but this relatively simple change effectively solved the problem for us.
5a0db8a
to
dbd6fe1
Compare
This PR is rather outdated, I've updated it now to a more recent version:
|
I think the pull request view UI should be refactored to connect with websocket to detect whether the check status changed. |
# Conflicts: # routers/web/repo/issue.go
Resolved the conflict (only one in Will try to add some tests and improve UI |
Made some changes in 1c00cc3 (first step)
|
2437f74
to
7062121
Compare
I think we could have the "auto refresh" UI support now: 7062121 |
7dc48f0
to
d1f8ad1
Compare
Almost done from my side, does the new code look good to you? |
ecb2d74
to
a643f3b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! It works great in testing. The code looks good to me, though the typescript part I'm not familiar enough with to properly review.
Maybe this text can be changed:
- pulls.is_checking = "Merge conflict checking is in progress. Try again in few moments."
+ pulls.is_checking = "Checking for merge conflicts..."
Or perhaps an is-loading
animation can be used instead of the ellipsis.
I updated the PR description also.
;; | ||
;; Delay mergeable check until page view or API access, for pull requests that have not been updated in the specified days when their base branches get updated. | ||
;; Use "-1" to always check all pull requests (old behavior). Use "0" to always delay the checks. | ||
;DELAY_CHECK_FOR_INACTIVE_DAYS = 7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a good default to me.
Would this be considered an API breaking change? I guess you already have to poll in case it happens to be checking, and an API access will trigger the check to happen so it should eventually return an actual status.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, maybe we could mention it in the changelog, and collect user feedbacks.
Co-authored-by: Brecht Van Lommel <[email protected]>
Co-authored-by: Brecht Van Lommel <[email protected]>
Good idea, while I think we could leave them to the future .... the "text change" would involve more tests to be updated, the "is-loading" is difficult to do quick UI tests (need to manually confirm and fine-tune .....). And this PR is large enough 😄 |
* giteaofficial/main: [skip ci] Updated translations via Crowdin Option to delay conflict checking of old pull requests until page view (go-gitea#27779) Update unrs-resolver (go-gitea#34279)
[repository.pull-request] DELAY_CHECK_FOR_INACTIVE_DAYS
is a new setting to delay the mergeable check for pull requests that have been inactive for the specified number of days.This avoids potentially long delays for big repositories with many pull requests. and reduces system load overall when there are many repositories or pull requests.
When viewing the PR, checking will start immediately and the PR merge box will automatically reload when complete. Accessing the PR through the API will also start checking immediately.
The default value of
7
provides a balance between system load, and keeping behavior similar to what it was before both for users and API access. With0
all conflict checking will be delayed, while-1
always checks immediately to restore the previous behavior.