Describe the bug
Commit 7c7da25 added the allow_development_packages setting which correctly fixes the package check in Core/Model.inc. But, Dispatchers/HAProxyApplyDispatcher.inc has its own separate $required_packages check that was not updated and is unaffected by the setting.
With allow_development_packages enabled and pfSense-pkg-haproxy-devel installed, POST /api/v2/services/haproxy/apply still returns:
{
"code": 424,
"response_id": "DISPATCHER_MISSING_REQUIRED_PACKAGE",
"message": "The requested action requires the `pfSense-pkg-haproxy` package but it is not installed."
}
The file still contains:
protected array $required_packages = ['pfSense-pkg-haproxy'];
This was identified in #877 (Dispatchers/HAProxyApplyDispatcher.inc:13) but was not included in the fix. The Core/Dispatcher.inc package check logic also needs to respect the allow_development_packages setting, the same way Core/Model.inc now does.
To Reproduce
- Install pfSense-pkg-haproxy-devel (not the standard pfSense-pkg-haproxy)
- Install pfSense-pkg-RESTAPI v2.8.0
- Navigate to System > REST API > Settings > Advanced Settings, enable Allow Development Packages, and save
- Make a POST request to
/api/v2/services/haproxy/apply
** Expected behavior**
The request should work. allow_development_packages is enabled and the -devel variant of the required package is installed, so the dependency check should pass — consistent with how Core/Model.inc now behaves after the fix in #877.
Response
{
"code": 424,
"status": "failed dependency",
"response_id": "DISPATCHER_MISSING_REQUIRED_PACKAGE",
"message": "The requested action requires the `pfSense-pkg-haproxy` package but it is not installed.",
"data": []
}
pfSense Version & Package Version:
- pfSense Version: 26.03.1-RELEASE
- Package Version: v2.8.0
Affected Endpoints:
Additional context
Issue #877 correctly identified Dispatchers/HAProxyApplyDispatcher.inc:13 as one of the affected files, but commit 7c7da25 only updated Core/Model.inc. The Dispatcher has its own independent $required_packages check that is not gated by the allow_development_packages setting. The Model layer is fixed; the Dispatcher layer is not.
Issue #877 's local workaround now only needs to update the dispatcher.
Describe the bug
Commit 7c7da25 added the
allow_development_packagessetting which correctly fixes the package check inCore/Model.inc. But,Dispatchers/HAProxyApplyDispatcher.inchas its own separate$required_packagescheck that was not updated and is unaffected by the setting.With
allow_development_packagesenabled and pfSense-pkg-haproxy-devel installed, POST /api/v2/services/haproxy/apply still returns:The file still contains:
protected array $required_packages = ['pfSense-pkg-haproxy'];This was identified in #877 (
Dispatchers/HAProxyApplyDispatcher.inc:13) but was not included in the fix. TheCore/Dispatcher.incpackage check logic also needs to respect theallow_development_packagessetting, the same wayCore/Model.incnow does.To Reproduce
/api/v2/services/haproxy/apply** Expected behavior**
The request should work.
allow_development_packagesis enabled and the-develvariant of the required package is installed, so the dependency check should pass — consistent with howCore/Model.incnow behaves after the fix in #877.Response
pfSense Version & Package Version:
Affected Endpoints:
/api/v2/services/haproxy/applyAdditional context
Issue #877 correctly identified
Dispatchers/HAProxyApplyDispatcher.inc:13as one of the affected files, but commit 7c7da25 only updatedCore/Model.inc. The Dispatcher has its own independent$required_packagescheck that is not gated by theallow_development_packagessetting. The Model layer is fixed; the Dispatcher layer is not.Issue #877 's local workaround now only needs to update the dispatcher.