Skip to content

Plugin does not respect Team's throttling limit. #406

@echristley

Description

@echristley

Jenkins and plugins versions report

Teams throttles requests. office365Connector sees it as a failure
5.1.0 of the plugin

As described here [Microsoft page on Teams throttling](https://learn.microsoft.com/en-us/graph/throttling), Teams will throttle requests, and the plugin fails to detect and respect the throttling.  At least I found no code in HttpWorker, other than "responseCode >= HttpStatus.SC_BAD_REQUEST".  There probably needs to be a global semaphore, that will block further message sends until a sleep for the returned number of seconds completes.

What Operating System are you using (both controller, and any agents involved in the problem)?

Master is on Linux, and agents are on Windows, but none of that matters in this instance.

Reproduction steps

  1. Configure a channel for messages
  2. Create a pipeline that fires 100 messages in a tight loop
  3. Get an email saying that your workflow was blocked due to throttling

Expected Results

I should be able to have a hundred parallel pipelines all decide to fire a message at Teams simultaneously. The plugin should handle the flow control so that Teams is not overwhelmed.

Actual Results

Too many pipelines messaging at once, and I get an email about throttling instead of the team getting a message about their build completion.

Anything else?

No response

Are you interested in contributing a fix?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions