goutamadwant opened a new pull request, #12245:
URL: https://github.com/apache/seatunnel/pull/12245

   ### Purpose of this pull request
   
   Related to #10753. Implements the agreed first Salesforce sink slice in the 
existing connector module.
   
   - Upsert one Salesforce object through REST sObject Collections using a 
required external ID.
   - Bound requests by record count and UTF-8 bytes; inspect every result with 
`allOrNone=true`.
   - Fail on rejected records, malformed responses, permission errors, 
timeouts, and exhausted retries. Retry only bounded transient failures, with 
one session refresh within the retry budget.
   - Flush on batch limits, checkpoint preparation, normal close, and the 
engine flush callback. Preserve input order for repeated keys within one writer.
   - Add typed validation, row serialization, source/sink factory registration, 
English/Chinese documentation, and tests. Mask Salesforce secrets in 
parsed-config logs without changing encryption defaults.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. `Salesforce` can now be configured as a sink. The existing source 
options and data-reading behavior are unchanged.
   
   The target object and external ID must already exist. Delivery is 
at-least-once with checkpointing and a replay-capable source; retries or 
recovery can repeat Salesforce triggers/flows. Only INSERT and UPDATE_AFTER are 
supported. Delete, Bulk API 2.0, multi-object routing, and catalog/schema 
creation are out of scope.
   
   ### How was this patch tested?
   
   - Java 8 and Java 11: 67 connector tests passed, including existing 
source/client regressions. Java 11: 7 shared configuration tests passed.
   - Docker E2E: all 8 cases passed on Zeta, Flink 1.18, Flink 1.20, and Spark 
3.3, with no failures or skips. Each engine verified successful 
upserts/final-batch flushing and job failure on Salesforce record errors.
   - Focused coverage includes count/byte bounds, repeated keys, detached input 
values, unsupported row kinds/types, partial or malformed responses, 
authentication refresh, permanent errors, bounded retries, timeouts, 
interruption, and checkpoint failure propagation.
   - The 84-module E2E reactor build and formatting checks passed. E2E uses 
MockServer; no live Salesforce org was tested.
   
   Java 11 focused verification (connector tests were also run with Java 8):
   ```sh
   ./mvnw -B -T 1 -pl 
seatunnel-connectors-v2/connector-salesforce,seatunnel-core/seatunnel-core-starter
 -am verify '-Dtest=Salesforce*Test,ConfigBuilderTest' 
-Dsurefire.failIfNoSpecifiedTests=false -Dskip.ui=true
   ```
   
   Docker E2E, using Java 11:
   ```sh
   RUN_ALL_CONTAINER=false RUN_ZETA_CONTAINER=true ./mvnw -B -T 1 -pl 
seatunnel-e2e/seatunnel-connector-v2-e2e/connector-http-e2e -am verify 
-Dskip.ui=true -DskipUT=true -DskipIT=false -Dit.test=SalesforceSinkIT 
-Dfailsafe.failIfNoSpecifiedTests=false -DfailIfNoTests=false 
-Dmaven.compiler.useIncrementalCompilation=false 
'-Dsurefire.jvm.args=-Dfile.encoding=UTF-8 -Dapi.version=1.44'
   ```
   The test-JVM Docker API override was needed for the existing Testcontainers 
version with Docker 29; no repository-wide Docker or dependency change is 
included.
   
   ### Check list
   
   * [ ] If any new Jar binary package adding in your PR, please add License 
Notice according [New License 
Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/developer/new-license.md).
 Not applicable: no new third-party dependency.
   * [x] If necessary, please update the documentation to describe the new 
feature. https://github.com/apache/seatunnel/tree/dev/docs
   * [ ] If necessary, please update `incompatible-changes.md` to describe the 
incompatibility caused by this PR. Not applicable: no intentional incompatible 
change.
   * [x] If you are contributing the connector code, please check that the 
following files are updated:
     1. Update 
[plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties):
 sink mapping added.
     2. Update the pom file of 
[seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml):
 reviewed; the existing module is already included.
     3. Add ci label in 
[label-scope-conf](https://github.com/apache/seatunnel/blob/dev/.github/workflows/labeler/label-scope-conf.yml):
 Salesforce E2E paths added.
     4. Add e2e testcase in 
[seatunnel-e2e](https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/):
 positive and negative Salesforce sink cases added.
     5. Update connector 
[plugin_config](https://github.com/apache/seatunnel/blob/dev/config/plugin_config):
 reviewed; Salesforce is already registered.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to