bosprimigenious opened a new pull request, #1076:
URL: https://github.com/apache/dubbo-go-pixiu/pull/1076
**What this PR does**:
Reject invalid `uri_regex` patterns during `Apply()`, so the existing
filter-manager configuration-error path handles them before a request chain is
prepared. Valid patterns, capture replacements, and the existing two-entry
check keep their behavior.
```diff
Apply():
require two uri_regex entries
- return nil
+ compile the expression and return any syntax error
```
**Which issue(s) this PR fixes**:
Fixes #1075
**Special notes for your reviewer**:
- **Before:** the 10-case regression has 5 failures and 5 passing controls;
malformed expressions pass validation and panic in `PrepareFilterChain`.
- **After:** all 10 cases pass. Root ran `go test -gcflags=-l -race` for
proxyrewrite, filter-manager, HTTP context and YAML packages: all 4 packages
pass, 83 passing test events including parent/subtests, no skips. Scoped `go
vet`, gofmt and repository imports-formatter 1.0.10 pass; `go.mod` and `go.sum`
are unchanged.
- Independently rerun public manager/real HTTP recorder controls exercise
invalid patterns, valid rewrites/headers, strict failed reload preserving the
previous chain, and best-effort reload retaining valid filters. This verifies
factory/chain behavior, not process-wide crash behavior in a deployed gateway.
- **NOT READY / draft:** full repository lint/race, CI license, Docker
samples and RISC-V jobs have not been verified for this head. A local
license-tool attempt exited 0 but checked 0 files, so it is not counted; both
changed files retain their original ASF headers. No CI result from #1074 is
reused for this change.
- Concurrent external mutation of a published factory configuration, or
directly bypassing its `Apply()` lifecycle, is outside this fix.
- Prepared with OpenAI Codex, including code/tests and description;
independent AI checks were repeated by the submitting agent. No human review is
claimed.
**Does this PR introduce a user-facing change?**:
```release-note
Invalid proxy-rewrite regular expressions are rejected when configuration is
loaded, before request filter-chain construction.
```
**Merge Danger:** two-way door; blast radius is proxy-rewrite configuration
validation. No dependency or data migration.
--
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]