fatmanverse opened a new pull request, #13429:
URL: https://github.com/apache/seatunnel/pull/13429
### Purpose of this pull request
Part of #10753 (Harvest Source only).
Add a Harvest time-entry source to Apache SeaTunnel. A job can read one
account's `GET /v2/time_entries` using a personal access token, an explicit
schema, and optional `from`, `to`, and `updated_since` filters.
The reader validates paging metadata and stops only on an explicit
`next_page: null`. Retryable HTTP responses use bounded exponential backoff and
honor `Retry-After`; malformed responses, exhausted retries and excessive
provider delays fail the job. Requests and retry waits run outside the
checkpoint lock. Redirects are rejected, and response bodies are excluded from
connector error messages.
The implementation reuses the existing single-split framework, JSON
conversion and HTTP dependencies. A dedicated reader retains response headers
needed for rate limiting. It adds no new third-party runtime dependency.
### Does this PR introduce _any_ user-facing change?
Yes. It adds the `Harvest` source, plugin installation/packaging entries, CI
scope rules, and English/Chinese documentation. Existing connectors and their
configuration remain compatible.
This first version supports BATCH mode and source parallelism 1. Checkpoints
store a completion flag: unfinished splits replay from page 1, and completed
splits are not reread. The docs explain duplicate handling and the limits of
extracting from a mutable paginated API. This is not CDC or exactly-once
extraction.
### How was this patch tested?
Validation runs on a remote Linux host with Maven 3.9 and JDK 17.
- 50 reader/factory unit tests passed, including parsed job configuration,
service discovery, authentication headers, schema conversion, pagination, empty
pages, retry limits, redirects, interruption, checkpoint replay and collection
failures.
- 4 `MarkdownTest` checks passed.
- Spotless checks passed for the affected connector, E2E and
parent/packaging modules.
- Zeta `HarvestIT`: 1 test passed with the real engine and mock HTTP service.
- Flink/Spark `HarvestIT`: Flink 1.13.6, 1.15.3, 1.18.0 and 1.20.1, plus
Spark 2.4.6 and 3.3.0 all passed with the same mock HTTP scenario (6 tests).
Targeted verification:
```sh
./mvnw -B --no-snapshot-updates \
-pl seatunnel-connectors-v2/connector-http/connector-http-harvest -am \
-DskipITs -Dtest=HarvestSourceFactoryTest,HarvestSourceReaderTest \
-Dsurefire.failIfNoSpecifiedTests=false -Dsurefire.timeout=60 verify
./mvnw -B -pl seatunnel-ci-tools -Dtest=MarkdownTest test
RUN_ENGINES=zeta ./mvnw -B \
-pl seatunnel-e2e/seatunnel-connector-v2-e2e/connector-harvest-e2e \
-DskipUT=true -DskipIT=false -DskipITs=false -Dit.test=HarvestIT \
-Dfailsafe.timeout=300 verify
RUN_ENGINES=flink,spark ./mvnw -B \
-pl seatunnel-e2e/seatunnel-connector-v2-e2e/connector-harvest-e2e \
-DskipUT=true -DskipIT=false -DskipITs=false -Dit.test=HarvestIT \
-Dfailsafe.timeout=300 verify
```
The job-level test uses a deterministic HTTP server that returns 429
followed by two pages, and checks three rows through the Assert sink. The
engine dependency build uses the existing `-Dskip.ui=true` option: the initial
UI build failed because Cypress could not write its cache in the build
container. UI validation is outside this connector's test scope. No live
Harvest account or full repository test-suite validation is claimed.
The test host could not pull `testcontainers/sshd:1.3.0` from Docker Hub.
For this run, `TESTCONTAINERS_SSHD_CONTAINER_IMAGE` selects an OpenSSH helper
built on the host from its cached `atmoz/sftp:alpine` image using the official
Testcontainers SSHD forwarding/startup flags. This is a test-environment
substitution, not a repository dependency or connector fallback; the engine
test and assertions are unchanged.
### Check list
- [x] Reuses existing third-party runtime dependencies; no new binary
dependency.
- [x] English and Chinese connector documentation and changelogs added.
- [x] No incompatible change to existing connectors.
- [x] Plugin mapping, distribution dependency, CI scope, plugin installation
list and E2E test added.
--
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]