Skip to content

feat(connector): support Aliyun DM regions#8892

Merged
charIeszhao merged 1 commit into
masterfrom
charleszhao-support-aliyun-dm-region
May 28, 2026
Merged

feat(connector): support Aliyun DM regions#8892
charIeszhao merged 1 commit into
masterfrom
charleszhao-support-aliyun-dm-region

Conversation

@charIeszhao
Copy link
Copy Markdown
Member

Summary

  • Add regionId configuration for the Aliyun Direct Mail connector.
  • Route SingleSendMail requests to the endpoint for the configured Direct Mail region.
  • Keep existing configurations backward compatible by defaulting to cn-hangzhou.

Root cause

Aliyun Direct Mail sender addresses are region-scoped. The connector previously always called the Hangzhou endpoint, so sender addresses created in regions such as Singapore could not be found.

Testing

Unit tests

@github-actions github-actions Bot added the feature Cool stuff label May 27, 2026
@github-actions
Copy link
Copy Markdown

COMPARE TO master

Total Size Diff 📈 +3.87 KB

Diff by File
Name Diff
.changeset/support-aliyun-dm-region.md 📈 +108 Bytes
packages/connectors/connector-aliyun-dm/README.md 📈 +319 Bytes
packages/connectors/connector-aliyun-dm/src/constant.ts 📈 +1.28 KB
packages/connectors/connector-aliyun-dm/src/index.test.ts 📈 +605 Bytes
packages/connectors/connector-aliyun-dm/src/index.ts 📈 +110 Bytes
packages/connectors/connector-aliyun-dm/src/mock.ts 📈 +9 Bytes
packages/connectors/connector-aliyun-dm/src/single-send-mail.test.ts 📈 +858 Bytes
packages/connectors/connector-aliyun-dm/src/single-send-mail.ts 📈 +120 Bytes
packages/connectors/connector-aliyun-dm/src/types.test.ts 📈 +468 Bytes
packages/connectors/connector-aliyun-dm/src/types.ts 📈 +48 Bytes

@charIeszhao charIeszhao marked this pull request as ready for review May 28, 2026 00:52
@charIeszhao charIeszhao requested a review from gao-sun as a code owner May 28, 2026 00:52
Copilot AI review requested due to automatic review settings May 28, 2026 00:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds regional Aliyun Direct Mail support so the connector can send through the endpoint matching the configured sender-address region while preserving the Hangzhou default.

Changes:

  • Adds regionId validation, config form option, region-to-endpoint mapping, and default cn-hangzhou.
  • Routes SingleSendMail requests to the selected regional endpoint and includes RegionId in the signed request payload.
  • Adds unit tests, README documentation, and a changeset for the connector update.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/connectors/connector-aliyun-dm/src/constant.ts Defines supported regions, endpoints, default region, and config form item.
packages/connectors/connector-aliyun-dm/src/types.ts Adds regionId config validation and narrows request RegionId.
packages/connectors/connector-aliyun-dm/src/single-send-mail.ts Selects endpoint by region and sends RegionId in request parameters.
packages/connectors/connector-aliyun-dm/src/index.ts Reads configured region and passes it to mail sending.
packages/connectors/connector-aliyun-dm/src/mock.ts Updates mock typing for the narrowed region union.
packages/connectors/connector-aliyun-dm/src/*.test.ts Adds validation and request-routing coverage for region support.
packages/connectors/connector-aliyun-dm/README.md Documents the new optional regionId setting.
.changeset/support-aliyun-dm-region.md Adds a minor release changeset.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/connectors/connector-aliyun-dm/src/constant.ts
@charIeszhao charIeszhao merged commit 10d4c22 into master May 28, 2026
53 of 55 checks passed
@charIeszhao charIeszhao deleted the charleszhao-support-aliyun-dm-region branch May 28, 2026 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

4 participants