Skip to content

added extra conditions for counting executors#435

Merged
rahulkaukuntla merged 1 commit into
masterfrom
rahul/fix-jenkins-executor-free
Jun 21, 2024
Merged

added extra conditions for counting executors#435
rahulkaukuntla merged 1 commit into
masterfrom
rahul/fix-jenkins-executor-free

Conversation

@rahulkaukuntla

@rahulkaukuntla rahulkaukuntla commented Jun 21, 2024

Copy link
Copy Markdown
Contributor

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)

  • 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.

@rahulkaukuntla
rahulkaukuntla marked this pull request as ready for review June 21, 2024 15:06

@nikita-tkachenko-datadog nikita-tkachenko-datadog left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you for the detailed description!

@sarah-witt sarah-witt added the changelog/Fixed Fixed features results into a bug fix version bump label Jun 21, 2024
@rahulkaukuntla
rahulkaukuntla merged commit c4a5434 into master Jun 21, 2024
@rahulkaukuntla
rahulkaukuntla deleted the rahul/fix-jenkins-executor-free branch June 21, 2024 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/Fixed Fixed features results into a bug fix version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants