Visitar URL original
[type:refactor] externalize Aliyun SLS logging to plugin-store by cloudbase-ai · Pull Request #7501 · apache/shenyu · GitHub
Skip to content

[type:refactor] externalize Aliyun SLS logging to plugin-store - #7501

Merged
Aias00 merged 1 commit into
apache:masterfrom
cloudbase-ai:cloudbase/externalize-logging-aliyun-sls
Oct 9, 2026
Merged

Aias00 merged 1 commit into
apache:masterfrom
cloudbase-ai:cloudbase/externalize-logging-aliyun-sls

Conversation

@cloudbase-ai

@cloudbase-ai cloudbase-ai commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Problem And Result

Hand off logging-aliyun-sls ownership to apache/shenyu-plugin-store#11, which now includes original tests, fixtures, examples, deployment assets and SQL ownership manifests. Remove active plugin modules and owned assets from core once store delivery is ready. Shared schema DDL, generic APIs and complete historical upgrade SQL remain in core.

Receiving Assets And Validation

Ship db/plugins/<slug>/{h2,mysql,pg,og,ob,oracle}/preflight.sql and install.sql, row manifests, provenance and plugin-specific historical SQL archives. Metadata includes plugin definitions, selector/rule handles, menu resources, permissions and default-namespace relations. Run preflight before installation; repeat installs preserve existing plugin and namespace configuration. Full historical core upgrade files stay in main.

SQL provenance is recorded under the receiving db/plugins directories; original tests, examples and deployment fixtures retain their source layouts.

  • Executed shipped SQL twice on H2, MySQL (default and NO_BACKSLASH_ESCAPES) and PostgreSQL; verified row identities, conflicts and configuration preservation. Native Oracle/OpenGauss/OceanBase execution remains unverified.

Cutover Gates

This PR remains draft. Receiving CI/release validation and externally available store artifacts must pass before merge. Receiving CI must complete before main cutover. Native Oracle/OpenGauss/OceanBase SQL execution remains a named validation gap. No upstream merge or Maven publication has been performed.

Core does not depend on store artifacts; deployments select optional external starters and apply the matching store metadata scripts.

Roadmap: #7306.

Signed-off-by: cloudbase-ai <22498243+cloudbase-ai@users.noreply.github.com>

@Aias00 Aias00 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review: externalize Aliyun SLS logging to plugin-store

Thanks for the thorough migration work. I verified the code, cross-dialect schema consistency, residual references, and CI.

What is done correctly

  • Cross-dialect schema consistency (the part that usually breaks). The Aliyun SLS plugin (id='34') is removed from plugin, plugin_handle, namespace_plugin_rel, and the resource (menu + 8 permission rows) tables in all five production dialects (mysql/ob/og/oracle/pg). The plugin_handle deletion is consistent: 18 rows per dialect (14 base fields + 3 mask fields + 1 sampleRate). The H2 admin schema (shenyu-admin/src/main/resources/sql-script/h2/schema.sql) also deletes exactly 18 plugin_handle rows for '34', matching every other dialect. This is the exact spot where a sibling PR (#7500) previously left 5 orphan rows, so I checked it deliberately and it is clean here.
  • PluginEnum.LOGGING_ALIYUN_SLS(175, 0, "loggingAliyunSls") is retained as a stable compatibility contract. Good — this preserves the name/sort for store metadata, persisted configuration, and any external code, and avoids breaking the public enum surface in shenyu-common.
  • Residual references are fully clean. A full-tree scan of the PR head for aliyun/AliyunSls (excluding the unrelated TencentClsSlsLogCollector, where "Sls" = ShenYu Logging Service) finds no remaining file referencing the removed package, the artifactId shenyu-spring-boot-starter-plugin-logging-aliyun-sls, or any deleted class. The only symbol usages of LOGGING_ALIYUN_SLS outside the deleted module are the two enum definitions themselves, so removing the e2e Plugin.LOGGING_ALIYUN_SLS entry leaves no dangling compile reference.
  • Version property removed safely. aliyun-log-producer.version (root pom.xml) and the aliyun-log / aliyun-log-producer LICENSE entries are removed; the only consumer was the deleted module, so no kept pom.xml now references an undefined property.
  • Module wiring removed from shenyu-plugin/shenyu-plugin-logging/pom.xml and shenyu-spring-boot-starter-plugin/pom.xml, and the bootstrap dependency is dropped.
  • CI is fully green across the board (build, all integrated-test/k8s/e2e suites, CodeQL, native-sql, build-docker-images).

Non-blocking suggestions

  1. RELEASE-NOTES entry. Since the plugin module moves out of core, please add a ## Unreleased → ### Behavior Changes line in RELEASE-NOTES.md stating that loggingAliyunSls is now delivered via shenyu-plugin-store (with PluginEnum.LOGGING_ALIYUN_SLS retained for compatibility). This is the only early signal downstream custom-deployment authors get.
  2. Doc source. docs/cloud-logging-pluginenum-compatibility.md is created by renaming the module's META-INF/spring.factories. Functionally correct (the real autoconfig is removed via the deleted META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports), but it would read cleaner to delete spring.factories and author the doc from scratch rather than repurposing a license-header file.
  3. Body vs state. The PR body still says "This PR remains draft" and lists cutover gates, but the PR is open (not draft) and CI has passed. Please sync the description: merge should be coordinated with the store release (shenyu-plugin-store#11) and its published artifacts, which is a release-process gate rather than a code issue.

Conclusion

The code is correct and ready. Approved. The only thing to sequence is the store-side publication before the actual merge, per the cutover plan — that is outside this code review.

@Aias00
Aias00 merged commit b5fcf44 into apache:master Oct 9, 2026
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants