Skip to content

CAMEL-24373: Add camel-alibaba-sls and camel-alibaba-ots (Phase 3) - #25498

Open
atiaomar1978-hub wants to merge 6 commits into
apache:mainfrom
atiaomar1978-hub:feature/CAMEL-24373-alibaba-phase3-c587
Open

CAMEL-24373: Add camel-alibaba-sls and camel-alibaba-ots (Phase 3)#25498
atiaomar1978-hub wants to merge 6 commits into
apache:mainfrom
atiaomar1978-hub:feature/CAMEL-24373-alibaba-phase3-c587

Conversation

@atiaomar1978-hub

@atiaomar1978-hub atiaomar1978-hub commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Phase 3 of CAMEL-24373 adds two new Alibaba Cloud components following the same patterns established in Phases 1 and 2 (OSS, MNS, FC, SMS, KMS, EventBridge).

camel-alibaba-sls (alibaba-sls:)

Simple Log Service integration using com.aliyun:sls20201230.

Operations: putLogs, getLogs, listLogStores

camel-alibaba-ots (alibaba-ots:)

Table Store (OTS) integration using com.aliyun.openservices:tablestore.

Operations: putRow, getRow, updateRow, deleteRow, listTables

Build & docs wiring

  • Parent POM dependency management for SLS and Tablestore SDKs
  • BOM, coverage, catalog, component/endpoint DSL, kamelet dependencies
  • Component documentation pages and nav entries
  • MojoHelper registration for both modules

Tests

14 test classes across both modules covering all operations, endpoint configuration, operation constants, and producer client lifecycle. Tests use mocked SDK clients (no live Alibaba credentials required).

./mvnw -pl components/camel-alibaba/camel-alibaba-sls,components/camel-alibaba/camel-alibaba-ots test

Bugbot follow-up

Addressed Bugbot finding: producers no longer cache SDK clients locally; each exchange delegates to endpoint.initClient() so route restart after doStop() does not reuse a shut-down client.

Related

AI-generated on behalf of atiaomar1978-hub

@davsclaus

Copy link
Copy Markdown
Contributor

For phase 2 we had to rename the classes to ensure they have Alibaba as prefix
0e9bca4

otherwise we can have class name clashes.

Just mindful about this going forward.

@atiaomar1978-hub

Copy link
Copy Markdown
Contributor Author

Review follow-up (Bugbot)

Authenticated as atiaomar1978-hub and opened this PR against apache/camel main.

Initial Bugbot review

Bugbot flagged stale SDK client after route restart in OTSProducer (and the same pattern in SLSProducer): producers cached the client in a field while OTSEndpoint.doStop() shuts down and clears the endpoint-owned client.

Fix (commit 44179596)

  • Removed producer-level client caching in SLSProducer and OTSProducer
  • Each exchange now calls endpoint.initClient() so a restarted route gets a fresh client
  • Added OTSProducerTest and SLSProducerTest covering client re-initialization

Re-review

Bugbot re-run reports no remaining issues in SLS/OTS. It noted the same caching pattern still exists in Phase 1/2 components (OSS, KMS, FC, etc.) — out of scope for this Phase 3 PR; can be tracked separately if desired.

Tests

./mvnw -pl components/camel-alibaba/camel-alibaba-sls,components/camel-alibaba/camel-alibaba-ots test

All tests passing (14 test classes).

AI-generated on behalf of atiaomar1978-hub

@davsclaus

Copy link
Copy Markdown
Contributor

there is a merge conflict

@atiaomar1978-hub

Copy link
Copy Markdown
Contributor Author

Yes checking merge conflicts and renaming required classes

@atiaomar1978-hub

Copy link
Copy Markdown
Contributor Author

Review follow-up (@davsclaus)

Thanks for the reminder about the Alibaba class prefix convention from Phase 2 (0e9bca4).

Addressed in commit f20ef61: all SLS and OTS classes now use the AlibabaSls* / AlibabaOts* prefix, matching the AlibabaEventBridge* pattern:

Before After
SLSComponent AlibabaSlsComponent
SLSEndpoint AlibabaSlsEndpoint
SLSProducer AlibabaSlsProducer
SLSUtils / SLSHeaders / SLSOperations / SLSProperties AlibabaSlsUtils / AlibabaSlsHeaders / …
OTSComponent AlibabaOtsComponent
OTSEndpoint AlibabaOtsEndpoint
OTSProducer AlibabaOtsProducer
OTSUtils / OTSHeaders / OTSOperations / OTSProperties AlibabaOtsUtils / AlibabaOtsHeaders / …
SLSEndpointBuilderFactory AlibabaSlsEndpointBuilderFactory
OTSEndpointBuilderFactory AlibabaOtsEndpointBuilderFactory

Catalog, component metadata, and DSL regenerated. All tests passing:

./mvnw -pl components/camel-alibaba/camel-alibaba-sls,components/camel-alibaba/camel-alibaba-ots test

AI-generated on behalf of atiaomar1978-hub

cursoragent and others added 5 commits August 14, 2026 15:32
Implement producer-only alibaba-ots component using the native Tablestore
SyncClient SDK with putRow, getRow, updateRow, deleteRow and listTables
operations. Includes unit tests with Mockito, component documentation,
and parent POM registrations.

Co-authored-by: Omar Atie <atiaomar1978-hub@users.noreply.github.com>
Implement producer-only Alibaba Cloud Simple Log Service (SLS) component
with putLogs, getLogs and listLogStores operations using sls20201230 SDK.

Co-authored-by: Cursor <noreply@cursor.com>
Add camel-alibaba-sls and camel-alibaba-ots to BOM and coverage modules.
Regenerate catalog, component/endpoint DSL, kamelet dependencies, and
component documentation pages for Phase 3 Alibaba Cloud integration.

Co-authored-by: Omar Atie <atiaomar1978-hub@users.noreply.github.com>
Stop caching SLS and OTS clients in producers so endpoint.initClient()
is used on each exchange. This avoids reusing a shut-down SyncClient
after OTSEndpoint.doStop() clears the endpoint-owned client.

Co-authored-by: Cursor <cursoragent@cursor.com>
Follow the Phase 2 EventBridge rename pattern to avoid class name clashes
on case-insensitive filesystems. Rename component, endpoint, producer,
utils, headers, operations and properties classes to AlibabaSls* and
AlibabaOts* prefixes. Regenerate catalog, DSL and component metadata.

Co-authored-by: Cursor <cursoragent@cursor.com>
@atiaomar1978-hub

Copy link
Copy Markdown
Contributor Author

Rebased onto latest upstream/main (0aa0c029). Resolved one conflict in parent/pom.xml (kept upstream KMS version 2.2.0, retained aliyun-sls-version).

Tests still passing after rebase.

AI-generated on behalf of atiaomar1978-hub

@cursor
cursor Bot force-pushed the feature/CAMEL-24373-alibaba-phase3-c587 branch from f20ef61 to 05eba4f Compare August 14, 2026 15:33
@atiaomar1978-hub

Copy link
Copy Markdown
Contributor Author

@davsclaus could u please re-trigger the CI ?

@atiaomar1978-hub
atiaomar1978-hub marked this pull request as ready for review August 14, 2026 15:34
@github-actions

Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

- Sort camel-alibaba-ots before camel-alibaba-sls in BOM (alphabetical)
- Use symlinks for alibaba-sls/ots JSON examples like other components
- Align nav title with component doc: Alibaba Tablestore (OTS)
- Regenerate camel-main-configuration-metadata.json

Co-authored-by: Cursor <cursoragent@cursor.com>
@atiaomar1978-hub

Copy link
Copy Markdown
Contributor Author

Fixed CI uncommitted changes failure in run 31815064268:

  • BOM: sort camel-alibaba-ots before camel-alibaba-sls (alphabetical order)
  • Docs: replace copied JSON examples with symlinks to generated component metadata
  • Nav: use Alibaba Tablestore (OTS) title (matches component doc)
  • Regenerated camel-main-configuration-metadata.json

Commit: 81e9ae1c

AI-generated on behalf of atiaomar1978-hub

@atiaomar1978-hub

Copy link
Copy Markdown
Contributor Author

@davsclaus please trigger the CI ! thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants