parameterized job submit constraints at dispatch
- Dominant language
- Go
- Stars
- 17k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 105
Description
A very useful potential enhancement to the Parameterized Job dispatch API would be to allow submittable constraints at dispatch time.
The current `/v1/job/:job_id/dispatch` endpoint takes the following parameters:
```
{
"Payload": "A28C3==",
"Meta": {
"key": "Value"
}
}
```
This issue proposes the following addition:
```
{
"Payload": "A28C3==",
"Meta": {
"key": "Value"
},
"Constraints": [
{
"LTarget": "${attr.kernel.name}",
"RTarget": "linux",
"Operand": "="
}
]
}
```
An example use-case my team has is as subsequently described:
```
# Job-1 writes a file to a shared mounted directory on one client
alloc-1 = dispatch(Job-1)
# Job-2 would need to be scheduled to the exact client that alloc-1
# was scheduled to in order to process the written artifact
dispatch(Job-2, client of alloc-1)
```
We explicitly would like to adopt this pattern to take advantage of client locality and avoid incurring additional heavy network costs to uploading and redownloading large artifacts.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the /v1/job/:job_id/dispatch API and its existing Payload and Meta request shape. Review how dispatch constraints are currently represented and determine the API and scheduling behavior needed for the proposed Constraints array. Done means the dispatch API supports the constraint example and the client-locality use case, with coverage for the new request behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100