queue-runner: track jobsets by ID

[?]
Jan 9, 2022, 1:58 PM
WWOHRICQJPZ6SENRQWZJV7HNMVTLY2TAEIJYHWRQCZSH2R4UEKKQC

Dependencies

  • [2] WV4SSAIY Build against nix-master
  • [3] DKR2GXSA Update libpqxx usage to move away from deprecated API interactions.
  • [4] HJOEIMLR Refactor
  • [5] MHVIT4JY Split hydra-queue-runner.cc more
  • [6] WE5Q2NVI Allow build to be bumped to the front of the queue via the web interface
  • [7] T5BIOVJE Add support for tracking custom metrics
  • [8] IK2UBDAU Revive jobset scheduling
  • [9] UPNGFCXG For completeness, re-implement meta.schedulingPriority
  • [10] ACBS7C6Q hydra-queue-runner: Detect changes to the scheduling shares
  • [11] U55WNIDP Abort unsupported build steps
  • [12] ZK76B5ZZ Load the queue in order of global priority

Change contents

  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 99
    [3.7377][4.1211:1337](),[4.170][4.1211:1337](),[4.1337][3.7378:7458]()
    ("select id, project, jobset, job, drvPath, maxsilent, timeout, timestamp, globalPriority, priority from Builds "
    "where id > $1 and finished = 0 order by globalPriority desc, id",
    [3.7377]
    [3.7458]
    ("select builds.id, builds.jobset_id, jobsets.project as project, "
    "jobsets.name as jobset, job, drvPath, maxsilent, timeout, timestamp, "
    "globalPriority, priority from Builds "
    "inner join jobsets on builds.jobset_id = jobsets.id "
    "where builds.id > $1 and finished = 0 order by globalPriority desc, builds.id",
  • edit in src/hydra-queue-runner/queue-monitor.cc at line 116
    [4.22471]
    [4.2019]
    build->jobsetId = row["jobset_id"].as<int>();
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 125
    [4.1400][4.2190:2276](),[4.748][4.2190:2276]()
    build->jobset = createJobset(txn, build->projectName, build->jobsetName);
    [4.1400]
    [4.22781]
    build->jobset = createJobset(txn, build->projectName, build->jobsetName, build->jobsetId);
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 576
    [4.2409][4.2409:2478]()
    const std::string & projectName, const std::string & jobsetName)
    [4.2409]
    [4.2478]
    const std::string & projectName, const std::string & jobsetName, const int & jobsetID)
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 587
    [3.8606][3.8606:8732]()
    ("select schedulingShares from Jobsets where project = $1 and name = $2",
    projectName,
    jobsetName);
    [3.8606]
    [4.2809]
    ("select schedulingShares from Jobsets where id = $1",
    jobsetID);
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 599
    [4.3201][3.8829:8924]()
    "where s.startTime is not null and s.stopTime > $1 and project = $2 and jobset = $3",
    [4.3201]
    [3.8924]
    "where s.startTime is not null and s.stopTime > $1 and jobset_id = $2",
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 601
    [3.8974][3.8974:9018]()
    projectName,
    jobsetName);
    [3.8974]
    [3.9018]
    jobsetID);
  • edit in src/hydra-queue-runner/state.hh at line 126
    [2.10253]
    [4.2389]
    int jobsetId;
  • replacement in src/hydra-queue-runner/state.hh at line 493
    [4.4745][4.4745:4819]()
    const std::string & projectName, const std::string & jobsetName);
    [4.4745]
    [4.4819]
    const std::string & projectName, const std::string & jobsetName, const int & jobsetID);