Repository navigation
[ISSUE #6614] Fix namespace plugin enabled result mapping - #7188
Conversation
Aias00
left a comment
There was a problem hiding this comment.
Nice catch — this result-map entry was wrong in three separate ways at once:
column="enable"— the actual column isenabled(confirmed:Base_Column_Listselectsenabled, and every query in this file aliasesnpr.enabled AS enabled). Withcolumn="enable"the mapping silently never matched, sogetEnabled()stayed at its default.property="sort"— the value was being written into the sort field, which is whysortcame back wrong too. This single line was corrupting two properties.jdbcType="BOOLEAN"vs theTINYINT/integer column used throughout the rest of the mapper.
The corrected mapping (column="enabled" jdbcType="TINYINT" property="enabled") is consistent with the column list, the insert statements, and the Boolean enabled property on NamespacePluginRelDO.
The new mapper test is the right kind of regression test: it inserts a row with sort=37, enabled=false and asserts both survive the round-trip, so a reversion of either half of this line would fail.
Non-blocking inconsistency left behind: insertSelective declares #{enabled, jdbcType=INTEGER} (line ~476) while batchSave uses jdbcType=BOOLEAN and the update statements use TINYINT. That mismatch is pre-existing and harmless for MySQL, but consolidating on TINYINT would avoid surprises on stricter databases.
|
Ping on state: this PR is approved on the code, but the required checks are red and it cannot be merged yet. The failing jobs are No code change is expected from you. Once the shared e2e problem is resolved, please rerun the failed jobs (or push a trivial rebase) so the required checks go green, and this can be merged. |
|
@dengliming This PR is approved, but 7 checks are red: I inspected these lanes today and they fail for infrastructure reasons rather than on the diff — the Please rebase onto |
|
@dengliming — a correction to the note I left here yesterday. The failures on this branch all predate the fix, so nothing in your change is implicated.
That means the red checks recorded here are stale. A push — an empty commit or a rebase, whichever is easier — re-runs them against the current baseline. I would not spend time reading the old logs. For the |
|
Hi @dengliming, this PR is already approved, but it currently cannot be merged. Here is the blocker and what is needed: Blocker What we need Once the branch is up to date and CI is green, we will squash-merge it. Thanks! |
Aias00
left a comment
There was a problem hiding this comment.
Additional local validation of the already-approved commit 3b6888f: NamespacePluginRelMapperTest passed all 6 tests in an isolated worktree, with zero failures/errors/skips. The H2-backed integration test confirms that enabled=false is returned correctly and sort remains 37. No new blocking findings; my existing approval still applies.
Ran the Maven wrapper with JDK 21 and project compiler settings; Checkstyle passed, RAT/JaCoCo skipped for this targeted run. Other database engines were not exercised.
Correct the
NamespacePluginRelDObase result map so theenableddatabase column populates theenabledproperty instead of overwritingsort.Adds an H2 mapper regression test that verifies a disabled relation with a non-zero sort value is read back correctly through
listByNamespaceId.Tested with:
./mvnw -q -pl shenyu-admin -am -DskipTests=false -Dcheckstyle.skip=false -Dtest=NamespacePluginRelMapperTest -DfailIfNoTests=false testFixes #6614