zymap commented on a change in pull request #8988:
URL: https://github.com/apache/pulsar/pull/8988#discussion_r547965564



##########
File path: 
pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/SourcesImpl.java
##########
@@ -719,4 +728,14 @@ public SourceConfig getSourceInfo(final String tenant,
                 worker().getWorkerConfig().getValidateConnectorConfig());
         return SourceConfigUtils.convert(sourceConfig, sourceDetails);
     }
+
+    private static boolean hasPackageTypePrefix(String destPkgUrl) {
+        return Arrays.stream(PackageType.values()).anyMatch(type -> 
destPkgUrl.startsWith(type.toString()));
+    }
+
+    private File downloadPackageFile(String packageName) throws IOException, 
PulsarAdminException {

Review comment:
       If we provide a pkgUrl for creating or updating the functions, the 
function worker has some pre-check of the packages 
   
https://github.com/apache/pulsar/blob/c17253b3b43c36250ba106dd7a17f35f64f546e5/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/FunctionsImpl.java#L744




----------------------------------------------------------------
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.

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


Reply via email to