Skip to content

dapr workflow list returns unknown driver when mysql state store is used #1568

@johansja

Description

@johansja

Expected Behavior

dapr workflow list returns the workflows listing even when MySQL is used.

Actual Behavior

Gotten this error when I'm using the command (with some inputs masked):

> dapr workflow list -a <app-id> -k -n ai -c "<mysql connection string>"
Error: sql: unknown driver "mysql" (forgotten import?)
Usage:
  dapr workflow list [flags]

Aliases:
  list, ls

Flags:
  -c, --connection-string string   The connection string used to connect and authenticate to the actor state store
  -m, --filter-max-age string      Filter only the workflows started within the given duration or timestamp. Examples: 300ms, 1.5h or 2h45m, 2023-01-02T15:04:05 or 2023-01-02
  -w, --filter-name string         Filter only the workflows with the given name
  -s, --filter-status string       Filter only the workflows with the given runtime status. One of RUNNING, COMPLETED, CONTINUED_AS_NEW, FAILED, CANCELED, TERMINATED, PENDING, SUSPENDED
  -h, --help                       help for list
  -o, --output string              Output format. One of short, wide, yaml, json (default "short")
  -t, --table-name string          The name of the table or collection which is used as the actor state store

Global Flags:
  -a, --app-id string         The app ID owner of the workflow instance
  -k, --kubernetes            Target a Kubernetes dapr installation
      --log-as-json           Log output in JSON format
  -n, --namespace string      Namespace to perform workflow operation on (default "default")
      --runtime-path string   The path to the dapr runtime installation directory

sql: unknown driver "mysql" (forgotten import?)

Steps to Reproduce the Problem

  1. Setup Dapr inside Kubernetes cluster with MySQL state store.
  2. Use the tool to list workflows.

Release Note

RELEASE NOTE: Support MySQL state store in dapr workflow command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions