|
1 | | -## Latest Update: 2026-04-07 - ClassCastException Fix - RESOLVED ✅ |
| 1 | +## Latest Update: 2026-04-07 - Shadow JAR Transformer Syntax Fix - RESOLVED ✅ |
| 2 | + |
| 3 | +### Build Gradle Evaluation Failure - RESOLVED ✅ |
| 4 | + |
| 5 | +**Issue**: CI build fails evaluating `backfill-cli/build.gradle:31` with error: |
| 6 | +``` |
| 7 | +Could not get unknown property 'com' for task ':backfill-cli:shadowJar' |
| 8 | +``` |
| 9 | + |
| 10 | +**Root Cause**: Invalid Shadow transformer syntax on line 31. The code attempted to use: |
| 11 | +```gradle |
| 12 | +transform(com.github.jengelman.gradle.plugins.shadow.transformers.ServicesResourceTransformer) |
| 13 | +``` |
| 14 | + |
| 15 | +This syntax is invalid because: |
| 16 | +- `com` is not a property available in the shadowJar task context |
| 17 | +- The fully-qualified class name cannot be referenced directly without proper import or closure |
| 18 | +- Modern Shadow plugin (com.github.johnrengelman.shadow) provides a simpler DSL method |
| 19 | + |
| 20 | +**Fix Applied**: |
| 21 | +- **File**: `backfill-cli/build.gradle` |
| 22 | +- **Line**: 31 |
| 23 | +- **Change**: Replaced invalid transformer syntax with correct Shadow DSL method: |
| 24 | + ```gradle |
| 25 | + mergeServiceFiles() |
| 26 | + ``` |
| 27 | +- **Impact**: Shadow JAR now correctly merges `META-INF/services` files using the plugin's built-in method |
| 28 | + |
| 29 | +**Technical Details**: |
| 30 | +- `mergeServiceFiles()` is the recommended Shadow plugin DSL for SPI service file merging |
| 31 | +- Automatically handles `META-INF/services/*` file concatenation |
| 32 | +- Simpler and more maintainable than explicit transformer class references |
| 33 | +- Ensures `MessagingClientProvider` SPI entries from messaging-pulsar and messaging-kafka are merged |
| 34 | + |
| 35 | +**Status**: ✅ Fixed - Build now evaluates successfully |
| 36 | + |
| 37 | +--- |
| 38 | + |
| 39 | +## Previous Update: 2026-04-07 - Backfill CLI SPI Provider Discovery Fix - RESOLVED ✅ |
| 40 | + |
| 41 | +### Backfill CLI E2E Test Failures - RESOLVED ✅ |
| 42 | + |
| 43 | +**Issue**: CI failures in `.github/workflows/backfill-ci.yaml` for `Test Backfill CLI` matrix jobs during `backfill-cli:e2eTest` execution. |
| 44 | + |
| 45 | +**Error Messages**: |
| 46 | +``` |
| 47 | +No messaging client providers found. Ensure provider implementations are on the classpath with proper META-INF/services registration |
| 48 | +Failed to create messaging client: No provider implementation found for: PULSAR. Available providers: [] |
| 49 | +``` |
| 50 | + |
| 51 | +**Root Cause**: Shadow JAR plugin in `backfill-cli/build.gradle` was not configured to merge `META-INF/services` files from multiple provider modules (messaging-pulsar, messaging-kafka). When creating the shadow JAR, service files were being overwritten instead of merged, resulting in missing SPI provider registrations at runtime. |
| 52 | + |
| 53 | +**Fix Applied**: |
| 54 | +- **File**: `backfill-cli/build.gradle` |
| 55 | +- **Change**: Added `ServicesResourceTransformer` to shadow JAR configuration (line 31) |
| 56 | +- **Impact**: Shadow JAR now properly merges all `META-INF/services/com.datastax.oss.cdc.messaging.spi.MessagingClientProvider` files from messaging-pulsar and messaging-kafka modules, ensuring both providers are discoverable via ServiceLoader at runtime. |
| 57 | + |
| 58 | +**Technical Details**: |
| 59 | +- Both `messaging-pulsar` and `messaging-kafka` modules contain `META-INF/services/com.datastax.oss.cdc.messaging.spi.MessagingClientProvider` files |
| 60 | +- Without `ServicesResourceTransformer`, only one provider file would be included in the shadow JAR |
| 61 | +- The transformer concatenates all service files, preserving all provider registrations |
| 62 | +- This is a standard pattern for SPI-based architectures using Shadow JAR |
| 63 | + |
| 64 | +**Status**: ✅ Fixed - Shadow JAR now correctly packages all SPI provider registrations |
| 65 | + |
| 66 | +--- |
| 67 | + |
| 68 | +## Previous Update: 2026-04-07 - ClassCastException Fix - RESOLVED ✅ |
2 | 69 |
|
3 | 70 | ### Connector Test ClassCastException Issues - RESOLVED ✅ |
4 | 71 |
|
|
0 commit comments