Skip to content

Commit 8f92188

Browse files
grondomergify-bot
authored andcommitted
rfc14: reference RFC 31 and add example constraints
Problem: RFC 14 does not list RFC 31 in Related Standards, and is also missing an example jobspec utilizing constraints with properties (the main use case for job constraints at this point) Add Use Case 2.9 to show an example usage of property-based job constraints. Reference RFC 31 in related standards.
1 parent 2230b9c commit 8f92188

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

data/spec_14/use_case_2.9.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: 999
2+
resources:
3+
- type: slot
4+
count: 1
5+
label: default
6+
with:
7+
- type: node
8+
count: 1
9+
tasks:
10+
- command: [ "flux", "start" ]
11+
slot: default
12+
count:
13+
per_slot: 1
14+
attributes:
15+
system:
16+
duration: 3600.
17+
cwd: "/home/flux"
18+
constraints:
19+
properties:
20+
- amd-mi50

spec_14.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ Related Standards
3737

3838
- :doc:`26/Job Dependency Specification <spec_26>`
3939

40+
- :doc:`31/Job Constraints Specification <spec_31>`
41+
4042

4143
Goals
4244
-----
@@ -654,6 +656,17 @@ Jobspec YAML
654656
.. literalinclude:: data/spec_14/use_case_2.8.yaml
655657
:language: yaml
656658

659+
Use Case 2.9
660+
Specify constraints based on properties
661+
662+
Specific Example
663+
Require that allocated resources have the ``amd-mi50`` property
664+
665+
Jobspec YAML
666+
.. literalinclude:: data/spec_14/use_case_2.9.yaml
667+
:language: yaml
668+
669+
657670
.. [#f1] `YAML Ain’t Markup Language (YAML) Version 1.1 <http://yaml.org/spec/1.1/current.html>`__, O. Ben-Kiki, C. Evans, B. Ingerson, 2004.
658671
659672
.. [#f2] `JSON Schema: A Media Type for Describing JSON Documents <https://json-schema.org/latest/json-schema-core.html>`__; H. Andrews; 2018

0 commit comments

Comments
 (0)