Skip to content

WIP: Automatic suggestion of DSID ranges from commit script [skip ci]

Spyros Argyropoulos requested to merge booking into master

As discussed in #29 (closed)

Still WIP since I think this may be far from what we want

How the suggestion mechanism works

When doing the dry-run of the commit script users are supposed to use -s in order to get a suggestion of the DSID ranges that they should use.

The script will:

  1. loop over all DSIDs in the commit
  2. identify the jO in each DSID directory and extract the first generator
  3. query all the heads in origin, find the min and max allowed DSID for the generator determined in (2) and return the minimum free DSID


I've added (not yet committed 999xxx/, 999xxx/999998/, 999xxx/999999/ and run:

./scripts/ -d=999997-999999 -n -s
INFO: will use following remote for pushing: origin
Suggesting DSID ranges ...
	jO: 999xxx/999997/ -> generator = Ph
	jO: 999xxx/999998/ -> generator = Sh
	jO: 999xxx/999999/ -> generator = Sh
	Suggested DSID range for Ph ...
		999xxx/999997 -> 600xxx/600010
	Suggested DSID range for Sh ...
		999xxx/999998 -> 700xxx/700055
		999xxx/999999 -> 700xxx/700056

Not yet implemented

  • The script does not try to "fill holes", e.g. in 700xxx the first two DSIDs are 700000, 700005 so in principle the two DSIDs above could be moved to 700001, 700002
  • Generators not implemented: HI, Misc, validation. Someone should suggest an algorithmic way of deciding what is Misc and what is validation
  • Enforcing a given DSID assignment as suggested by the script
Edited by Spyros Argyropoulos

Merge request reports