Repository navigation
Support create and update source with package name - #8988
Conversation
--- Master Issue: apache#8676 *Motivation* We have a new package management service that can manage all the source packages. We can use that in the Pulsar Source to manage source pakcages. *Modifications* - Support create and update source with package name - Add test for this
|
/pulsarbot run-failure-checks |
|
@codelipenghui @wolfstudy @sijie @jiazhai Please take a look when you have time. Thanks. |
| return Arrays.stream(PackageType.values()).anyMatch(type -> destPkgUrl.startsWith(type.toString())); | ||
| } | ||
|
|
||
| private File downloadPackageFile(String packageName) throws IOException, PulsarAdminException { |
There was a problem hiding this comment.
Why do we need to download the package?
There was a problem hiding this comment.
If we provide a pkgUrl for creating or updating the functions, the function worker has some pre-check of the packages
There was a problem hiding this comment.
You need to validate the existence of the package. But I don't think you should download the package.
There was a problem hiding this comment.
Ideally, we validate the existence is enough. But that depends on we do the packages format check or function check when uploading a package to the package management service. Then we can remove the checks for the functions which are using the package name to register. But for now, we still need to rely on those checks in the function's code.
I looked into the creation of the function. I saw if a function provided with a packageUrl, it will download the package and save it as a temp file and do some checks with it. And also it always passes a File as the parameter for the method call.
If we don't download the packages files, we may need to change the existing register function logic.
There was a problem hiding this comment.
@sijie Please take a look when you have time. Thanks.
There was a problem hiding this comment.
@zymap The purpose of introducing a package registry is to avoid checking the packages every time when you create a function using this package. If we need to validate the function package in the package registry, let's add the functionality there.
Master Issue: #8676
Motivation
We have a new package management service that can manage all
the source packages. We can use that in the Pulsar Source to manage
source packages.
I reuse the 'packageUrl' for downloading the package from the packages
management service. So user can use the package name as the 'packageUrl'
to download it.
Modifications