konlue opened a new pull request, #7677:
URL: https://github.com/apache/shenyu/pull/7677
## Description
Fixes #7589.
Renames the misspelled `loged` column of the `selector` and `rule` tables to
`logged`, and finishes the corresponding field renames across the codebase. The
rename was already half-landed (`SelectorData` in shenyu-common and the e2e
models used `logged` while `RuleData` and the admin DTOs used `loged`), so this
makes the naming consistent everywhere in one pass.
## Changes
- **Schemas**: `loged` → `logged` in the mysql/pg/oracle init schemas, the
h2 schema, and the mysql seed INSERT column list.
- **Upgrade scripts**: new
`db/upgrade/2.7.2-upgrade-2.7.3-{mysql,pg,oracle,og,ob}.sql` issuing `ALTER
TABLE ... RENAME COLUMN loged TO logged` for both tables, following the
existing 2.7.x upgrade script conventions. Existing deployments must run the
script for their dialect before upgrading.
- **Mappers**: `selector-sqlmap.xml` / `rule-sqlmap.xml` column references
updated (12 + 11 occurrences).
- **Java**: `SelectorDTO`, `RuleDTO`, `SelectorDO`, `RuleDO`, `SelectorVO`,
`RuleVO`, events, `SelectorUtil`, register services, gateway-side `RuleData`,
`AbstractShenyuPlugin`, `LocalPluginController`, the k8s parsers and the e2e
models now use `logged`/`getLogged`/`setLogged` consistently. Tests updated
accordingly (no assertion changes beyond the rename).
- **Compatibility (one release)**:
- `SelectorDTO`/`RuleDTO` carry `@JsonAlias("loged")`, so REST requests
posting the old field name keep working; responses now always serialize
`logged`.
- `RateLimiterHandle` uses `@SerializedName(value = "logged", alternate =
"loged")`, so rate-limiter rule handle JSON stored with the old key by existing
deployments keeps parsing; new writes use `logged` (Gson writes the primary
name only, so re-saved handles converge to `logged`).
- **Admin console bundle**: updated the 3 `"loged"` form-field occurrences
in the checked-in `index.f5d66cf1.js` bundle. Note for maintainers: the
upstream `shenyu-dashboard` source needs the matching one-word change in a
follow-up (I can link a PR there if wanted).
- **Release notes**: recorded under `Unreleased → Behavior Changes` with the
upgrade-script requirement and the REST response field change.
## Verbatim check
`git grep -in loged` returns 0 hits after this change.
## Checklist
- [x] I have read the
[CONTRIBUTING](https://github.com/apache/shenyu/blob/master/CONTRIBUTING.md)
doc.
- [x] I have updated the documentation accordingly (release notes + upgrade
scripts).
- [x] `./mvnw -B install -DskipTests -Dmaven.javadoc.skip=true -pl
shenyu-admin,shenyu-kubernetes-controller -am` → BUILD SUCCESS
- [x] `./mvnw -B test -pl shenyu-admin
-Dtest='*Selector*,*Rule*,*Register*,*RateLimiter*'` → 407 tests, 0 failures;
`./mvnw -B test -pl shenyu-common,shenyu-plugin/shenyu-plugin-base,shenyu-web`
→ all green; `shenyu-plugin-ratelimiter -am` → 37/37;
`shenyu-plugin-modify-response,shenyu-plugin-wasm-base -am` → all green
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]