Skip to content

allow_development_packages does not fix DISPATCHER_MISSING_REQUIRED_PACKAGE — HAProxyApplyDispatcher was missed in #877 fix #905

@geopoliticus

Description

@geopoliticus

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

  1. Install pfSense-pkg-haproxy-devel (not the standard pfSense-pkg-haproxy)
  2. Install pfSense-pkg-RESTAPI v2.8.0
  3. Navigate to System > REST API > Settings > Advanced Settings, enable Allow Development Packages, and save
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions