fix(apiserver): check the default queue exists and is open on submit (bug-1960)
Cause: preCheckJobRequest (controllers/jobs.go) ran the reserved-name, existence and closed checks only when a queue name was given; an empty name was set to "normal" and skipped them, so jobs were accepted into a closed default queue. Fix: default the name first, then run the same checks for every submission. Two existing tests now seed the default queue. (The controller side of bug-1960 is fixed separately.) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
387a421c57
commit
1ff068f6e7
3 changed files with 63 additions and 19 deletions
|
|
@ -413,6 +413,7 @@ func TestJobHandler_SmokeSubmitOrdinaryJob(t *testing.T) {
|
|||
// as a 500 and nothing is recorded.
|
||||
func TestJobHandler_SmokeSubmitErrorIs500(t *testing.T) {
|
||||
f := newHandlerFixture(t)
|
||||
f.seedQueue("normal") // the default queue must exist (bug-1960)
|
||||
f.submitErr = errors.New("backend down")
|
||||
|
||||
w := f.submit(map[string]interface{}{"job_name": "smoke", "command": "sleep 1"})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue