You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "DanielLeens (via GitHub)" <gi...@apache.org> on 2026/04/20 06:56:02 UTC

Re: [PR] [Feature][Engine][Checkpoint Storage] Add Kubernetes IRSA support for… [seatunnel]

DanielLeens commented on PR #10324:
URL: https://github.com/apache/seatunnel/pull/10324#issuecomment-4278480060

   Thanks for the continued work on this PR. I reviewed the latest code locally from branch `seatunnel-review-10324` at commit `e20e0896e9c12c3d8c870cd7d155a4b45da7f7cc`, against `upstream/dev` with merge base `9d58bc01ac2f97a6febf4766f5b8a2cfd1ed803d`.
   
   The feature is valuable: using IRSA for S3 checkpoint storage is the right user experience for SeaTunnel on EKS/Kubernetes. The main blocker I see is dependency packaging. The checkpoint module now compiles against a newer AWS SDK, but the distribution still declares the old AWS SDK bundle, which does not contain the WebIdentity provider used in the docs.
   
   ## What this PR solves
   
   - User pain point: users running Zeta on Kubernetes want S3 checkpoint storage to use IRSA instead of static access keys.
   - Fix approach: upgrade Hadoop S3A-related dependencies, document WebIdentity/Default credential providers, add provider enum values, and add an IRSA checkpoint test class.
   - In one sentence: the feature direction is right, but the runtime dependency set is still inconsistent, so the documented IRSA setup may not work in the actual distribution.
   
   Simple example: the docs now suggest:
   
   ```yaml
   fs.s3a.aws.credentials.provider: com.amazonaws.auth.WebIdentityTokenCredentialsProvider
   ```
   
   I checked the local Maven jars: `aws-java-sdk-bundle-1.12.770.jar` contains `com/amazonaws/auth/WebIdentityTokenCredentialsProvider.class`, but the distribution still declares `aws-java-sdk-bundle-1.11.271.jar`, and that jar does not contain the class.
   
   ## Complete runtime path
   
   ```text
   Zeta job start / restore
     -> Engine reads seatunnel.yaml
       -> checkpoint.storage.type = hdfs
       -> checkpoint.storage.plugin-config.storage.type = s3
       -> checkpoint.storage.plugin-config.s3.bucket = s3a://...
       -> checkpoint.storage.plugin-config.fs.s3a.aws.credentials.provider = ...
   
   Checkpoint storage initialization
     -> HdfsStorage.initStorage(configuration) [HdfsStorage.java:62-72]
       -> getConfiguration(configuration)
         -> FileConfiguration.valueOf("S3").getConfiguration()
           -> S3Configuration.buildConfiguration(config) [S3Configuration.java:61-77]
             -> hadoopConf.set(fs.defaultFS, s3.bucket)
             -> hadoopConf.set(fs.s3a.impl, org.apache.hadoop.fs.s3a.S3AFileSystem)
             -> setExtraConfiguration(..., "fs.s3a.")
               -> writes fs.s3a.aws.credentials.provider
       -> FileSystem.get(hadoopConf)
         -> loads S3AFileSystem
         -> loads the configured AWS credentials provider class
           -> WebIdentityTokenCredentialsProvider requires a newer AWS SDK bundle
           -> DefaultAWSCredentialsProviderChain must also be the newer chain if it is expected to use web identity
   
   Checkpoint write / restore
     -> storeCheckPoint(...)
       -> fs.create(tmpFilePath)
       -> fs.rename(tmpFilePath, filePath)
     -> getLatestCheckpoint(...)
       -> fs.listStatus / fs.open
     -> if the credentials provider cannot be loaded or cannot assume the role
       -> FileSystem.get or first S3A IO fails
       -> checkpoint initialization/write/restore fails
   ```
   
   ## Findings
   
   Issue 1: the distribution still packages the old AWS SDK, so the documented IRSA provider may be unavailable
   - Location: `seatunnel-dist/pom.xml:107`; `seatunnel-dist/pom.xml:811`; `seatunnel-engine/seatunnel-engine-storage/checkpoint-storage-plugins/checkpoint-storage-hdfs/pom.xml:60`; `docs/en/engines/zeta/checkpoint-storage.md:188`
   - Severity: High
   - Description: `checkpoint-storage-hdfs` now uses `aws-java-sdk-bundle:1.12.770` as a provided dependency, but `seatunnel-dist` still declares `aws-java-sdk.version=1.11.271` and includes that bundle. The older bundle does not contain `WebIdentityTokenCredentialsProvider`, while the new checkpoint docs recommend it. `DefaultAWSCredentialsProviderChain` also exists in both old and new bundles, so classpath order can decide whether the chain actually supports web identity.
   - Risk: a user following the new checkpoint-storage docs can hit `ClassNotFoundException` or load an old credential chain, causing S3A checkpoint storage initialization or checkpoint IO to fail. That directly affects recovery and fault tolerance.
   - Suggested fix: align the runtime AWS SDK bundle used by the distribution with the version required by the IRSA provider, or fully isolate the shaded `seatunnel-hadoop-aws` dependency so an old unshaded AWS SDK cannot win on the classpath. Please centralize this version with dependency management/property rather than hard-coding `1.12.770` only in the checkpoint module.
   
   Issue 2: Hadoop core is upgraded to 3.3.6, but the artifact is still named `seatunnel-hadoop3-3.1.4-uber`
   - Location: `seatunnel-shade/seatunnel-hadoop3-3.1.4-uber/pom.xml:25`; `seatunnel-shade/seatunnel-hadoop3-3.1.4-uber/pom.xml:29`; `pom.xml:514`; `seatunnel-dist/pom.xml:835`
   - Severity: High
   - Description: the PR changes the internal `hadoop3.version` from 3.1.4 to 3.3.6, but the module/artifact/final jar name still says `3.1.4`. This makes the actual runtime Hadoop version ambiguous. It also makes this PR a broad Hadoop runtime upgrade, not only an IRSA checkpoint-storage change.
   - Risk: this can affect engine server/client, checkpoint storage, imap storage, and any Hadoop FS path using the uber jar. Without a clearly scoped upgrade and full regression, this can introduce `NoSuchMethodError`, class conflicts, or behavior changes for existing HDFS/S3 deployments.
   - Suggested fix: either split the Hadoop-family upgrade into its own PR and update artifact naming/docs/E2E dependencies consistently, or keep this PR minimal by isolating the checkpoint-storage dependency without changing the global Hadoop core jar.
   
   Issue 3: the new IRSA test is disabled and uses a placeholder bucket
   - Location: `seatunnel-engine/seatunnel-engine-storage/checkpoint-storage-plugins/checkpoint-storage-hdfs/src/test/java/org/apache/seatunnel/engine/checkpoint/storage/hdfs/S3FileCheckpointWithIRSATest.java:49`; `seatunnel-engine/seatunnel-engine-storage/checkpoint-storage-plugins/checkpoint-storage-hdfs/src/test/java/org/apache/seatunnel/engine/checkpoint/storage/hdfs/S3FileCheckpointWithIRSATest.java:62`
   - Severity: Medium
   - Description: the test is annotated with `@Disabled` and uses `s3a://your-test-bucket`, so CI never validates it. It is useful as a manual note, but not as regression coverage.
   - Risk: provider class availability, config propagation, and checkpoint storage initialization are not automatically tested.
   - Suggested fix: keep a real EKS/IRSA test as a manual/profile test if needed, but add a default lightweight test that checks provider class availability and verifies `S3Configuration` writes the expected S3A properties into Hadoop `Configuration`.
   
   Issue 4: S3File connector providers changed, but S3File docs still list only the old providers
   - Location: `seatunnel-connectors-v2/connector-file/connector-file-s3/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/s3/config/S3FileBaseOptions.java:72`; `docs/en/connectors/source/S3File.md:198`; `docs/en/connectors/sink/S3File.md:112`; `docs/zh/connectors/source/S3File.md:198`
   - Severity: Medium
   - Description: the PR adds `WebIdentityTokenCredentialsProvider` and `DefaultAWSCredentialsProviderChain` to the S3File connector enum, but the S3File source/sink docs still say only `SimpleAWSCredentialsProvider` and `InstanceProfileCredentialsProvider` are supported.
   - Risk: connector docs and code disagree, and users may try a provider that is still not safe with the current distribution dependency set.
   - Suggested fix: either remove the connector enum change from this checkpoint-storage PR, or update docs/en and docs/zh for S3File source/sink after the runtime dependency issue is fixed.
   
   ## Compatibility
   
   This is partially incompatible in practice because it changes the Hadoop/AWS dependency family. No SeaTunnel API or checkpoint serialization format changes, but upgrading Hadoop core from 3.1.4 to 3.3.6 affects runtime behavior for more than checkpoint storage. Existing deployments with custom Hadoop/AWS jars need a clear migration note.
   
   ## CI
   
   The current Build check is failing. The Apache check-run summary points to a fork run, but `gh run view` returned 404 for that fork run from my local environment, so I could not inspect the detailed failed job logs. This PR still needs a green run after the dependency packaging is fixed.
   
   ## Merge conclusion
   
   ### Conclusion: can be merged after fixes
   
   1. Blocking items that must be fixed
   - Issue 1: align the runtime AWS SDK bundle in the distribution so the documented IRSA providers are actually available and not shadowed by an older bundle.
   - Issue 2: make the Hadoop 3.3.6 upgrade explicit and fully aligned, or move it into a separate dependency-upgrade PR.
   - The Build check must be green after these fixes.
   
   2. Suggested non-blocking improvements
   - Issue 3: add a default runnable test for provider classpath/config propagation; keep real EKS IRSA testing as a profile/manual test.
   - Issue 4: update S3File source/sink docs if the connector provider enum changes remain in this PR.
   
   Overall, IRSA support is a good improvement and the author has been responsive. The important thing now is to make the final packaged runtime deterministic. Checkpoint storage sits directly on the recovery path, so we should not merge documentation that can produce an unrecoverable runtime due to classpath mismatch.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org