Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflows: actor ID should not use the # character (Workflows not working with Cosmos DB) #6156

Closed
ItalyPaleAle opened this issue Mar 29, 2023 · 4 comments · Fixed by #6218 or #6294
Closed
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@ItalyPaleAle
Copy link
Contributor

ItalyPaleAle commented Mar 29, 2023

In what area(s)?

/area runtime

What version of Dapr?

1.10.x
master

Description

This issue was originally reported by @mPyKen here:

When Workflows creates the actor ID, it includes a # in the name: dapr/components-contrib#2071 (comment)

https://github.com/dapr/dapr/blob/beef33d04f9528e312fe5d71ab6318a9c0728830/pkg/runtime/wfengine/workflow.go#L466-L470

This makes Workflows not usable with certain state stores such as Cosmos DB.

After discussing with @cgillum offline, we think the best approach may be to change how actor IDs are named by workflows, using a different character. This will be a breaking change (on an alpha building block), but because the # is not commonly used, we are unsure what other issues may appear.

@ItalyPaleAle ItalyPaleAle added the kind/bug Something isn't working label Mar 29, 2023
@mPyKen
Copy link

mPyKen commented Mar 31, 2023

It would be nice if the delimiter was configurable on any state store when enabling actorStateStore. That way it would still be backwards compatible. You never know which database accepts which characters or when users actually want to use those reserved characters (e.g. in a workflow name)

  - name: actorStateStore
    value: "true"
  - name: actorStateStoreReservedCharacters
    value: "|#" # probably better to split this into multiple variables

@ItalyPaleAle
Copy link
Contributor Author

I would err on the side of caution and just avoid using any character that is not a-z0-9-_, so the burden is not on the user to configure this

@cgillum
Copy link
Contributor

cgillum commented Apr 26, 2023

Hi @artursouza. Can we reopen this issue? The PR that closed it didn't fully resolve the problem. I realized there are still cases where we might use # in the actor ID - specifically, we need to update some internal code in workflow.go.

@artursouza artursouza reopened this Apr 26, 2023
@artursouza
Copy link
Member

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
6 participants