Ticket 19726

Summary: Expose Job Resource Info to C Plugin API
Product: Slurm Reporter: Abhinav <abdh>
Component: AccountingAssignee: Jacob Jenson <jacob>
Status: OPEN --- QA Contact:
Severity: 6 - No support contract    
Priority: ---    
Version: 23.02.4   
Hardware: Linux   
OS: Linux   
Site: -Other- Alineos Sites: ---
Atos/Eviden Sites: --- Confidential Site: ---
Coreweave sites: --- Cray Sites: ---
DS9 clusters: --- HPCnow Sites: ---
HPE Sites: --- IBM Sites: ---
NOAA SIte: --- NoveTech Sites: ---
Nvidia HWinf-CS Sites: --- OCF Sites: ---
Recursion Pharma Sites: --- SFW Sites: ---
SNIC sites: --- Tzag Elita Sites: ---
Linux Distro: --- Machine Name:
CLE Version: Version Fixed:
Target Release: --- DevPrio: ---
Emory-Cloud Sites: ---

Description Abhinav 2024-04-29 12:15:17 MDT
Currently the `job_resource` struct is opaque and unavailable to the public header file. I'm trying to create a slurm promtheus exporter [here](https://github.com/rivosinc/prometheus-slurm-exporter) and use the c plugin api instead of scraping the cmd line or json outputs as the c plugin is more stable and performant. For that, I need all the resource info I can get. This opaque struct (https://github.com/SchedMD/slurm/blob/master/src/common/job_resources.h#L106-L128) also doesn't provide a set of public methods to extract the required resources. If either of those options could be provided I would be greatful. As it stands I'm unsure as to why this struct would be made opaque in the first place. Perhaps I'm missing something.