You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I'm able to successfully deploy in Pulsar a Pulsar function that includes a ':' as part of its function name. When I later try to delete the function deployment, the Pulsar broker ends up crashing with an IllegalArgumentException in its log stating "Invalid format for fully qualified instance name: :". If the KubernetesRuntime is configured, this prevents deletion of the function's statefulset.
The bug can be found in the class org.apache.pulsar.function.utils.FunctionInstanceId within the pulsar-function-utils library -- it relies on a ':' as a delimiter to separate the function name from the instance id, and in so doing assumes that there can only be at most one ':' in the function name.
This has been observed on both Pulsar 2.6.0 and Pulsar 2.7.0.
To Reproduce
Steps to reproduce the behavior:
Use pulsar-admin to deploy a function. Specify a function name that includes a ':'. Example:
Wait until the function is running, then try to delete the function. Example:
pa functions delete --fqfn platform/passthrough2/test:input:filter
Check the status of whichever broker received the request to remove the function instance. You should see evidence of a crash. In the logs you'll see the following message:
java.lang.IllegalArgumentException: Invalid format for fully qualified instance name: platform/passthrough2/test:input:filter
Expected behavior
Since pulsar accepts a function name that includes ':' during creation, it should support it during deletion as well.
Additional context
Pull request incoming...
The text was updated successfully, but these errors were encountered:
Fixes#9946
### Motivation
I'm able to successfully deploy in Pulsar a Pulsar function that includes a ':' as part of its function name. When I later try to delete the function deployment, the Pulsar broker ends up crashing with an IllegalArgumentException in its log stating "Invalid format for fully qualified instance name: :". If the KubernetesRuntime is configured, this prevents deletion of the function's statefulset.
Since pulsar accepts a function name that includes ':' during creation, it should support it during deletion as well.
### Modifications
- Changed org.apache.pulsar.functions.utils.FunctionInstanceId constructor to split on the last colon in the function name, so that it both retrieves the instanceId and tolerates the presence of colons in the function name
- Added unit test org.apache.pulsar.functions.utils.FunctionInstanceIdTest to validate parsing
Describe the bug
I'm able to successfully deploy in Pulsar a Pulsar function that includes a ':' as part of its function name. When I later try to delete the function deployment, the Pulsar broker ends up crashing with an IllegalArgumentException in its log stating "Invalid format for fully qualified instance name: :". If the KubernetesRuntime is configured, this prevents deletion of the function's statefulset.
The bug can be found in the class org.apache.pulsar.function.utils.FunctionInstanceId within the pulsar-function-utils library -- it relies on a ':' as a delimiter to separate the function name from the instance id, and in so doing assumes that there can only be at most one ':' in the function name.
This has been observed on both Pulsar 2.6.0 and Pulsar 2.7.0.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Since pulsar accepts a function name that includes ':' during creation, it should support it during deletion as well.
Additional context
Pull request incoming...
The text was updated successfully, but these errors were encountered: