-
-
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
Upgrade xorm #27673
Upgrade xorm #27673
Conversation
Need to backport because PR #27609 is backported. |
Update: when using the function |
CI failure is related. SELECT count(*) FROM [commit_status] WHERE (repo_id = ?) AND (sha = ?) OFFSET 0 ROWS FETCH NEXT 30 ROWS ONLY see https://gitea.com/xorm/xorm/pulls/2188 for more detail |
Looks like it's xorm's responsibility to fix the problem. |
Yes. That PR seems to forget to add |
@@ -96,7 +96,15 @@ func AssertExistsAndLoadMap(t assert.TestingT, table string, conditions ...any) | |||
// GetCount get the count of a bean | |||
func GetCount(t assert.TestingT, bean any, conditions ...any) int { | |||
e := db.GetEngine(db.DefaultContext) | |||
count, err := whereOrderConditions(e, conditions).Count(bean) | |||
for _, condition := range conditions { |
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.
If the limit
implementation of xorm is not fixed, this code will run into a bug too. But in our cases, we just don't use limit
when writing test cases so the bug is not triggered.
CI is passing. Merge this or wait for xorm?
|
If we want to backport this PR, we should merge it soon. |
We haven't used counting with limit yet in production codes, so I'm OK to merge this and I'm also sending https://gitea.com/xorm/xorm/pulls/2342 to try to fix it. |
Backport #27673 by @lng2020 Related to https://gitea.com/xorm/xorm/pulls/2341 Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
* upstream/main: Adapt `.changelog.yml` to new labeling system (go-gitea#27701) Update and add new eslint plugins (go-gitea#27698) Show total TrackedTime on issue/pull/milestone lists (go-gitea#26672) Add doctor dbconsistency fix to delete repos with no owner (go-gitea#27290) Delete repos of org when purge delete user (go-gitea#27273) Fix required checkboxes in issue forms (go-gitea#27592) Upgrade xorm (go-gitea#27673) [docs] Add note that PROTOCOL config is case-sensitive (go-gitea#25685) Remove network call on `make clean` (go-gitea#27689) Add unit tests for action runner token (go-gitea#27670) Typos fixed in documentation files (go-gitea#27687)
Noticeable change: Remove the `OrderBy("1") ` [patch](#27673 (comment)) for mssql since xorm has [fixed it](https://gitea.com/xorm/xorm/commit/0f085408afd85707635eadb2294ab52be04f3c0f).
Noticeable change: Remove the `OrderBy("1") ` [patch](go-gitea#27673 (comment)) for mssql since xorm has [fixed it](https://gitea.com/xorm/xorm/commit/0f085408afd85707635eadb2294ab52be04f3c0f).
Backport #27807 by @lng2020 Noticeable change: Remove the `OrderBy("1") ` [patch](#27673 (comment)) for mssql since xorm has [fixed it](https://gitea.com/xorm/xorm/commit/0f085408afd85707635eadb2294ab52be04f3c0f). Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
Related to https://gitea.com/xorm/xorm/pulls/2341