Make it possible to lock runner on a specific project
Merge request reports
Activity
mentioned in issue #15598 (closed)
Added 233 commits:
- 564da63c...c3f68b10 - 232 commits from branch
master
- a8a5b5a3 - Add config field to runner to lock it on project
- 564da63c...c3f68b10 - 232 commits from branch
We will probably move this MR to 8.9 since it has been delayed because of working on same parts of codebase in different MRs.
Edited by Grzegorz Bizonmentioned in issue #17686 (closed)
@godfat As discussed - if you want to hijack this MR, please do so, otherwise you can close this one and open new. Thanks!
Reassigned to @godfat
@grzesiek I'll just reuse your branch :) I like to keep history! :P
@godfat
but no need to notify about rebasing :)Added 783 commits:
- a8a5b5a3...473ea1e9 - 782 commits from branch
master
- d94b5a46 - Add config field to runner to lock it on project
- a8a5b5a3...473ea1e9 - 782 commits from branch
mentioned in merge request !4404 (merged)
Milestone changed to %8.9
I spent much more time than I thought. In the end it turns out that it's really much more simpler than I originally thought. Due to that I wasted some time walking around.
Anyway, only views left. I'll commit and push some changes copying some changes from !4039 (merged), and start to check if that's correct tomorrow. Let me know if you have any idea how this should be shown on UI, as I am much less interested in that regard. (and I am very bad and impatient for Rails views :o)
@godfat This is very good that you took time to look around in codebase. It is not time wasted!
In the UI, we can follow similar path like in MR you mentioned. We will probably need something more to visualize this in some other view, but this should not be too difficult either.
Haha, hopefully. It's more like "staring" at the codebase though. I thought I need to JOIN something, and after I'm done with it, starting writing tests, and then realized that I don't really need to JOIN anything. Oh well. Should probably write tests first. On the other hand, I was not really sure what to test before really writing something though. How recursive.
Re UI: Sure :D
@grzesiek Do you have any idea why this test would give this error?
https://gitlab.com/gitlab-org/gitlab-ce/builds/1605124
Namely this SQL is wrong:
AND `ci_runners`.`is_shared` = LIMIT 20 OFFSET 0)
The value for
is_shared
is missing. I tried to run this with PostgreSQL, and it would give an error like this:PG::ProtocolViolation: ERROR: bind message supplies 4 parameters, but prepared statement "a52" requires 5
For:
"ci_runners"."is_shared" = $5 LIMIT 20 OFFSET 0
I believe it's the same issue just that PostgreSQL is giving a better error message instead of giving syntax error. The failing line could be translated to:
current_user.ci_authorized_runners.specific_for(project).ordered.page(params[:page]).per(20).any?
Which works fine in the console. I feel this is a bug of Rails?