-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Fix duplicate status check contexts #30660
Fix duplicate status check contexts #30660
Conversation
It doesn't seem right. Think about a case (index, context) in which all the records satisfy "updated_unix":
Your SQL gets all 3 contexts, but only context3 should be used because it is the last. |
Since the title of the list is "Status checks found in the last week for this repository", I think we should show all unique contexts whose |
But for all cases, a new status check should override an old one? Why it should show an outdated status (updated: not related to failure or success) |
I see. I guess now I understand the case. For example, I initially had two contexts:
If now I call the function, I should only get |
Yup, I think so |
I agree that we shouldn't show contexts that no longer exist, but after some testing I found that it's not easy to do so. In the previous example, I renamed two contexts. Then if I rerun the first two jobs, the records become:
In this case, it's difficult to determine which contexts are the most recent. Since the contexts displayed in the list are only for reference, I think here we can show all the unique contexts and let users determine which contexts should be matched. |
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.
No idea whether it is good enough. Approve without really checking.
I was unable to create a backport for 1.21. @Zettat123, please send one manually. 🍵
|
Caused by go-gitea#30076. There may be some duplicate status check contexts when setting status checks for a branch protection rule. The duplicate contexts should be removed. Before: <img src="https://github.com/go-gitea/gitea/assets/15528715/97f4de2d-4868-47a3-8a99-5a180f9ac0a3" width="600px" /> After: <img src="https://github.com/go-gitea/gitea/assets/15528715/ff7289c5-9793-4090-ba31-e8cb3c85f8a3" width="600px" />
* giteaofficial/main: Fix duplicate status check contexts (go-gitea#30660) Fix issue label rendering in the issue popup (go-gitea#30763) Fix all rounded borders, change affected tab menus to pills (go-gitea#30707) Rename CodeIndexerEnabled to IsRepoIndexerEnabled (go-gitea#30762) Remove fomantic dimmer module (go-gitea#30723) Resolve lint for unused parameter and unnecessary type arguments (go-gitea#30750) Add support for npm bundleDependencies (go-gitea#30751) Fix cross-compilation errors when CGO_CFLAGS/CGO_LDFLAGS is set (go-gitea#30749)
Backport #30660. Caused by #30076. There may be some duplicate status check contexts when setting status checks for a branch protection rule. The duplicate contexts should be removed. Before: <img src="https://github.com/go-gitea/gitea/assets/15528715/97f4de2d-4868-47a3-8a99-5a180f9ac0a3" width="600px" /> After: <img src="https://github.com/go-gitea/gitea/assets/15528715/ff7289c5-9793-4090-ba31-e8cb3c85f8a3" width="600px" />
Caused by go-gitea#30076. There may be some duplicate status check contexts when setting status checks for a branch protection rule. The duplicate contexts should be removed. Before: <img src="https://github.com/go-gitea/gitea/assets/15528715/97f4de2d-4868-47a3-8a99-5a180f9ac0a3" width="600px" /> After: <img src="https://github.com/go-gitea/gitea/assets/15528715/ff7289c5-9793-4090-ba31-e8cb3c85f8a3" width="600px" />
* origin/main: (55 commits) Fix dashboard commit status null access (go-gitea#30771) Fix tautological conditions (go-gitea#30735) Get repo assignees and reviewers should ignore deactivated users (go-gitea#30770) Right align the "Settings" menu item in overflow-menu (go-gitea#30764) Fix duplicate status check contexts (go-gitea#30660) Fix issue label rendering in the issue popup (go-gitea#30763) Fix all rounded borders, change affected tab menus to pills (go-gitea#30707) Rename CodeIndexerEnabled to IsRepoIndexerEnabled (go-gitea#30762) Remove fomantic dimmer module (go-gitea#30723) Resolve lint for unused parameter and unnecessary type arguments (go-gitea#30750) Add support for npm bundleDependencies (go-gitea#30751) Fix cross-compilation errors when CGO_CFLAGS/CGO_LDFLAGS is set (go-gitea#30749) [skip ci] Updated licenses and gitignores add built js files to eslint ignore (go-gitea#30737) Gitea with first upper case + typos (go-gitea#30739) Fix documentation build problems because of MDX syntax conflicts (go-gitea#30744) Remove disk-clean workflow (go-gitea#30741) Bump `github.com/google/go-github` to v61 (go-gitea#30738) Fix nil dereference on error (go-gitea#30740) Use `ProtonMail/go-crypto` for `opengpg` in tests (go-gitea#30736) ...
Backport #30660. Caused by #30076. There may be some duplicate status check contexts when setting status checks for a branch protection rule. The duplicate contexts should be removed. Before: <img src="https://github.com/go-gitea/gitea/assets/15528715/97f4de2d-4868-47a3-8a99-5a180f9ac0a3" width="600px" /> After: <img src="https://github.com/go-gitea/gitea/assets/15528715/ff7289c5-9793-4090-ba31-e8cb3c85f8a3" width="600px" />
Caused by #30076.
There may be some duplicate status check contexts when setting status checks for a branch protection rule. The duplicate contexts should be removed.
Before:
After: