Project

General

Profile

Actions

Bug #3428

closed

[API] Job reuse filters shouldn't require script and repository to be listed redundantly

Added by Peter Amstutz over 9 years ago. Updated over 9 years ago.

Status:
Rejected
Priority:
Normal
Assigned To:
Category:
API
Target version:
-
Story points:
-
Actions #1

Updated by Peter Amstutz over 9 years ago

  • Subject changed from Job filters are stupid to Job reuse filters shouldn't require script and repository to be listed redundantly
Actions #2

Updated by Peter Amstutz over 9 years ago

  • Category set to API

Fragment of a job submission:

{
   "script":"run-command",
   "repository":"peter",
   "script_version":"c75a4bb16b2ae143023a001ddb92ce175c813c11",
   "filters":[
    [
     "script",
     "=",
     "run-command" 
    ],
    [
     "repository",
     "=",
     "peter" 
    ],
    [
     "script_version",
     "=",
     "c75a4bb16b2ae143023a001ddb92ce175c813c11" 
    ],
   [
     "uuid",
     "!=",
     "qr1hi-8i9sb-ac8nj15i4n4jiup" 
    ]
  ]
}

The fact that I have to redundantly list "script", "repository" and "script_version" in both the job and in the filters is redundant. It should know enough to check the filters clause and add them if they are missing.

Actions #3

Updated by Peter Amstutz over 9 years ago

  • Subject changed from Job reuse filters shouldn't require script and repository to be listed redundantly to [API] Job reuse filters shouldn't require script and repository to be listed redundantly
Actions #4

Updated by Tom Clegg over 9 years ago

  • Status changed from New to Rejected
  • Assigned To set to Tom Clegg

Although there are special cases where it's possible to guess with good certainty what the client would have provided, it's clearer to require the client to provide the information.

This seems like it would be convenient for a user who submits find_or_create API requests by hand. Better value in making it more rare that anyone would want to do that -- i.e., make Workbench and other tools do what users need.

Actions

Also available in: Atom PDF