feat(QTDI-1914): Sample dynamic schema connector.#1114
feat(QTDI-1914): Sample dynamic schema connector.#1114ypiel-talend wants to merge 66 commits intomasterfrom
Conversation
…ement, better clazz location.
…l loaded... to continue...
…:Talend/component-runtime into ypiel/QTDI-1914_sample_connector_dyndeps
# sample-parent/sample-features/dynamic-dependencies/dynamic-dependencies-common/src/main/java/org/talend/sdk/component/sample/feature/dynamicdependencies/config/Dependency.java # sample-parent/sample-features/dynamic-dependencies/dynamic-dependencies-common/src/main/java/org/talend/sdk/component/sample/feature/dynamicdependencies/service/AbstractDynamicDependenciesService.java
…st log + add an error messae in returned strings.
…SPI is not loaded.
…Don't fail if SPI can't be loaded.
…to transmit its dynamic dependencies.
…hSPI connector output records.
…cy-common module.
There was a problem hiding this comment.
Pull request overview
This PR adds a comprehensive sample connector module demonstrating dynamic dependency loading capabilities. The implementation showcases how to use the @DynamicDependencies annotation with various configuration types (datastore, dataset, and custom configuration) and validates SPI loading from different dependency scopes.
Changes:
- Added new
dynamic-dependenciesmodule with multiple sample connectors demonstrating@DynamicDependenciesfeature - Introduced
DynamicDependenciesConfigurationannotation for marking configuration types that compute dynamic dependencies - Created supporting modules for SPI testing and classloader validation
Reviewed changes
Copilot reviewed 99 out of 110 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| sample-parent/sample-features/pom.xml | Added dynamic-dependencies module to the build |
| component-api/src/main/java/.../DynamicDependenciesConfiguration.java | New annotation for marking dynamic dependency configuration types |
| sample-parent/sample-features/dynamic-dependencies/pom.xml | Parent POM defining the dynamic-dependencies module structure |
| sample-parent/sample-features/dynamic-dependencies/README.md | Comprehensive documentation explaining the dynamic dependencies feature and test scenarios |
| sample-parent/sample-features/dynamic-dependencies/*/pom.xml | Module-specific POM files for various sample connectors |
| sample-parent/sample-features/dynamic-dependencies//src/main/java/**/.java | Implementation classes for sample connectors, services, and configuration |
| sample-parent/sample-features/dynamic-dependencies//src/test/java/**/.java | Test classes validating dynamic dependency loading |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...nt/sample/feature/dynamicdependencies/withspi/input/DynamicDependenciesWithSPIInputTest.java
Outdated
Show resolved
Hide resolved
.../main/java/org/talend/sdk/component/sample/feature/dynamicdependencies/config/Connector.java
Outdated
Show resolved
Hide resolved
...t/sample/feature/dynamicdependencies/withDynamicDependenciesConfiguration/config/Config.java
Outdated
Show resolved
Hide resolved
...dk/component/sample/feature/dynamicdependencies/withDataprepRunAnnotation/config/Config.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 99 out of 110 changed files in this pull request and generated 11 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...ponent/sample/feature/loadinganalysis/withspi/service/DynamicDependenciesWithSPIService.java
Show resolved
Hide resolved
...alend/sdk/component/sample/feature/loadinganalysis/withspi/service/CustomizeClassLoader.java
Outdated
Show resolved
Hide resolved
...alend/sdk/component/sample/feature/loadinganalysis/withspi/service/CustomizeClassLoader.java
Outdated
Show resolved
Hide resolved
...ponent/sample/feature/loadinganalysis/withspi/service/DynamicDependenciesWithSPIService.java
Show resolved
Hide resolved
...ponent/sample/feature/loadinganalysis/withspi/service/DynamicDependenciesWithSPIService.java
Show resolved
Hide resolved
.../sample/feature/loadinganalysis/classloadertestlibrary/spiConsumers/AbstractSPIConsumer.java
Outdated
Show resolved
Hide resolved
...sdk/component/sample/feature/loadinganalysis/service/AbstractDynamicDependenciesService.java
Outdated
Show resolved
Hide resolved
...ciesConfiguration/service/DynamicDependenciesWithDynamicependenciesConfigurationService.java
Outdated
Show resolved
Hide resolved
...feature/loadinganalysis/withDataprepRunAnnotation/annotation/DynamicDependencySupported.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 99 out of 110 changed files in this pull request and generated 12 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...ponent/sample/feature/loadinganalysis/withspi/service/DynamicDependenciesWithSPIService.java
Show resolved
Hide resolved
...ponent/sample/feature/loadinganalysis/withspi/service/DynamicDependenciesWithSPIService.java
Outdated
Show resolved
Hide resolved
...ple/feature/loadinganalysis/serviceproviderfromdependency/ServiceProviderFromDependency.java
Show resolved
Hide resolved
...inganalysis/serviceproviderfromexternaldependency/ServiceProviderFromExternalDependency.java
Show resolved
Hide resolved
...ample/feature/loadinganalysis/classloadertestlibrary/spiConsumers/DependencySPIConsumer.java
Outdated
Show resolved
Hide resolved
...sdk/component/sample/feature/loadinganalysis/service/AbstractDynamicDependenciesService.java
Outdated
Show resolved
Hide resolved
| </parent> | ||
|
|
||
| <!-- All artifacts with group starting by 'org.talend.sdk.component' are automatically excluded --> | ||
| <!-- So we changed the group to org.talend.sdk.sample --> |
There was a problem hiding this comment.
These comments say the group was changed to org.talend.sdk.sample, but the module inherits groupId from org.talend.sdk.component.loading-analysis (and the artifactId remains under that group). Please update/remove the comment to reflect the current POM structure to avoid confusion.
| <!-- So we changed the group to org.talend.sdk.sample --> | |
| <!-- This module now inherits its groupId from the parent (org.talend.sdk.component.loading-analysis). --> |
|
|
||
| The `loading-analysis` module provides several TCK connector plugins designed to validate the `@DynamicDependencies` feature integration, at design time and runtime. It contains several connectors organized into two categories: | ||
|
|
||
| - Firsts are connectors with a service that inherits `AbstractDynamicDependenciesService` and that check: |
There was a problem hiding this comment.
There are several typos in the README (e.g., Firsts, connnector's, exemple). Fixing these improves readability and keeps the sample documentation professional.
There was a problem hiding this comment.
@copilot open a new pull request to apply changes based on this feedback
| - artifactId: data-generator | ||
| - version: 1.2512.0 | ||
| - connector's family: DataGenerator | ||
| - connnector's name: DataGeneratorInput |
There was a problem hiding this comment.
There are several typos in the README (e.g., Firsts, connnector's, exemple). Fixing these improves readability and keeps the sample documentation professional.
| | comment | Check static dependency. | | ||
| +-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ||
| ``` | ||
| In this exemple we can see that we try to load the class `org.talend.sdk.component.sample.feature.loadinganalysis.config.Dependency` from the dependency `org.talend.sdk.component.loading-analysis:loading-dependencies-common`. |
There was a problem hiding this comment.
There are several typos in the README (e.g., Firsts, connnector's, exemple). Fixing these improves readability and keeps the sample documentation professional.
|
@ypiel-talend I've opened a new pull request, #1166, to work on those changes. Once the pull request is ready, I'll request review from you. |
* Initial plan * Fix typos in loading-analysis README.md Co-authored-by: ypiel-talend <29707101+ypiel-talend@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ypiel-talend <29707101+ypiel-talend@users.noreply.github.com>
…:Talend/component-runtime into ypiel/QTDI-1914_sample_connector_dyndeps

Requirements
https://qlik-dev.atlassian.net/browse/QTDI-1914
Why this PR is needed?
What does this PR adds (design/code thoughts)?