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



##########
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:
       @sijie ok. I open issue #9081 for adding the validation when uploading a 
package and will do it in another PR.
   Can we merge this PR first? Because this PR will allow us to use the package 
name to create functions.




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