Skip to content

PHP Server health returns 500 on MariaDB (ONLY_FULL_GROUP_BY in task queue build-id snapshot) #569

Open

Description

@rmcdaniel

On MariaDB, GET /api/system/health returns 500 once a namespace has an open workflow task in a task queue with registered workers.

Evidence

Published PHP Server 2.5.14 (ghcr.io/durable-workflow/server@sha256:28fa0f39…), DB_CONNECTION=mysql against MariaDB 10.11 with the image's default SQL mode. The operator-metrics scenario on #562 (one run, one activity) returns 200 for operator-metrics at every stage. health returns 200 until the activity is scheduled, then 500 at every later stage:

SQLSTATE[42000]: Syntax error or access violation: 1055 '<db>.workflow_tasks.compatibility' isn't in GROUP BY
select `workflow_tasks`.`status`, COALESCE(NULLIF(TRIM(workflow_tasks.compatibility), ''), NULLIF(TRIM(workflow_runs.compatibility), '')) as effective_compatibility, COUNT(*) as task_count
from `workflow_tasks` left join `workflow_runs` on `workflow_runs`.`id` = `workflow_tasks`.`workflow_run_id`
where ... group by `workflow_tasks`.`status`, COALESCE(NULLIF(TRIM(workflow_tasks.compatibility), ''), NULLIF(TRIM(workflow_runs.compatibility), ''))

The same scenario passes on MySQL 8.0, MySQL 8.4, PostgreSQL 17 and SQLite. MariaDB does not treat the repeated COALESCE expression in GROUP BY as covering the selected one under ONLY_FULL_GROUP_BY.

The query is still on current main, in App\Support\TaskQueueBuildIdRolloutSnapshot::pendingWorkflowTaskCountsForTaskQueue.

Expected

The health document answers on MariaDB as on the other supported databases.

Native

The native server answers 200 at every stage on MariaDB. The shared operator-metrics fixture accepts this published PHP 500 only for PHP on MariaDB, and only after an activity exists, until a published PHP release no longer has it.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions