feat: align router rule delivery and management chain - #1530
Open
xiaobaicai66695 wants to merge 6 commits into
Open
feat: align router rule delivery and management chain#1530xiaobaicai66695 wants to merge 6 commits into
xiaobaicai66695 wants to merge 6 commits into
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Please provide a description of this PR:
Background
Closes #1523.
Dubbo Admin could model several traffic rules, but the complete delivery chain was inconsistent across the Console API, configuration-center storage, watcher decoding, frontend editing, and dubbo-go runtime consumption. In particular, rule names and ZooKeeper paths could diverge, Condition YAML could lose fields after switching tabs, and Affinity/Script rules did not have a complete management path.
What this PR changes
Rule delivery and configuration-center contract
from/to/weightconditions version-specific and round-trip safe./dubbo/config/dubbo/<rule-name>, creates missing parent nodes, and keeps legacy locations read-only for compatibility.Console API
Frontend
conditionsare visible and editable in the form, while v3.0 continues to use string conditions.{ enabled, key, runtime, scope }object.configVersion,priority,force,conditions, and the remaining backend fields across detail, form, YAML, and save round trips.Problems fixed
zk: node does not existenabled/key/runtime/scopeconditions, but the form did notconfigVersionEnd-to-end verification
The local reproduction harness verifies the full behavior chain, not only receipt of a ZooKeeper event:
The harness and evidence are intentionally kept outside this PR under
quickstart-demo/e2e/admin-router-rule-chain; they are local reproduction artifacts and are not tracked by dubbo-admin.Greeter, groupdemo, providers20000/2000120000, and disabling/deleting the rule restored unrestricted provider selectionGreeterTag, grouptag20100; Admin detail, standard ZK node, consumer assertion, and provider logs all passed20101GreeterScript, groupscript20200through actual JavaScript invoker filtering20201GreeterAffinity, groupaffinity2030020301GreeterDynamic, groupdynamicconsistenthashingwith identical arguments kept all 8 calls on one provider; Admin response, standard ZK node, consumer assertion, and provider logs passedThe newer Dynamic Config
roundrobinvariant has not produced a final successful report yet, so it is deliberately not claimed as passed here. Dynamic Config runtime parsing/matching also depends on apache/dubbo-go#3660 (background: apache/dubbo-go#3661).Automated tests
go test ./...— passed.yarn test— passed: 9 test files, 18 tests.yarn vite build— passed.git diff --check upstream/develop...HEAD— passed.New regression coverage includes external YAML codec round trips and validation, Console request/response contracts, Service Argument Route upsert behavior, ZooKeeper path/config-center selection, Condition v3.1 form/YAML round trips and incomplete-state reload, Tag rule naming, and nested menu state.
yarn type-checkand repository-wideyarn lintstill report pre-existing baseline errors in unchanged Home, Resource/Grafana, test placeholder, and legacy traffic pages. The changed-file ESLint run and production Vite build complete successfully.To help us figure out who should review this PR, please put an X in all the areas that this PR affects.
Please check any characteristics that apply to this pull request.