flux-core icon indicating copy to clipboard operation
flux-core copied to clipboard

adding new job "attribute" is painful

Open grondo opened this issue 3 years ago • 2 comments

Currently, in order to add a new job "attribute" to Flux you have to update at least 5 locations:

  • const char *attrs[] list of attributes in job-list list_attrs_cb()
  • const char *list_attrs string in flux-job.c for cmd_list()
  • header format dictionary in flux/job/info.py in the Python bindings
  • VALID_ATTRS constant list of valid attributes in flux/job/list.pyin the Python bindings
  • The format to attrs mapping in flux-jobs.py

It would be nice if this was a little easier, though I haven't thought of exactly how to do that yet.

grondo avatar Mar 25 '21 19:03 grondo

#4313 may be able to solve a few of these, which helps

chu11 avatar May 05 '22 03:05 chu11

after merge of #4324 this list is shorter / modified

  • const char *attrs[] list of attributes in job-list job-list.c
  • header format dictionary in flux/job/info.py in the Python bindings
  • the expected list-attrs list in t/python/t0010-job.py
  • The format to attrs mapping in flux-jobs.py

chu11 avatar May 06 '22 18:05 chu11