nic-6443 opened a new pull request, #13506:
URL: https://github.com/apache/apisix/pull/13506

   ### Description
   
   `construct_upstream` is invoked once per second per instance by the 
healthcheck manager timers (`timer_working_pool_check` / 
`timer_create_checker`), always against the cached route config. The current 
code correctly deepcopies the `checks` table before applying `auth.header` / 
`auth.query`, but this contract has no test coverage: if the clone were ever 
removed, the auth query string would be appended to `checks.active.http_path` 
again on every call (`/status?api_key=x?api_key=x?...`), breaking active probes 
one second after checker creation, and the cached route config would silently 
diverge from the config center.
   
   This PR adds a regression test that calls `construct_upstream` repeatedly 
and asserts the returned checks stay stable and the input instance table is not 
mutated. Verified the test fails with `call 2: unexpected http_path: 
/status?api_key=secret?api_key=secret` when the deepcopy is removed, and passes 
on master.
   
   ### Which issue(s) this PR fixes:
   
   N/A (test-only)
   
   ### Checklist
   
   - [x] I have explained the need for this PR and the problem it solves
   - [x] I have explained the changes or the new features added to this PR
   - [x] I have added tests corresponding to this change
   - [ ] I have updated the documentation to reflect this change
   - [x] I have verified that this change is backward compatible


-- 
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]

Reply via email to