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

[type:refactor] externalize Huawei LTS logging to plugin-store - #7503

Merged
Aias00 merged 2 commits into
apache:masterfrom
cloudbase-ai:cloudbase/externalize-logging-huawei-lts
Oct 9, 2026
Merged

Aias00 merged 2 commits into
apache:masterfrom
cloudbase-ai:cloudbase/externalize-logging-huawei-lts

Conversation

@cloudbase-ai

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

Copy link
Copy Markdown
Contributor

Problem And Result

Hand off logging-huawei-lts ownership to apache/shenyu-plugin-store#13, 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>
@cloudbase-ai

Copy link
Copy Markdown
Contributor Author

Checked head 07dfeb1 for the seed-cleanup omissions found in #7499 and #7500. All six init dialects (H2/MySQL/PostgreSQL/OpenGauss/OceanBase/Oracle) have no remaining Huawei LTS plugin id=43, plugin_handle or namespace_plugin_rel records, and no orphan namespace relations. The current OpenGauss storage E2E failure is different: https://github.com/apache/shenyu/actions/runs/37748023470/job/113264811572 shows PUT /anything/xx/yy returning HTTP/1.1 502 Bad Gateway with Server: awselb/2.0 at 11:10:57 UTC. This suite points upstream to public httpbin.org; gateway logs show the Divide selector and rule matching successfully for that scenario. Seven of eight storage cases passed; only the path-pattern case failed with endpoint not exists after this 502. Evidence points to a public upstream failure rather than the removed Huawei LTS metadata. Native SQL checks and pr_build passed. No source changes were needed for the SQL cleanup; no compilation, tests or reruns were performed. A separate CI hardening change should replace public httpbin.org with a local test fixture.

Aias00
Aias00 previously approved these changes Oct 9, 2026

@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 Huawei LTS logging to plugin-store

I reviewed this as a deletion/externalization PR (same family as #7499/#7500/#7501). The code removal is clean and the cross-dialect schema consistency — the exact spot where #7500 (casdoor) dropped orphan rows — is correct here.

What's done right

  • Cross-dialect schema parity (verified). For plugin_id='43' the PR removes, across all six dialects (mysql, ob, og, oracle, pg, h2):
    • plugin row: 1 each
    • plugin_handle rows: 22 each (the 20 base fields + keyword/maskType/maskStatus + 2 sampleRate rows). The h2 file matches the 5 production dialects exactly — this is precisely where #7500 failed, and it is correct here.
    • namespace_plugin_rel row: 1 each
  • Resource rows are per-dialect consistent with master, not a blind uniform count. mysql/ob delete 20 resource rows (both the block and pause menu trees); og/pg delete 10 (the block tree only). I confirmed against master that og/pg create-table.sql only ever contained the block tree (10 rows) and no pause tree, and that h2 schema.sql never carried these resource rows at all. So every dialect deletes exactly what its master contained — no orphan resource rows left behind.
  • Compatibility contract retained. PluginEnum.LOGGING_HUAWEI_LTS(177, 0, "loggingHuaweiLts") is kept (only the javadoc wording changed to "compatibility enum"), and shenyu-common/.../PluginEnumTest.java (which references it) is untouched, so the kept test still compiles and passes.
  • No dangling references. The e2e enum Plugin.LOGGINGHUAWEILTS is removed; gh search code shows no other (non-deleted) file references it. Remaining hits are either inside the deleted module tree, the intentionally-kept historical db/upgrade/*.sql archives, or the retained PluginEnum. shenyu-bootstrap/pom.xml's dependency is removed by the diff, and both aggregator poms (shenyu-plugin-logging/pom.xml, shenyu-spring-boot-starter-plugin/pom.xml) drop the module entries.
  • Property / LICENSE scope safe. <huawei-log-sdk.version> and the two lts-sdk-* LICENSE entries are removed; the version property is referenced only by root pom.xml (definition) and the deleted module, so no kept pom resolves an undefined property.
  • CI is fully green on every job (build, all shenyu-integrated-test-*, k8s-ingress, e2e, CodeQL, native-sql, build-docker-images).

Non-blocking suggestions

  1. RELEASE-NOTES.md — please add an entry under Unreleased → Behavior Changes stating that the Huawei LTS logging implementation is no longer bundled in the core runtime and must be pulled from the plugin store. This is the only advance signal for downstream deployments that previously relied on the built-in starter.
  2. docs/cloud-logging-pluginenum-compatibility.md is produced by renaming the module spring.factories (55% similarity). The content is correct, but since it is now a standalone doc, a short title/section header at the top would read better than the raw former license header block.
  3. Cutover gate. The PR body still says "This PR remains draft" and references the receiving shenyu-plugin-store#13, yet the PR is open and CI is green. Merging should be coordinated with the store release as you've described; that is a release-process gate, not a code defect.
  4. Named validation gap. The body notes Oracle/OpenGauss/OceanBase SQL execution is unverified. The row sets are byte-for-byte consistent with their respective master files (same IDs and counts), so risk is low, but it is worth a final manual confirm before the store cutover.

Conclusion

APPROVE. The externalization is complete and consistent; the only follow-ups are documentation/release-coordination items above. As with the other PRs in this series, please make sure the store-side delivery (shenyu-plugin-store#13) lands before merge.

Signed-off-by: cloudbase-ai <22498243+cloudbase-ai@users.noreply.github.com>
@Aias00
Aias00 merged commit 491e423 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