Skip to content

Commit 310e251

Browse files
authored
Fix ambiguous id when fetch Actions tasks (#30382)
Fix regression of #30331. ```txt time="2024-04-10T02:23:49Z" level=error msg="failed to fetch task" func="[fetchTask]" file="[poller.go:91]" error="unknown: rpc error: code = Internal desc = pick task: CreateTaskForRunner: Error 1052 (23000): Column 'id' in field list is ambiguous" ```
1 parent fec7542 commit 310e251

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/actions/task.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ func CreateTaskForRunner(ctx context.Context, runner *ActionRunner) (*ActionTask
228228
if runner.RepoID != 0 {
229229
jobCond = builder.Eq{"repo_id": runner.RepoID}
230230
} else if runner.OwnerID != 0 {
231-
jobCond = builder.In("repo_id", builder.Select("id").From("repository").
231+
jobCond = builder.In("repo_id", builder.Select("`repository`.id").From("repository").
232232
Join("INNER", "repo_unit", "`repository`.id = `repo_unit`.repo_id").
233233
Where(builder.Eq{"`repository`.owner_id": runner.OwnerID, "`repo_unit`.type": unit.TypeActions}))
234234
}

0 commit comments

Comments
 (0)