Repository navigation
feat(QTDI-2410): Map lowercase plugin names to legacy plugin ids - #1297
ozhelezniak-talend wants to merge 3 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
95fdd47 to
bb8885a
Compare
80cd05b to
0559cd2
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>
0559cd2 to
2e78ea7
Compare
Only cosmos-db needs the lowercase to legacy id migration. Remove the other five entries from the mapping and their test assertions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The cached mapping remains empty when a renamed connector bundle is reloaded without restarting the JVM, causing cosmos-db to receive a new plugin ID and breaking existing IDs.
1 open issue
2 resolved since last review
Review effort: Balanced
| private static final Map<String, String> VALUES = | ||
| loadLegacyPluginIds(ContainerManager.class.getClassLoader()); |
There was a problem hiding this comment.
I think it's expected that we load it only once. That's was the idea.
I'm not sure that we have the functionality of reloading of the connectors.




Requirements
Why this PR is needed?
GitHub Packages only accepts lowercase Maven artifactIds. The cosmosDB connector is published as
cosmos-db, but its plugin id must staycosmosDB. 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).Scope
cosmos-db=cosmosDB.cosmos-dbartifact, but Studio handles the migration on its side and does not provideTALEND-INF/legacy-plugin-ids.properties. With no mapping file, the map is empty, so Studio ids do not change.What does this PR add (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. A missing file gives an empty map.BuildComponentM2RepositoryMojocopies the legacy ids into the m2 registry, and the server deploys each GAV once.Tests
ContainerManagerTest(12 tests),LegacyPluginIdsTest(3),MvnDependencyListLocalRepositoryResolverTest(4): all pass.BuildComponentM2RepositoryMojoTest(5): all pass.Rollout
This runtime must ship before the cosmos connector is renamed to
cosmos-db. Older runtimes derivecosmos-dband would change all ids.Open
pluginLocationGAV (becomes lowercase): not checked.dependencies.txt: not checked.AI generated code
https://internal.qlik.dev/general/ways-of-working/code-reviews/#guidelines-for-ai-generated-code