Skip to content

N°8856 - Async retries of WebRequest not working properly#31

Open
odain-cbd wants to merge 4 commits into
masterfrom
8856-retry
Open

N°8856 - Async retries of WebRequest not working properly#31
odain-cbd wants to merge 4 commits into
masterfrom
8856-retry

Conversation

@odain-cbd

Copy link
Copy Markdown
Contributor

Fix webhook async mecanism

@odain-cbd
odain-cbd requested review from Molkobain and jf-cbd July 15, 2026 08:49
@odain-cbd odain-cbd self-assigned this Jul 15, 2026
@odain-cbd odain-cbd added the bug Something isn't working label Jul 15, 2026
Copilot AI review requested due to automatic review settings July 15, 2026 08:49
@CombodoApplicationsAccount CombodoApplicationsAccount added the internal Work made by Combodo label Jul 15, 2026
@odain-cbd

Copy link
Copy Markdown
Contributor Author

@greptile-apps

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR targets the webhook asynchronous sending/retry mechanism, adjusting how web requests are sent (sync vs async) and how async task failures are reported, alongside a module version bump.

Changes:

  • Adjust singleton instantiation patterns in WebRequestService and WebRequestSender (switching to self / new self()), and add WebRequestSender::SetInstance() for injection.
  • Simplify WebRequestSender::Send() control flow to early-return for each send mode decision.
  • Update SendWebRequest::DoProcess() status handling, including throwing on error, and bump module version to 1.4.7.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
src/Service/WebRequestService.php Changes singleton instantiation to use self/new self() (impacts extension behavior).
src/Service/WebRequestSender.php Changes singleton instantiation to use self/new self(), adds SetInstance(), and simplifies send-mode branching.
SendWebRequest.php Adjusts async task processing result handling; throws an exception on send error and improves default status handling.
module.combodo-webhook-integration.php Bumps module version from 1.4.6 to 1.4.7.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 15 to 22
final public static function GetInstance(): WebRequestService
{
if (!isset(static::$oInstance)) {
static::$oInstance = new static();
if (!isset(self::$oInstance)) {
self::$oInstance = new self();
}

return static::$oInstance;
return self::$oInstance;
}
Comment on lines 72 to 84
public static function GetInstance()
{
if(static::$oInstance === null)
if(self::$oInstance === null)
{
static::$oInstance = new static();
self::$oInstance = new self();
}

return static::$oInstance;
return self::$oInstance;
}

public static function SetInstance(?WebRequestSender $oInstance) : void {
self::$oInstance = $oInstance;
}
Comment thread SendWebRequest.php
Comment thread SendWebRequest.php Outdated
@odain-cbd

Copy link
Copy Markdown
Contributor Author

@greptileai

@odain-cbd

Copy link
Copy Markdown
Contributor Author

@Molkobain

Copy link
Copy Markdown
Member

https://github.com/greptileai

Greptile only works on the iTop repo for now as it needs to be activated manually by the provider on open source repos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working internal Work made by Combodo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants