Skip to content

Commit

Permalink
refactor: represent requires in resources (#14)
Browse files Browse the repository at this point in the history
* refactor: represent requires in resources

Problem: a compatibility requirement needs to clearly be
matched to resources, at least the subset that goes into
a match in the graph.
Solution: refactor the jobspec so top level resources can
have slots that have nested "requires" at the level they
are needed. I also found a way to remove the "slot" idea
and just replace it with the idea of asking for replicas of
a particular place in the resource request. Note that
the implementation is not updated yet, just the spec, and
I am opening a PR so I can stare at it.

* schema: refactor schema

Problem: requires needs to be grouped with schedule-able
groups.
Solution: simplify the jobspec to allow that.

* requires should be array of objects
* update example with requires array
* update requires in spec
* do not require enum of just node for resources
* allow attributes on the top level of jobspec

These are for cluster state that is desired. We likely
will want to move these into schedulable units.

Signed-off-by: vsoch <[email protected]>
  • Loading branch information
vsoch authored May 10, 2024
1 parent 035a590 commit 0258340
Show file tree
Hide file tree
Showing 13 changed files with 879 additions and 378 deletions.
1 change: 1 addition & 0 deletions docs/docs/drafts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
- [Spec Draft 1](spec-draft-1.md): an early variant
- [Spec Draft 2](spec-draft-2.md): I liked this one the best, but the flexibility made implementation in Go impossible (serializing recursive structs into Go that could be two different types).
- [Spec Draft 3](spec-draft-3.md): better, but flawed in that requirements were separate from schedulable units of work, and more specifically, slots within them.
Loading

0 comments on commit 0258340

Please sign in to comment.