Throw IllegalArgumentException when find multiple connector jar for one pluginIdentifier#5551
Merged
ic4y merged 1 commit intoSep 28, 2023
Conversation
d972566 to
05a4698
Compare
FlechazoW
approved these changes
Sep 26, 2023
Member
05a4698 to
5a2847a
Compare
Member
Author
Hisoka-X
reviewed
Sep 26, 2023
| final String pluginType = pluginIdentifier.getPluginType().toLowerCase(); | ||
| final String pluginName = pluginIdentifier.getPluginName().toLowerCase(); | ||
| if (!pluginConfig.hasPath(engineType)) { | ||
| if (pluginMappingConfig.isEmpty() || !pluginMappingConfig.hasPath(engineType)) { |
Member
There was a problem hiding this comment.
Any reason for add pluginMappingConfig.isEmpty() condition? I think if pluginMappingConfig.isEmpty() is true, the !pluginMappingConfig.hasPath(engineType) is true too?
Comment on lines
+68
to
+85
| @AfterEach | ||
| public void after() throws IOException { | ||
| for (Path pluginJar : pluginJars) { | ||
| Files.deleteIfExists(pluginJar); | ||
| } | ||
| } |
c571ee6 to
a31ba69
Compare
…ne pluginIdentifier
a31ba69 to
71fed74
Compare
Hisoka-X
approved these changes
Sep 28, 2023
ic4y
approved these changes
Sep 28, 2023
gnehil
pushed a commit
to gnehil/seatunnel
that referenced
this pull request
Oct 12, 2023
…ne pluginIdentifier (apache#5551)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


Purpose of this pull request
Right now, we use prefix match to find the target connector, if we have two plugin jars has the same prefix, then the first one will be used, this may cause problems in some cases. So it's needed to throw an exception if we find two plugin jars for a given plugin.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Add UT to test this.
Check list
New License Guide
release-note.