You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "divya-nsurely (via GitHub)" <gi...@apache.org> on 2023/08/04 07:01:28 UTC

[GitHub] [pulsar] divya-nsurely opened a new issue, #20930: Error: Package Metadata Conflict When Recreating a Function with the Same Name

divya-nsurely opened a new issue, #20930:
URL: https://github.com/apache/pulsar/issues/20930

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
   
   
   ### Version
   
   Pulsar Version : 2.11.1
   
   ### Minimal reproduce step
   
   The issue is related to creating and recreating functions within a development environment. The problem occurs when a function is initially created, subsequently deleted, and an attempt is made to recreate it using the same name. The error message received during the recreation attempt is as follows:
   
   "detail": "code: 500, message: {"reason":"Package 'function://orgGroup1/org1tets1/licenseplate@0' metadata already exists"}, serviceUrl: http://standalone:8080/admin/v3/functions/orgGroup1/org1tets1/licenseplate"
   
   ### What did you expect to see?
   
   Function creation should be successful.
   
   ### What did you see instead?
   
   "detail": "code: 500, message: {"reason":"Package 'function://orgGroup1/org1tets1/licenseplate@0' metadata already exists"}, serviceUrl: http://standalone:8080/admin/v3/functions/orgGroup1/org1tets1/licenseplate"
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] 1Jack2 commented on issue #20930: Error: Package Metadata Conflict When Recreating a Function with the Same Name

Posted by "1Jack2 (via GitHub)" <gi...@apache.org>.
1Jack2 commented on issue #20930:
URL: https://github.com/apache/pulsar/issues/20930#issuecomment-1676304302

   Package is **not** deleted when a related function is deleted If `functionsWorkerEnablePackageManagement=true`
   
   Related to
   
   https://github.com/apache/pulsar/issues/19721#issuecomment-1465273626
   
   https://github.com/apache/pulsar/issues/17982
   
   https://github.com/apache/pulsar/issues/18973#issuecomment-1458304726


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Error: Package Metadata Conflict When Recreating a Function with the Same Name [pulsar]

Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat commented on issue #20930:
URL: https://github.com/apache/pulsar/issues/20930#issuecomment-6381738426

   Confirmed on current master when the function worker runs with `functionsWorkerEnablePackageManagement=true`. On create, the worker uploads the code as `function://<tenant>/<ns>/<name>@<version>`, and the version starts again at 0 for a new function (`pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/ComponentImpl.java` lines 307-312). Deleting the function intentionally leaves that managed package in place (`deleteComponentFromStorage`, lines 519-525, behavior from https://github.com/apache/pulsar/pull/18030). Creating it again under the same name therefore fails with `Package '...@0' metadata already exists` (`PackagesManagementImpl.java` line 236). #18030 made keeping the package on delete a deliberate choice, so maintainers need to decide how a re-create should handle the existing package. Workaround until then: delete the package with `pulsar-admin packages delete function://<tenant>/<ns>/<name>@0` before re-creating the function.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] github-actions[bot] commented on issue #20930: Error: Package Metadata Conflict When Recreating a Function with the Same Name

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #20930:
URL: https://github.com/apache/pulsar/issues/20930#issuecomment-1716810946

   The issue had no activity for 30 days, mark with Stale label.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org