-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix][functions] Fix the download of builtin Functions #17877
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eolivelli
approved these changes
Sep 28, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
it would be great to add some tests
nicoloboschi
approved these changes
Sep 29, 2022
nicoloboschi
pushed a commit
to datastax/pulsar
that referenced
this pull request
Sep 29, 2022
(cherry picked from commit 603b5f9)
Yes of course. I tested it manually for now. I'll add tests for the download function in a subsequent PR. |
cbornet
force-pushed
the
functions-download
branch
from
September 29, 2022 09:16
603b5f9
to
03a0543
Compare
The download function was not considering the component type and only looking into the connectors dir. Also we were scanning the connectors dir instead of using the info from the ConnectorsManager. This change looks at the component type if the download function is called with tenant+ns+name to choose between the ConnectorsManager and the FunctionsManager to get the archive path. If the download function is called with a direct path, we look first into the ConnectorsManager then into the FunctionsManager.
cbornet
force-pushed
the
functions-download
branch
from
September 29, 2022 16:56
03a0543
to
e64931c
Compare
cbornet
requested review from
eolivelli and
nicoloboschi
and removed request for
eolivelli
September 29, 2022 21:39
Added some unit tests. PTAL again. |
nicoloboschi
approved these changes
Sep 30, 2022
cbornet
added a commit
to cbornet/pulsar
that referenced
this pull request
Nov 24, 2022
cbornet
added a commit
to cbornet/pulsar
that referenced
this pull request
Nov 24, 2022
cbornet
added a commit
to cbornet/pulsar
that referenced
this pull request
Nov 24, 2022
cbornet
added a commit
that referenced
this pull request
Nov 25, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
When
uploadBuiltinSinksSources
is set to false (non-default), the download function is not considering the component type and only looking into the connectors dir.Also we are scanning the connectors dir instead of using the info from the ConnectorsManager.
Modifications
This change looks at the component type if the download function is called with tenant+ns+name to choose between the ConnectorsManager and the FunctionsManager to get the archive path.
If the download function is called with a direct path, we look first into the ConnectorsManager then into the FunctionsManager.
Verifying this change
This change added tests and can be verified as follows:
FunctionApiV3ResourceTest
Does this pull request potentially affect one of the following parts:
no
If the box was checked, please highlight the changes
Documentation
doc-required
(Your PR needs to update docs and you will update later)
doc-not-needed
fix
doc
(Your PR contains doc changes)
doc-complete
(Docs have been already added)
Matching PR in forked repository
PR in forked repository: cbornet#2