flux-framework / flux-sched

Fluxion Graph-based Scheduler
GNU Lesser General Public License v3.0
84 stars 39 forks source link

reader: fix jgf properties #1149

Closed jameshcorbett closed 1 month ago

jameshcorbett commented 2 months ago

Given this vertex in JGF, resource-query reports it has no properties.

      {
        "id": "35",
        "metadata": {
          "type": "node",
          "basename": "node",
          "name": "compute-01",
          "id": 1,
          "uniq_id": 35,
          "rank": 0,
          "exclusive": true,
          "unit": "",
          "size": 1,
          "properties": ["pdebug"],
          "paths": {
            "containment": "/ElCapitan0/rack0/compute-01"
          }
        }
      }
resource-query> g /ElCapitan0/rack0/compute-01
No properties were found for /ElCapitan0/rack0/compute-01 (vtx's uniq_id=35).

Looking at the reader, I found that it expects properties to be given as a mapping with keys the name of the property. When I changed the vertex in JGF to the following, the property was recognized. It looks like the reader had been silently failing on the type.


      {
        "id": "35",
        "metadata": {
          "type": "node",
          "basename": "node",
          "name": "compute-01",
          "id": 1,
          "uniq_id": 35,
          "rank": 0,
          "exclusive": true,
          "unit": "",
          "size": 1,
          "properties": {
            "pdebug": ""
          },
          "paths": {
            "containment": "/ElCapitan0/rack0/compute-01"
          }
        }
      },
resource-query> g /ElCapitan0/rack0/compute-01
pdebug=
jameshcorbett commented 2 months ago

@milroy this is ready for review whenever.

jameshcorbett commented 1 month ago

Thanks! Setting MWP.

codecov[bot] commented 1 month ago

Codecov Report

Merging #1149 (f2f2899) into master (68c636a) will increase coverage by 2.8%. The diff coverage is 53.3%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1149 +/- ## ======================================== + Coverage 71.0% 73.9% +2.8% ======================================== Files 96 103 +7 Lines 12867 14395 +1528 ======================================== + Hits 9147 10643 +1496 - Misses 3720 3752 +32 ``` | [Files](https://app.codecov.io/gh/flux-framework/flux-sched/pull/1149?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework) | Coverage Δ | | |---|---|---| | [src/python/fluxion/resourcegraph/V1.py](https://app.codecov.io/gh/flux-framework/flux-sched/pull/1149?src=pr&el=tree&filepath=src%2Fpython%2Ffluxion%2Fresourcegraph%2FV1.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework#diff-c3JjL3B5dGhvbi9mbHV4aW9uL3Jlc291cmNlZ3JhcGgvVjEucHk=) | `91.9% <77.7%> (+13.9%)` | :arrow_up: | | [resource/readers/resource\_reader\_jgf.cpp](https://app.codecov.io/gh/flux-framework/flux-sched/pull/1149?src=pr&el=tree&filepath=resource%2Freaders%2Fresource_reader_jgf.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework#diff-cmVzb3VyY2UvcmVhZGVycy9yZXNvdXJjZV9yZWFkZXJfamdmLmNwcA==) | `69.0% <16.6%> (-0.5%)` | :arrow_down: | ... and [9 files with indirect coverage changes](https://app.codecov.io/gh/flux-framework/flux-sched/pull/1149/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework)