Repository navigation
feat(QTDI-2410): Map lowercase plugin names to legacy plugin ids - #1297
ozhelezniak-talend wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The forced-ID Maven plugin path does not yet apply the legacy mapping, and mapping coverage is incomplete.
1 open issue
What changed in this PR
This pull request preserves legacy plugin IDs when connector artifact names are renamed to lowercase for Maven publication.
Changes:
- Adds a properties-based mapping from lowercase artifact names to historical plugin IDs.
- Applies mappings to IDs derived from Maven coordinates and JAR filenames.
- Adds unit coverage for representative remapped and unchanged plugin names.
| File | Description |
|---|---|
container/container-core/src/test/java/org/talend/sdk/component/ContainerManagerTest.java |
Tests filename and GAV-based legacy ID remapping and unchanged plugin behavior. |
container/container-core/src/main/resources/TALEND-INF/legacy-plugin-ids.properties |
Defines lowercase artifact-to-legacy-ID compatibility mappings. |
container/container-core/src/main/java/org/talend/sdk/component/container/ContainerManager.java |
Loads and applies legacy mappings during automatic plugin ID derivation. |
Review effort: Lite
|
For the cloud, the same mapping is provided by Talend/connectors#74: |
2770ee1 to
eac0ef2
Compare
3d95b7f to
2399eca
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The legacy-ID mapping is missing from the production JAR, and its keys omit the advertised lowercase artifact IDs, so renamed connectors still receive incompatible plugin IDs.
2 open issues
1 resolved since last review
Review effort: Balanced
1f4796b to
a411ca3
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Registry merging can retain conflicting entries that cause duplicate-container failures, while mappings in constructor- or server-configured repository roots are ignored, changing renamed connector IDs.
2 open issues
2 resolved since last review
Review effort: Balanced
| if (existing != null && !existing.equals(gav)) { | ||
| getLog() | ||
| .warn("Legacy plugin id '" + legacyId + "' of '" + name + "' is already registered for '" | ||
| + existing + "', it is not overwritten"); | ||
| return; |
There was a problem hiding this comment.
I think we are fine with it.
test: org.talend.sdk.component.maven.BuildComponentM2RepositoryMojoTest#collidingLegacyIdIsNotOverwritten
if in the classpath we have both: cosmos-db and cosmosDB -> no harm to use cosmosDB.
shouldn't be possible in our use-case
| final String m2 = System.getProperty(M2_REPOSITORY_PROPERTY); | ||
| if (m2 != null && !m2.isBlank()) { | ||
| final Path file = Paths.get(m2).resolve(M2_FILE_NAME); |
There was a problem hiding this comment.
I think we can take this risk.
it was done for previewrunner. Maybe we can have a better solution
95fdd47 to
bb8885a
Compare
bb8885a to
80cd05b
Compare
* from the m2 root * from the classloader * Legacy plugin ids add a second registry key for the same GAV, so the server deployed it twice and failed with 'Container already exists'. * GitHub Packages requires lowercase artifactIds, but plugin, family and component ids derive from the plugin name. Remap known lowercase names (cosmosdb -> cosmosDB, ...) in ContainerManager.buildAutoIdFromName so ids stay unchanged after a connector is renamed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Warn without overwriting on legacy id collision, document static loading constraint, extract distinctGavs and add tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
80cd05b to
0559cd2
Compare




Requirements
Why this PR is needed?
GitHub Packages only accepts lowercase Maven artifactIds, so connectors such as
cosmosDBhave to be published ascosmosdb. The plugin id is derived from the plugin name (jar filename or GAV artifactId), and family, component and config ids areBase64(plugin#...). Renaming would change every id and break existing jobs and pipelines (QTDI-2410).What does this PR adds (design/code thoughts)?
ContainerManager.buildAutoIdFromNameapplies alowercase name -> legacy plugin idmapping last, for both the GAV and the filename branch. All loaders go through it.TALEND-INF/legacy-plugin-ids.properties(cosmosdb, dataqualityrule, jsonvalidator, embeddingai, semanticmatch, neo4jimport). A missing file gives an empty map.ContainerManagerTest#legacyPluginIdsAreRemapped. Only container-core tests were run (ContainerManagerTest,MvnDependencyListLocalRepositoryResolverTest).cosmosdband change all ids.pluginLocationGAV (becomes lowercase), dataprepdependencies.txt, other loaders (Studio-embedded, remote-engine-customizer) not checked, no docs yet.AI generated code
https://internal.qlik.dev/general/ways-of-working/code-reviews/#guidelines-for-ai-generated-code