You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "Suresh-Krishna-Kusuma (via GitHub)" <gi...@apache.org> on 2026/02/04 12:44:30 UTC
[PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Suresh-Krishna-Kusuma opened a new pull request, #10447:
URL: https://github.com/apache/seatunnel/pull/10447
This PR introduces the initial implementation of the HubSpot Source Connector (Phase 1). It is implemented by extending the generic HttpSource to leverage existing HTTP capabilities.
Changes:
- Added connector-http-hubspot module.
- Implemented HubSpotSource and HubSpotSourceFactory.
- Added dynamic configuration logic to map object_type to API URLs.
- Added documentation in docs/en/connector-v2/source/HubSpot.md.
<!--
Thank you for contributing to SeaTunnel! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
## Contribution Checklist
- Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/seatunnel/issues).
- Name the pull request in the form "[Feature] [component] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
- Minor fixes should be named following this pattern: `[hotfix] [docs] Fix typo in README.md doc`.
-->
### Purpose of this pull request
<!-- Describe the purpose of this pull request. For example: This pull request adds checkstyle plugin.-->
### Does this PR introduce _any_ user-facing change?
<!--
Note that it means *any* user-facing change including all aspects such as the documentation fix.
If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
If possible, please also clarify if this is a user-facing change compared to the released SeaTunnel versions or within the unreleased branches such as dev.
If no, write 'No'.
If you are adding/modifying connector documents, please follow our new specifications: https://github.com/apache/seatunnel/issues/4544.
-->
### How was this patch tested?
<!--
If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
If tests were not added, please describe why they were not added and/or why it was difficult to add.
If you are adding E2E test cases, maybe refer to https://github.com/apache/seatunnel/blob/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-cdc-mysql-e2e/src/test/resources/mysqlcdc_to_mysql.conf, here is a good example.
-->
### 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/contribution/new-license.md)
* [ ] 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.
* [ ] 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) and add new connector information in it
2. Update the pom file of [seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
3. Add ci label in [label-scope-conf](https://github.com/apache/seatunnel/blob/dev/.github/workflows/labeler/label-scope-conf.yml)
4. Add e2e testcase in [seatunnel-e2e](https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/)
5. Update connector [plugin_config](https://github.com/apache/seatunnel/blob/dev/config/plugin_config)
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-4369533484
Thanks for flagging this. I rechecked the current head locally, and you are right — I missed a real runtime gap in my earlier pass, sorry about that.
On the current code path, `HubSpotSource` still calls `super(config)`, so the parent `HttpSource` builds its own `httpParameter` and `pageInfo` from the original config first. After that, the PR builds a separate `HubSpotSourceParameter`, but that object is never passed into the actual `HttpSourceReader` path.
So the HubSpot-specific defaults are still not reliably on the real runtime path:
- the injected `Authorization` header lives on the separate `HubSpotSourceParameter`
- the default URL derived from `object_type` also lives there
- the cursor paging defaults are built there too, but the parent `pageInfo` was already created from the original config
In other words, the current head is still not merge-ready from my side. The smallest safe fix is either:
1. Merge the HubSpot-specific defaults into the config before `super(config)` builds the parent `httpParameter` and `pageInfo`, or
2. Override the runtime reader path so the actual `HttpSourceReader` receives the HubSpot-specific parameter object and the matching paging state.
Please push a code update for that, and I will do a fresh full review on the new head. Thanks again for calling this out carefully.
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-3863658151
Thank you for the contribution! This is a good starting point for the HubSpot connector. I found several critical issues that need to be addressed before this can be merged.
**1. Invalid Default `content_field` causing Runtime Failure**
In `HubSpotSourceParameter.java`, the default `content_field` is hardcoded as `"results"`.
The strict JSON path implementation in `HttpSourceReader` expects a valid JsonPath expression (e.g., usually starting with `$.`). Passing `"results"` will likely cause a `JsonPathCompile` exception or fail to extract data correctly at runtime.
**Action**: Change the default value to `$.results` (to return the array) or `$.results.*`?
**2. Mismatch between Default Schema and E2E Test Expectations**
- `HubSpotSource` currently reuses `HttpSource` without injecting a default schema or `json_field` configuration. This means, by default, it produces a single column named `content` (containing the raw JSON string).
- However, your E2E test (`hubspot_source_case.conf`) asserts the presence of an `id` field (`field_name = "id"`).
- **Result**: The test validates a scenario that doesn't match the actual default behavior of the connector.
**Action**: Either (A) Configure default `json_field` mappings in `HubSpotSource` so fields like `id` are extracted automatically, OR (B) Update the E2E test config to explicitly define the `schema` and `json_field` mappings required to parse the `id`.
**3. E2E Test Network Configuration is Incorrect**
The `HubSpotIT.java` sets up a `MockServer` container but fails to place it in the shared network used by the SeaTunnel engine container.
- Missing `.withNetwork(NETWORK)` and `.withNetworkAliases(...)` in the container setup.
- The configuration `url = "http://mock-server"` in the conf file cannot be resolved by the SeaTunnel container because the network alias is invalid.
**Action**: Please copy the networking setup pattern from `HttpIT.java` (using `TestSuiteBase.NETWORK` and setting an alias) to ensure the test actually hits the mock server.
**4. `OptionRule` Validation Inconsistency**
In `HubSpotSourceFactory`, the `optionRule` only declares `ACCESS_TOKEN` and `OBJECT_TYPE`.
However, your test case tries to inject a `url` parameter (`url = "http://mock-server"`).
- If strict validation is enabled in the future, this will fail.
- You are also manually reading `"url"` in `HubSpotSourceParameter` using a disjointed `Options.key("url")` instead of reusing `HttpCommonOptions.URL`.
**Action**: If you intend to allow users/tests to override `url`, please add `HttpCommonOptions.URL` to the `OptionRule` in the factory and reuse that constant in `HubSpotSourceParameter`.
**5. Dependency Scope in `seatunnel-dist`**
In `seatunnel-dist/pom.xml`, the new `connector-http-hubspot` dependency is missing `<scope>provided</scope>`, unlike other HTTP connectors.
**Action**: Please add `<scope>provided</scope>` to align with the project's packaging strategy and avoid unnecessary artifact bloat.
**6. Documentation Accuracy**
In `Hubspot.md`, the "Key features" section marks `parallelism` and `exactly-once` as supported (`[x]`). Since this connector extends `HttpSource` (which is typically single-split/bounded for batch), please verify if these claims are strictly true or just inherited boilerplate. It is better to be accurate than to overpromise.
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-5021862167
Thanks @SEZ9 for the additional review. One blocker from my earlier review is still present on this unchanged head, so I cannot treat the approval as source/CI clear yet: `docs/zh/connectors/source/HubSpot.md:1-20` still places the ASF header before the changelog import, and the repository documentation check fails deterministically on that ordering.
No new finding is being added here; this is just a clarification that the previously reported documentation-layout blocker remains open until the file ordering is corrected and the required check is rerun.
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "LiJie20190102 (via GitHub)" <gi...@apache.org>.
LiJie20190102 commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-3847641433
Thank you for your contribution. Can you add e2e test cases
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-4915664670
I pushed a maintainer follow-up commit to this PR (`353db98a96`) to fix the HubSpot runtime wiring.
The previous `HubSpotIT` failure was not just stale-base drift. The HubSpot source was building a custom parameter object, but the actual reader path still relied on the generic `HttpSource` runtime config, so the HubSpot-specific cursor pagination defaults were not consistently reaching the real reader path.
This follow-up does four focused things:
1. Build a shared runtime config with HubSpot defaults (`format = JSON`, `content_field = $.results`, `keep_page_param_as_http_param = true`, and nested cursor paging defaults).
2. Reuse the HubSpot-specific parameter object in `createReader(...)` so the reader sees the injected auth header, resolved URL, and pagination settings together.
3. Add a regression test that asserts the runtime reader wiring for auth/url/page info/content field.
4. Align the HubSpot E2E configs with the JSON + schema path expected by `HttpSource`.
Local verification I reran:
- `./mvnw -pl seatunnel-connectors-v2/connector-http/connector-http-hubspot,seatunnel-e2e/seatunnel-connector-v2-e2e/connector-http-e2e -am spotless:apply -DskipTests -DskipITs -DskipUT=true -DskipIT=false -Dskip.ui=true`
- `./mvnw -pl seatunnel-connectors-v2/connector-http/connector-http-hubspot -Dtest=HubSpotSourceFactoryTest,HubSpotSourceParameterTest,HubSpotSourceTest -DfailIfNoTests=false -Dspotless.check.skip=true -Dskip.ui=true test`
I did not do a broad `update branch` / merge-from-`dev` in this pass. The PR is currently far behind `dev`, and a full branch sync would pull in a very large unrelated upstream delta. I wanted to keep this rescue focused on the actual HubSpot runtime bug first.
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-5541827145
Confirmed — `Run / unit-test (11, ubuntu-latest)` (job `100675975246`) is the same `CoordinatorServiceTest` `HazelcastInstanceNotActiveException` flake I called out as unrelated to this PR's diff in my last review: the JDK 8 run of the same job passed, and `dev` already carries an ongoing stabilization effort against that exact test class. Retrying that job is the right next step — no HubSpot-path action needed from my side. My "Ready to merge" conclusion from the last review stands.
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "Suresh-Krishna-Kusuma (via GitHub)" <gi...@apache.org>.
Suresh-Krishna-Kusuma commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-4233462591
@DanielLeens Incredible catches, thank you. I've pushed the fixes for both:
Injected keep_page_param_as_http_param=true into the configuration map so HttpSourceReader knows to append the cursor parameter.
Added Testcontainers.exposeHostPorts(8089) to the test class and updated the conf URL to host.testcontainers.internal so the containerized SeaTunnel engine can successfully route to the host JVM's MockServer.
The CI is running now. Let me know if everything looks good on your end!
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-4317465361
Hi @Suresh-Krishna-Kusuma, I rechecked the latest head locally after the new activity.
# What I revalidated
- The real HubSpot runtime chain is still the same one I approved before:
~~~text
HubSpotSourceFactory.createSource()
-> HubSpotSource.createSourceReader()
-> base HttpSource reader injects pageInfo handling
-> request loop follows next-page metadata
-> records continue through the normal HttpSource flow
~~~
- Since Daniel's previous review, the only source diff on this branch is the parent POM module ordering change in `seatunnel-connectors-v2/connector-http/pom.xml:42-46`.
- I do not see a reopened code blocker in the HubSpot source path.
# Finding
1. The latest human follow-up on the PR explains the current CI failure well: the branch is missing the upstream flaky-test fix from `#10745` / latest `dev`, so the red `Build` is not pointing to a newly reopened HubSpot runtime bug.
# Merge conclusion
### Conclusion: merge after fixes
Blocking item:
- Please sync the branch with the latest `apache/dev` (or include the equivalent flaky-test fix) and get `Build` green.
Non-blocking note:
- From the current source path, I still prefer the existing design boundary that keeps HubSpot on the base `HttpSource` pagination implementation.
Thanks again for sticking with the review iterations. From a code-path perspective, I do not see a reopened blocker in the connector itself.
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-4325341042
Thanks for the heads-up, and no worries about the rebase conflicts.
Since maintainer edits are enabled, we can take it from here. We should sync the branch with using the normal branch update / merge path rather than asking you to force through a messy rebase, so we can keep the history intact and avoid accidentally mangling the recent HTTP/File connector changes.
After syncing, we'll re-check the conflict status and let CI run again. Appreciate you calling this out before pushing through the conflicts manually.
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-4323857895
Hi @Suresh-Krishna-Kusuma, thanks for the update. I pulled the latest head locally again and rechecked the full diff and the real read path.
What this PR solves
- User pain: HubSpot pagination needs to stay on the shared `HttpSource` path, otherwise cursor handling can drift away from the common reader behavior.
- Fix approach: the current head keeps HubSpot-specific logic inside `HubSpotSourceParameter`, while the actual reader still comes from the base `HttpSource.createReader()` path.
- One-line summary: the code path looks fine to me now; the remaining blocker is CI / branch sync, not the HubSpot runtime logic itself.
Runtime path I checked
```text
HubSpotSource(config)
-> super(config)
-> HttpSource.buildSchemaWithConfig()
-> HttpSource.buildPagingWithConfig()
-> HubSpotSourceParameter.buildWithConfig()
-> inject cursor paging defaults
-> inject Authorization header
-> build default HubSpot URL
Read path
-> HttpSource.createReader()
-> new HttpSourceReader(..., pageInfo)
-> shared HttpSource pagination/cursor flow
```
Merge conclusion
### Conclusion: merge after fixes
1. Blocking items
- The current GitHub `Build` is still failing, so this PR is not merge-ready yet.
- In the fork run `24892308663`, I could confirm failures including `Run / unit-test (11, ubuntu-latest)` and `Run / all-connectors-it-1 (8, ubuntu-latest)`.
2. Suggested follow-ups
- Please sync the latest `apache/dev` first and rerun CI before we do another merge decision.
From the code-review side, I do not see a new blocker in the current HubSpot implementation. Once the branch is synced and the build is green, this should be in a much better place.
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-5149759674
Thanks for your contribution for Apache SeaTunnel.
To facilitate focused communication among contributors, we’ve created a brand-new dedicated #contributors channel in official Slack workspace.
Slack workspace link: https://s.apache.org/seatunnel-slack
This channel is designed for technical discussions, feature design brainstorming, roadmap sync and direct communication with project core Contributors. Everyone who contributes code, docs, test cases or community ideas is warmly invited to join, share thoughts and collaborate together under The Apache Way. Welcome to join us😄
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-5526745762
Pushed a fix for the `Build` CI failure on the previous head (`5ce9695c5`): `fbeb29253`.
**Root cause**: `updated-modules-integration-test-part-1` (JDK 8 and JDK 11, all engines — Zeta and Flink 1.13/1.15/1.18/1.20) was failing deterministically with `ASSERT-01: row num :2 fail rule: MIN_ROW=4.0` in `HubSpotIT#testHubspotSourcePagination`. I downloaded and read the raw job logs: MockServer *did* correctly serve both pages (I can see both HTTP requests land — the first with no `after` param, the second with `after=token-123` — and MockServer returns the right body for each, including page 2's Charlie/David). So cursor pagination itself (the thing this PR/E2E test was actually built to verify) is working correctly. The bug is one level deeper, in the shared `connector-http-base` reader that both requests flow through.
`HttpSourceReader` reuses one `jsonConfiguration` (with `Option.ALWAYS_RETURN_LIST`) for `content_field` extraction, `json_field` extraction, and cursor extraction. For a *definite* JsonPath (no wildcards) — which `content_field` always is — the Jayway JsonPath library wraps the already-resolved value in a synthetic single-element list before returning it. So `content_field = "$.results"` against a response whose `results` is itself a 2-element array comes back double-nested as `[[obj1, obj2]]` instead of `[obj1, obj2]`. `JsonDeserializationSchema#collect` only unwraps one array level, so the *entire inner array* collapsed into a single malformed row instead of splitting into 2 — silently turning 4 total rows (2 pages × 2) into 2.
`content_field` isn't set by any other connector or test in the repo (verified with a full-repo grep), so this shared-code bug was simply never exercised before this PR's E2E test.
**Fix** (in `HttpSourceReader.getPartOfJson()`): unwrap the synthetic definite-path wrapper before handing content to the deserializer, mirroring the JsonPath library's own contract exactly — only *definite* paths get unwrapped; an indefinite/wildcard `content_field` (which never gets the synthetic wrap) is left untouched. The shared `jsonConfiguration` field itself isn't touched, so `json_field` and cursor extraction behavior for every other HTTP-based connector is unaffected.
Also added `HttpSourceReaderInternalPollNextTest#testDefiniteArrayContentFieldProducesOneRowPerElement`, which drives the real `HttpSourceReader → DeserializationCollector → JsonDeserializationSchema` pipeline with a 2-element `content_field` array and asserts both elements come back as separate rows — this is the regression guard for the exact bug the HubSpot E2E job hit.
Verified locally with `./mvnw spotless:apply -pl seatunnel-connectors-v2/connector-http/connector-http-base -am -nsu` (no formatting changes needed). Compilation, the new unit test, and the HubSpot E2E job itself will be validated by CI on this head.
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on code in PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#discussion_r3940868880
##########
docs/en/connectors/changelog/connector-http-hubspot.md:
##########
@@ -0,0 +1,5 @@
+# HubSpot Changelog
+
+## 2.3.13-SNAPSHOT
+
+- Add HubSpot Source Connector
Review Comment:
Thanks for the suggestion — a HubSpot sink is a reasonable follow-up, but it's out of scope for this PR, which is focused on landing the HubSpot source connector. Let's track the sink as a separate feature PR once this one merges.
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "Suresh-Krishna-Kusuma (via GitHub)" <gi...@apache.org>.
Suresh-Krishna-Kusuma commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-4205988477
Thanks for the thorough review and for pulling this locally, @DanielLeens! You are absolutely right about the V3 cursor pagination. I will go with the first option: wiring the default HubSpot cursor paging directly into the connector so it works out-of-the-box, and I'll add a multi-page E2E test to verify it. I’ll also get those CI build failures cleared up. I'll ping you once the updates are pushed.
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-4371735518
Hi @davidzollo, thanks for calling this out. I went back through the current head carefully, and your point is correct.
After re-checking the actual runtime chain, the real gap is broader than the narrower `pageInfo` note I left earlier:
```text
HubSpotSource(config)
-> super(config)
-> HttpSource.httpParameter.buildWithConfig(pluginConfig) [HttpSource.java:64-67]
-> HttpSource.buildPagingWithConfig(pluginConfig) [HttpSource.java:82-128]
-> HubSpotSource.hubSpotSourceParameter.buildWithConfig(config) [HubSpotSource.java:28-45]
-> inject auth header / default URL / cursor defaults
Reader path
-> HttpSource.createReader(...) [HttpSource.java:189-197]
-> new HttpSourceReader(this.httpParameter, ..., pageInfo)
```
So on the current head, the request path still uses the parent `httpParameter` built in `HttpSource`, while the HubSpot-specific `hubSpotSourceParameter` is only constructed on the side and never passed into `HttpSourceReader`.
That means the HubSpot-specific `Authorization` header, URL construction from `object_type`, and cursor-related defaults in `HubSpotSourceParameter.buildWithConfig()` do not reliably reach the real runtime request path today.
So I agree this is still a blocker on the current code, and I also agree with the direction you suggested: either make the merged HubSpot config effective before `HttpSource` builds its runtime parameter / paging state, or explicitly override the reader path so the actual reader uses the HubSpot-specific parameter object.
I am treating this as waiting for a new commit now rather than doing another full review on the same head. Once the code is updated, I am happy to re-review.
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-4371727503
Hi @Suresh-Krishna-Kusuma, I agree with the direction in the latest note above. From Daniel's side, the key remaining gap is still that the HubSpot-specific runtime parameter object needs to be the one the real `HttpSourceReader` actually uses, so the Authorization header, derived URL, and cursor defaults all reach the normal request path together.
Because there is still no new commit after head `8f88a018`, I am not starting another full review in this round. Once you rebase on the latest `apache/dev` and push that runtime-parameter-path fix, please ping me again and I will re-check the latest code.
Thanks again for sticking with it.
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-5192206529
Thanks for your contribution! This is a solid addition to the project, and your attention to detail really shows. Contributors like you are what keep this community moving forward. Feel free to keep the PRs coming — we're always glad to have you here!
Please ignore the following message if you have joined in the Slack~
```
To facilitate focused communication among contributors, we’ve created a brand-new dedicated #contributors channel in official Slack workspace.
Slack workspace link: https://s.apache.org/seatunnel-slack
This channel is designed for technical discussions, feature design brainstorming, roadmap sync and direct communication with project core Contributors. Everyone who contributes code, docs, test cases or community ideas is warmly invited to join, share thoughts and collaborate together under The Apache Way. Welcome to join 😄
```
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-5552450643
Pushed `caa98bfa72d` to close out the last CI blocker.
**Root cause of the `Build` failure**: the only failing job was `unit-test (11, ubuntu-latest)` (run [33762900121](https://github.com/Suresh-Krishna-Kusuma/seatunnel/actions/runs/33762900121/job/100675975246)), and it's not a HubSpot-path issue. I downloaded the raw job log and the actual failure is:
```
CoordinatorServiceTest.testClearCoordinatorServiceDropsPendingJobsUnderRejectStrategy:642
Pending job scheduler did not enter preApplyResources ==> expected: <true> but was: <false>
```
This is a pre-existing test-isolation race in `CoordinatorServiceTest`'s teardown, unrelated to `connector-http-hubspot`/`connector-http-base`: `stopCoordinatorSchedulers()` called `scheduler.shutdownNow()` without waiting for the scheduler thread to actually stop, so a prior test method's background pending-job scheduler could still be running when the next test method started and asserted scheduler state — a classic cross-test bleed, not a HubSpot regression.
This was independently root-caused and fixed on `dev` in #12050 ([Fix][Zeta] Stabilize CI test isolation](https://github.com/apache/seatunnel/pull/12050), merged 2026-09-04 — one day after this branch's last CI run on 2026-09-03), which makes teardown block on `awaitTermination()` before returning. This branch simply predated that fix (branch was `behind_by=19` against `dev` at the time).
Since #12050 only touches test-isolation code (`CoordinatorServiceTest`, `BaseServletTest`, a handful of e2e IT classes, and two Hazelcast test-only yaml configs — nothing in `connector-http-hubspot` or `connector-http-base`), I cherry-picked just that one commit onto this branch instead of doing a full `dev` sync, to avoid re-opening the kind of Airtable/FTP merge churn we hit earlier in this PR's history. `spotless:apply` on the touched modules reported no changes needed (the commit is already dev-clean).
`Build` is running on the new head now: https://github.com/apache/seatunnel/runs/101321214358
I also replied to and resolved the two open review threads (the sink-connector follow-up suggestion, and the stale Github.md doc question — confirmed via the latest source-level review that the shared `HttpSourceFactory` refactor is additive-only and needs no Github.md update).
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on code in PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#discussion_r2776899646
##########
docs/en/connectors/source/Github.md:
##########
@@ -276,7 +276,7 @@ Source plugin common parameters, please refer to [Source Common Options](../comm
## Example
```hocon
-Github {
+Hubspot {
url = "https://api.github.com/orgs/apache/repos"
access_token = "xxxx"
method = "GET"
Review Comment:
Do you need to update Github.md?
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-3904509629
The structure looks promising, but there are some issues that will cause runtime failures and need to be addressed before merging.
## Critical Issues
### 1. `HubSpotSourceFactory` is missing `createSource` implementation
**File:** `seatunnel-connectors-v2/connector-http/connector-http-hubspot/src/main/java/org/apache/seatunnel/connectors/seatunnel/hubspot/source/HubSpotSourceFactory.java`
The `TableSourceFactory` interface provides a default implementation for `createSource` that throws an `UnsupportedOperationException`. Since you haven't overridden it, the SeaTunnel engine will crash when trying to create this source via the factory.
**Required Change:**
Please implement the `createSource` method:
```java
@Override
public <T, SplitT extends SourceSplit, StateT extends Serializable> TableSource<T, SplitT, StateT> createSource(TableSourceFactoryContext context) {
return () -> (SeaTunnelSource<T, SplitT, StateT>) new HubSpotSource(context.getOptions());
}
```
### 2. Unsafe Reflection Usage
**File:** `seatunnel-connectors-v2/connector-http/connector-http-hubspot/src/main/java/org/apache/seatunnel/connectors/seatunnel/hubspot/source/HubSpotSourceParameter.java`
Using reflection to modify the private field `contentField` of the parent class `HttpParameter` is highly discouraged ("Anti-pattern"). It makes the code fragile and dependent on the internal implementation of the parent class.
```java
// Please REMOVE this:
Field contentFieldVar = HttpParameter.class.getDeclaredField("contentField");
contentFieldVar.setAccessible(true);
contentFieldVar.set(parameter, DEFAULT_CONTENT_FIELD);
```
**Suggestion:**
Instead of hacking the parent class via reflection, you should ensure the configuration passed to the `HubSpotSource` constructor contains the default value if the user hasn't provided one.
In `HubSpotSourceFactory.createSource`, you can merge the user options with your default options:
```java
// Pseudocode example for Factory
ReadonlyConfig options = context.getOptions();
Map<String, Object> configMap = new HashMap<>(options.toMap());
if (!configMap.containsKey("content_field")) {
configMap.put("content_field", "$.results");
}
// Create source with modified config
return () -> (SeaTunnelSource<T, SplitT, StateT>) new HubSpotSource(ReadonlyConfig.fromMap(configMap));
```
## Improvements & Cleanup
### 1. Clean up Debug/Hack Comments
**File:** `seatunnel-e2e/seatunnel-connector-v2-e2e/connector-http-hubspot-e2e/src/test/java/org/apache/seatunnel/e2e/connector/hubspot/HubSpotIT.java`
**File:** `seatunnel-e2e/seatunnel-connector-v2-e2e/connector-http-hubspot-e2e/src/test/resources/hubspot_source_case.conf`
Please remove comments like `CRITICAL FIX: ...` or `# STRICT CONFIGURATION TO FIX EXIT CODE 1`. The code should stand on its own without artifacts from your debugging session.
### 2. Constructor Logic
**File:** `HubSpotSource.java`
The logic inside the constructor is trying to compensate for the missing configuration:
```java
if (this.contentField == null) {
this.contentField = HubSpotSourceParameter.DEFAULT_CONTENT_FIELD;
}
```
If you fix the parameter injection in the **Factory** (as suggested above), this null check becomes unnecessary because `HttpSource` (the parent) will have already initialized `this.contentField` correctly during its own constructor execution using the config you passed.
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "LiJie20190102 (via GitHub)" <gi...@apache.org>.
LiJie20190102 commented on code in PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#discussion_r2764184392
##########
docs/en/connectors/changelog/connector-http-hubspot.md:
##########
@@ -0,0 +1,5 @@
+# HubSpot Changelog
+
+## 2.3.13-SNAPSHOT
+
+- Add HubSpot Source Connector
Review Comment:
Can you also contribute the sink connector
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "Suresh-Krishna-Kusuma (via GitHub)" <gi...@apache.org>.
Suresh-Krishna-Kusuma commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-4323651078
@DanielLeens @davidzollo
Thanks so much for the approvals and all the help getting this ready!
I was trying to rebase against dev to pull in that flaky-test fix (#10745), but I'm running into a bunch of messy conflicts with the other recent HTTP/File connector merges (Airtable, FTP, etc.).
Rather than risk mangling the commit history, would one of you mind using your maintainer access to sync the branch so we can get the CI green? I've got "Allow edits from maintainers" checked on my end.
Really appreciate the assist in getting this across the finish line!
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-4326900671
Hi @Suresh-Krishna-Kusuma, I rechecked the current PR state after the latest maintainer follow-up.
My code-side conclusion is unchanged: the current HubSpot implementation is still back on the shared `HttpSource` pagination path, so I do not see a reopened runtime blocker in the HubSpot read logic itself.
Runtime path I am still using for this judgment:
```text
HubSpotSource(config)
-> super(config)
-> HttpSource.buildPagingWithConfig()
-> HubSpotSourceParameter.buildWithConfig()
-> inject cursor paging defaults + auth header
Read path
-> HttpSource.createReader()
-> new HttpSourceReader(..., pageInfo)
-> shared HttpSource pagination / cursor flow
```
For the current branch state, I agree with the targeted cherry-pick direction that was suggested in the latest maintainer comment. That is much safer than rebasing all of `dev` into this PR, because the current failure is not in the HubSpot runtime path itself.
Once that targeted sync is in and the `Build` goes green, this should be ready from Daniel's side.
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-5522550165
I pushed one more commit to close out the remaining blocker from the last review round: `5ce9695c5`.
The branch had already been synced with `apache/dev` (this PR is now `ahead_by=136`, `behind_by=0`, no merge conflicts), so the only open item left was the documentation-layout blocker Daniel flagged on 2026-07-19 / 2026-08-31:
`docs/zh/connectors/source/HubSpot.md` carried a manually-added ASF license header block before the `import ChangeLog from ...` line. `MarkdownTest.testConnectorDocWithChangeLogFlagAndFile` and `testPrimaryHeadersHaveNoTextAbove` (in `seatunnel-ci-tools`) both require line 1 of every connector source/sink doc to be the changelog import — none of the other connector docs (`Github.md`, `Gitlab.md`, `Klaviyo.md`, and this file's own English counterpart) carry that header. I removed the 17-line header block so the file matches the repo-standard layout; the English doc was already correct.
Verified locally: `./mvnw spotless:apply -pl seatunnel-connectors-v2/connector-http/connector-http-hubspot -am -nsu` reports no further changes needed, and the diff is exactly the header removal (`git diff` — 17 deletions, no other lines touched).
CI is running on the new head now. @Suresh-Krishna-Kusuma no action needed from you unless it turns up something unrelated — I'll keep an eye on the `Build` check.
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "Suresh-Krishna-Kusuma (via GitHub)" <gi...@apache.org>.
Suresh-Krishna-Kusuma commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-3908585982
Hi team, I have implemented all the requested changes for the HubSpot connector (fixed the createSource exception, removed the reflection anti-patterns, cleaned up the config, and added the HubSpotSourceFactoryTest).
My HubSpot tests are passing locally. However, the CI pipeline is currently failing globally on the ubuntu-latest runners in the connector-redis module (and others). The logs show a Docker/Testcontainers API mismatch: client version 1.32 is too old. Minimum supported API version is 1.44.
Since this is a runner infrastructure issue affecting the CI, could you please take a look at my HubSpot code and let me know if it's good to merge from your end?
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-3941037673
There are two critical functional bugs that must be fixed before this can be merged,
plus several smaller issues.
---
## [BLOCKER] access_token is declared but never injected into HTTP headers
The `access_token` option is marked as required in `HubSpotSourceFactory.optionRule()`,
but it is **never used anywhere in the actual HTTP request**. Every request sent to
the real HubSpot API will return `401 Unauthorized`.
The established pattern in this project is to override `buildWithConfig()` in a
custom `HttpParameter` subclass and inject the token as an `Authorization: Bearer`
header. See how the existing connectors do it:
- `GithubSourceParameter.buildWithConfig()` → injects `Authorization: Bearer <token>`
- `GitlabSourceParameter.buildWithConfig()` → injects `PRIVATE-TOKEN: <token>`
- `KlaviyoSourceParameter.buildWithConfig()` → injects `Authorization: Klaviyo-API-Key <key>`
**Current `HubSpotSourceParameter` (effectively empty):**
```java
public class HubSpotSourceParameter extends HttpParameter {
// Only holds a constant — buildWithConfig() is never overridden
public static final String DEFAULT_CONTENT_FIELD = "$.results";
}
```
**Current `HubSpotSource` (createReader() not overridden):**
```java
public class HubSpotSource extends HttpSource {
public HubSpotSource(ReadonlyConfig config) {
super(config); // uses base HttpParameter — no auth header
}
// createReader() falls through to HttpSource, passing the plain httpParameter
}
```
**Required fix:**
1. Override `buildWithConfig()` in `HubSpotSourceParameter` to inject the Bearer token:
```java
@Override
public void buildWithConfig(ReadonlyConfig pluginConfig) {
super.buildWithConfig(pluginConfig);
this.headers = this.getHeaders() == null ? new HashMap<>() : this.getHeaders();
this.headers.put(
"Authorization",
"Bearer " + pluginConfig.get(HubSpotSourceOptions.ACCESS_TOKEN));
this.setHeaders(this.headers);
}
```
2. Override `createReader()` in `HubSpotSource` to pass the custom parameter (see `GitlabSource` as reference):
```java
private final HubSpotSourceParameter hubSpotSourceParameter = new HubSpotSourceParameter();
public HubSpotSource(ReadonlyConfig config) {
super(config);
hubSpotSourceParameter.buildWithConfig(config);
}
@Override
public AbstractSingleSplitReader<SeaTunnelRow> createReader(
SingleSplitReaderContext readerContext) throws Exception {
return new HttpSourceReader(
this.hubSpotSourceParameter,
readerContext,
this.deserializationSchema,
jsonField,
contentField);
}
```
The E2E test currently passes only because MockServer does not validate the
`Authorization` header. This bug would be invisible in CI but break immediately
against the real HubSpot API.
---
## [BLOCKER] object_type is never mapped to a URL
The PR description states: *"Added dynamic configuration logic to map object_type
to API URLs."* However, **no such mapping exists in the code**. `object_type` is
only referenced in `HubSpotSourceOptions` and the unit test — it never influences
the actual request URL.
The E2E test works around this by hardcoding the URL directly:
```hocon
# hubspot_source_case.conf
url = "http://mock-server:1080/crm/v3/objects/contacts" # bypasses object_type entirely
```
Meanwhile the documentation example shows only `access_token` and `object_type`,
with no `url` field — implying the URL is auto-generated, which it is not:
```hocon
# docs/en/connectors/source/Hubspot.md
source {
HubSpot {
access_token = "pat-na1-..."
object_type = "contacts" # user expects this to be enough, but url is also required
}
}
```
**Required fix:** Add URL construction logic in `HubSpotSourceParameter.buildWithConfig()`:
```java
private static final String HUBSPOT_BASE_URL = "https://api.hubapi.com/crm/v3/objects/";
// Build URL from object_type when url is not explicitly provided
if (this.getUrl() == null || this.getUrl().isEmpty()) {
String objectType = pluginConfig.get(HubSpotSourceOptions.OBJECT_TYPE);
this.setUrl(HUBSPOT_BASE_URL + objectType);
}
```
---
## [REQUIRED] HubSpotSourceFactory.createSource() uses a non-standard pattern
```java
// HubSpotSourceFactory.java L61-70
Map<String, Object> configMap = new HashMap<>(options.toMap());
if (!configMap.containsKey("content_field")) {
configMap.put("content_field", HubSpotSourceParameter.DEFAULT_CONTENT_FIELD); // bare String key
}
ReadonlyConfig modifiedConfig = ReadonlyConfig.fromMap(configMap);
return () -> (SeaTunnelSource<T, SplitT, StateT>) new HubSpotSource(modifiedConfig); // unchecked cast
```
Issues:
- Using a raw String `"content_field"` instead of a typed `Option` constant is fragile and bypasses compile-time safety.
- Setting `content_field` is a responsibility of `HubSpotSourceParameter`, not the factory.
- Every other connector's `createSource()` is simply `() -> new XxxSource(config)`.
- The unchecked cast `(SeaTunnelSource<T, SplitT, StateT>)` generates a compiler warning.
Once `HubSpotSourceParameter.buildWithConfig()` is implemented correctly (handling
token injection, URL construction, and default `content_field`), the factory should
be simplified to:
```java
@Override
public <T, SplitT extends SourceSplit, StateT extends Serializable>
TableSource<T, SplitT, StateT> createSource(TableSourceFactoryContext context) {
return () -> (SeaTunnelSource<T, SplitT, StateT>)
new HubSpotSource(context.getOptions());
}
```
---
## [REQUIRED] Documentation issues
**1. Wrong filename casing:** The file is named `Hubspot.md` (lowercase "s") but
should be `HubSpot.md` to match the connector identifier and the naming convention
of other connector docs.
**2. Broken Markdown table in Key Features section (`Hubspot.md` L18):**
```
| Exactly-Once | [ ] | | Parallelism | [ ] | ```
```
The table collapses onto one line and a stray code fence appears. Please split into
proper table rows.
**3. Documentation example is misleading:** The example omits `url`, which is
currently required. Either fix the code so `url` is truly optional (auto-derived
from `object_type`), or add `url` to the example with a note.
---
## [MINOR] Unit tests do not cover core behavior
`HubSpotSourceFactoryTest` only verifies the `factoryIdentifier` string and that
`ACCESS_TOKEN` appears in `requiredOptions`. The most important behaviors are untested:
- That `access_token` is injected as `Authorization: Bearer <token>` in HTTP headers.
- That `object_type` produces the correct API URL.
- That the default `content_field` (`$.results`) is set when not explicitly configured.
The E2E test only asserts `exitCode == 0` without verifying actual data content.
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "Suresh-Krishna-Kusuma (via GitHub)" <gi...@apache.org>.
Suresh-Krishna-Kusuma commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-4243255457
@davidzollo Thank you so much for the kind words! I really appreciate you noticing the effort. Getting the architecture exactly right to match SeaTunnel's standards was a top priority for me, and I learned a lot about the framework in the process.
@DanielLeens @davidzollo The PR code logic looks solid and the E2E MockServer tests are passing successfully. However, the CI matrix build keeps failing in the core engine module (seatunnel-engine-server), specifically on PipelineCleanupRecordHazelcastSerializationTest.testPutAndGetAcrossMembers due to a 30-second ConditionTimeoutException (Hazelcast cluster port binding failure).
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-5480365473
Hi @goutamadwant, thanks for checking in on this one — I re-checked the current PR state to answer your status question with the latest facts.
Current head is still `f399efa6328f` (unchanged since my last full review on 2026-07-19), so nothing new has landed on the code side. The one remaining blocker from that review is still open and unchanged: `docs/zh/connectors/source/HubSpot.md` still places the ASF header (`<!--`) as its first line instead of the required changelog import / first-level heading, so `MarkdownTest.testPrimaryHeadersHaveNoTextAbove` and `MarkdownTest.testConnectorDocWithChangeLogFlagAndFile` still fail deterministically — that's the sole failure in the current `Build` check run: https://github.com/Suresh-Krishna-Kusuma/seatunnel/actions/runs/29634954624/job/88055559969
Separately, and this is new since my last check: the branch is now quite far behind `dev` (`behind_by=293`, compare status `diverged`) and GitHub is reporting a real merge conflict (`mergeable_state=dirty`). That will need to be resolved before CI can give a clean signal either way.
@Suresh-Krishna-Kusuma, so to unblock: please (1) sync this branch with the latest `dev` and resolve the conflicts, and (2) fix the doc header ordering in `docs/zh/connectors/source/HubSpot.md` to match the other connector docs. Once both are done and CI is green, I'm happy to take another pass — the core HubSpot pagination/runtime-wiring work from earlier rounds still looks solid to me, this is just the two items above standing between this and merge.
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-5617174455
CI-fact update: the `Build` check on this exact head (`caa98bfa72d`) has since completed and is now showing failure (it was still in_progress at review time). The failing job is `all-connectors-it-7 (11, ubuntu-latest)`; all four `unit-test` matrix jobs remain green. Worth confirming whether this failure is related to this module or environmental noise before merge.
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-4311381859
Hi @Suresh-Krishna-Kusuma
Please synchronize the branch with the latest apache/dev, or include the commit of #10745, then rerun the CI. The current failure is caused by the fix for the known CI flaky test not being merged into the head of this PR, and it is not an issue with the HubSpot connector itself.
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-4325602025
Thank you very much for attempting the Commit so many times, but we do not have permission to perform this operation.
Please do not rebase or merge the whole latest `dev` branch for this PR. That can pull in unrelated recent HTTP/File connector changes and cause conflicts around Airtable, FTP, etc.
The current CI failure is caused by one missing flaky-test fix, not by the HubSpot connector code. The safer fix is to cherry-pick only the commit from #10745:
a33327da4d6584d4f36965f0ba81181aabafad9f
You can run:
```
git fetch upstream dev
git checkout feature/hubspot-connector
git cherry-pick -x a33327da4d6584d4f36965f0ba81181aabafad9f
./mvnw spotless:apply -pl seatunnel-engine/seatunnel-engine-server -am -nsu
git push origin feature/hubspot-connector
```
This commit only changes:
seatunnel-engine/seatunnel-engine-server/src/test/java/org/apache/seatunnel/engine/server/master/cleanup/PipelineCleanupRecordHazelcastSerializationTest.java
So it should avoid the unrelated HTTP/File connector conflicts. After pushing that cherry-pick, CI should include the flaky-test stabilization from #10745 and can be rerun.
If the cherry-pick reports conflicts outside that one test file, please resolve them manually.
You can add my LinkedIn(https://www.linkedin.com/in/davidzollo), I think I can help you if you need any help for solving it ^_^
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-5149758074
Thanks for your contribution for Apache SeaTunnel.
To facilitate focused communication among contributors, we’ve created a brand-new dedicated #contributors channel in official Slack workspace.
Slack workspace link: https://s.apache.org/seatunnel-slack
This channel is designed for technical discussions, feature design brainstorming, roadmap sync and direct communication with project core Contributors. Everyone who contributes code, docs, test cases or community ideas is warmly invited to join, share thoughts and collaborate together under The Apache Way. Welcome to join us😄
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "DanielCarter-stack (via GitHub)" <gi...@apache.org>.
DanielCarter-stack commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-3847446156
<!-- code-pr-reviewer -->
<!-- cpr:pr_reply_v2_parts {"group": "apache/seatunnel#10447", "part": 1, "total": 1} -->
### Issue 1: Configuration conversion has type incompatibility risk
**Location**: `HubSpotSource.java:46`
**Severity**: BLOCKER
**Recommendation**: Refactor to use custom Parameter class pattern
### Issue 2: Document naming does not follow project conventions
**Location**: `docs/en/connectors/source/HubSpot.md`
**Severity**: MINOR
**Recommendation**: Rename to `Hubspot.md` or standardize to capitalize only the first letter
### Issue 3: Missing required configuration file updates
**Location**: `plugin-mapping.properties`, `seatunnel-dist/pom.xml`, `config/plugin_config`
**Severity**: BLOCKER
**Recommendation**: Add all required configuration entries
### Issue 4: Custom Parameter class not implemented
**Location**: `HubSpotSource.java` overall design
**Severity**: MAJOR
**Recommendation**: Create `HubSpotSourceParameter` class
### Issue 6: Sensitive information may leak to logs
**Location**: `HubSpotSource.java:59`
**Severity**: MINOR
**Explanation**: This is a common issue with base classes; recommend overriding toString() in HttpParameter
### Issue 7: Missing newline at end of file
**Location**: `docs/en/connectors/source/HubSpot.md:56`
**Severity**: MINOR
**Recommendation**: Add newline at end of file
### Issue 8: Inconsistent changelog format
**Location**: `docs/en/connectors/changelog/connector-http-hubspot.md`
**Severity**: MINOR
**Recommendation**: Use the same format as other HTTP connectors
### Issue 9: Completely lacking test coverage
**Location**: Entire `connector-http-hubspot` module
**Severity**: MAJOR
**Recommendation**: Add Factory tests and configuration conversion tests
### Issue 10: Documentation missing critical usage instructions
**Location**: `docs/en/connectors/source/HubSpot.md`
**Severity**: MINOR
**Recommendation**: Add documentation for pagination, rate limiting, etc.
---
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-4368029488
Hi @Suresh-Krishna-Kusuma, thanks again for all the persistence here. I know this PR has gone through quite a few review rounds already, and I really appreciate the care you have put into getting it closer to SeaTunnel standards.
I rechecked the current CI state. The branch is currently diverged from the latest `apache/dev`, and the remaining CI failures are coming from broader engine / JDBC / SFTP test jobs rather than the HubSpot connector path itself. So the first thing I would suggest is to align this PR branch with the latest `apache/dev` and rerun CI. That should give the branch the best chance to pick up recent CI / flaky-test fixes before we spend more time chasing failures that may already be fixed upstream.
There is one code-path issue I still think we should fix before merge:
`HubSpotSource` builds a separate `HubSpotSourceParameter`, but the actual reader path still comes from the parent `HttpSource.createReader()`, which passes the parent `httpParameter` into `HttpSourceReader`.
That means the HubSpot-specific changes such as the injected `Authorization` header, default URL construction from `object_type`, and cursor pagination defaults may not be used by the real runtime request path.
The simplest direction is probably to make sure the merged HubSpot config is applied before the parent `HttpSource` builds its `httpParameter` and `pageInfo`, or otherwise override the reader path so it uses the HubSpot-specific parameter object directly.
I would not ask for more E2E changes at this point. The current E2E coverage is enough for this stage; the main thing is to make the real runtime parameter path match the behavior documented by the connector.
Suggested next steps:
1. Align this branch with the latest `apache/dev`.
2. Fix the HubSpot runtime parameter path so the actual `HttpSourceReader` receives the HubSpot URL, Authorization header, and cursor paging defaults.
3. Rerun CI.
You are very close. Thanks again for sticking with this through several iterations.
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-4211116802
Thanks for the quick reply, and option A sounds like the right direction to me.
I re-checked the current HEAD, and the real runtime reader path still only consumes the first HubSpot v3 page today, so my previous blocker is still open until that paging logic lands in code.
Once the connector wires the default HubSpot cursor pagination into the actual `HttpSource` read path, I am happy to review again.
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on code in PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#discussion_r3940869380
##########
docs/en/connectors/source/Github.md:
##########
@@ -276,7 +276,7 @@ Source plugin common parameters, please refer to [Source Common Options](../comm
## Example
```hocon
-Github {
+Hubspot {
url = "https://api.github.com/orgs/apache/repos"
access_token = "xxxx"
method = "GET"
Review Comment:
Re-checked this in the latest full review pass: the shared `HttpSourceFactory.getHttpBuilder()` refactor that introduced `getHttpOptionBuilder()` is strictly additive — it only formally exposes six options (binary_chunk_size, enable_multi_lines, connect_timeout_ms, socket_timeout_ms, keep_params_as_form, keep_page_param_as_http_param) that Github/Gitlab/Klaviyo and the other 8 existing HTTP wrapper connectors already inherited and could already use; no option was renamed, removed, or had its default changed. So Github.md's documented contract stays accurate and doesn't need an update for this PR.
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-5535586830
@Suresh-Krishna-Kusuma Can you retry this CI failed task? https://github.com/Suresh-Krishna-Kusuma/seatunnel/actions/runs/33762900121/job/100675975246
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "goutamadwant (via GitHub)" <gi...@apache.org>.
goutamadwant commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-5471287196
Hi @Suresh-Krishna-Kusuma, quick status check on the HubSpot Source connector. Are you still planning to continue this PR and its remaining follow-up work? If there are review, CI, or implementation blockers, could you share them so the community can help? If you are no longer able to continue, please let us know so the tracker can be updated.
--
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
Re: [PR] Feature: [Connector-V2] Add HubSpot Source Connector structure (#10358) [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #10447:
URL: https://github.com/apache/seatunnel/pull/10447#issuecomment-6285340877
Pushed two commits on top of your branch, @Suresh-Krishna-Kusuma:
1. Merge of the current `dev`. Conflicts: `PostgresCDCIT.java`, `RocketMqContainer.java` and `RocketMqIT.java` (this branch carried a cherry-pick of #12050 that has since landed on `dev`; resolved by taking the `dev` versions, so the PR no longer touches those files), and `HttpSourceReaderInternalPollNextTest.java`, where `dev` added `testPollIntervalDoesNotHoldCheckpointLock` next to this PR's `testDefiniteArrayContentFieldProducesOneRowPerElement`; both tests are kept.
2. Issue 1 from my last review: the `$.results` `content_field` default is now applied only when the effective `format` is `JSON`, both in `HubSpotSource`'s constructor and in `HubSpotSourceParameter.buildRuntimeConfig` (new `resolveResponseFormat` helper). `text` and `binary` keep `content_field` unset, as the base `HttpSource` intends. `HubSpotSourceTest.testTextFormatDoesNotForceResultsContentField` pins this (it fails on the previous head because `contentJson` was `$.results`).
Only `spotless` was run locally. Your fork did not create a Build run for this push; if none appears, please start one from the Actions tab ("Run workflow" on Build). I started a verification run of the same head on my fork: https://github.com/DanielLeens/seatunnel/actions?query=branch%3Apr10447-verify-ac79326af75
--
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