This issue arose from calling two different classes: Computer and ComputerSet. Datadog directly calls on the executor methods in Computer.java for each computer, while Jenkins calls the ComputerSet.java methods which itself calls Computer.java for each computer.
However, ComputerSet.java applies some restrictions on when to call the executor methods of Computer.java--the number of busy executors and the number of total executors only considers online computers, while the number of free executors only considers computers that are either online or connecting, and which is accepting tasks. As such, in order to mimic how Jenkins counts total, free, and busy executors, this PR adds the ComputerSet.java (and by extension, Jenkins) restrictions to the Datadog plugin's calls to Computer.java.
Alternate Designs
Possible Drawbacks
Verification Process
Additional Notes
Release Notes
Review checklist (to be filled by reviewers)
[ ] Feature or bug fix MUST have appropriate tests (unit, integration, etc...)
[ ] PR title must be written as a CHANGELOG entry (see why)
[ ] Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
[ ] PR must have one changelog/ label attached. If applicable it should have the backward-incompatible label attached.
[ ] PR should not have do-not-merge/ label attached.
[ ] If Applicable, issue must have kind/ and severity/ labels attached at least.
What does this PR do?
Addresses issue #434
Description of the Change
This issue arose from calling two different classes: Computer and ComputerSet. Datadog directly calls on the executor methods in Computer.java for each computer, while Jenkins calls the ComputerSet.java methods which itself calls Computer.java for each computer.
However, ComputerSet.java applies some restrictions on when to call the executor methods of Computer.java--the number of busy executors and the number of total executors only considers online computers, while the number of free executors only considers computers that are either online or connecting, and which is accepting tasks. As such, in order to mimic how Jenkins counts total, free, and busy executors, this PR adds the ComputerSet.java (and by extension, Jenkins) restrictions to the Datadog plugin's calls to Computer.java.
Alternate Designs
Possible Drawbacks
Verification Process
Additional Notes
Release Notes
Review checklist (to be filled by reviewers)
changelog/
label attached. If applicable it should have thebackward-incompatible
label attached.do-not-merge/
label attached.kind/
andseverity/
labels attached at least.