wyf027 opened a new pull request, #3489: URL: https://github.com/apache/dubbo-go/pull/3489
## What - Add `SetStaticConfig` support to `ScriptRouter` for application-scoped router configs. - Compile static JavaScript rules through the same engine used by dynamic rules. - Keep static rules isolated by provider application and replace or disable them safely. - Cover enabled, disabled, invalid, replacement, and cross-application behavior. ## Why Issue #3203 identifies static ScriptRouter configuration as an outstanding router gap. `RouterConfig` already carries `ScriptType` and `Script`, and the router-chain bootstrap already broadcasts static configs to routers that implement `StaticConfigSetter`, but `ScriptRouter` did not implement that interface. This recreates the final reviewed state of #3419 on the latest `develop`. The original PR cannot be reopened because its fork/head repository was deleted. ## User impact Applications can configure provider-application-specific script routing locally through `client.WithRouter`, without requiring a config-center rule. Dynamic rules still take precedence when present. ## Validation - `go test ./cluster/router/script` - `go test ./cluster/router/...` - `go test -race ./cluster/router/script` - `go test ./cluster/router/script -run '^TestScriptRouterSetStaticConfig$' -count=10` - `go vet ./cluster/router/script/...` - `golangci-lint run ./cluster/router/script --timeout=10m` - `make check-fmt` - `git diff origin/develop...HEAD --check` ## Documentation The previously requested website follow-up, apache/dubbo-website#3214, was also closed after its head repository was deleted and will need to be recreated separately. This PR remains a draft while that follow-up is outstanding. Refs #3203 Supersedes #3419 -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
