-
Notifications
You must be signed in to change notification settings - Fork 357
Description
In what area(s)?
/area runtime
What version of Dapr?
1.15.3
Expected Behavior
An actor ID that is valid for actor creation should also be accepted as valid for creating actor reminders.
Actual Behavior
Creating an actor reminder with a valid actor ID fails when the actor ID contains characters that are not compliant with RFC 1123.
The actor can be created with the following ID : Hexalith-PipeConnectionType-BSTF%E2%8C%80400
But the reminder will fail.
Exception encountered:
Dapr.DaprApiException: 'error creating actor reminder: rpc error: code = Unknown desc = job name is invalid "actorreminder||default||PipeConnectionTypeAggregate||HexalithPipeConnectionTypePVC8⌀250||ContinuePublish": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')'
For example, an actor managing users identified by email (e.g., [email protected]
) will have the actor ID sanitized to john.doe%40dapr.com
, which works correctly for actor creation but fails when setting actor reminders.
This behavior is a regression introduced in version 1.15.3, as previous versions supported such sanitized actor IDs for reminders.
Steps to Reproduce the Problem
- Create an actor with an ID containing characters not compliant with RFC 1123 (e.g.,
[email protected]
). - Attempt to create a reminder for this actor.
Release Note
Actor reminder identifiers should adhere to the same constraints as actor IDs to avoid unexpected validation errors.
I initially posted this issue in Dapr/Dapr but it seems that RFC 1123 should apply only for APP-ID, not on actor reminder ID. The SDK should check that the actor ID is a valid RFC1123.
dapr/dapr#8559