Revolyssup opened a new pull request, #2495: URL: https://github.com/apache/apisix-ingress-controller/pull/2495
This PR solves two bugs and adds corresponding E2E tests: 1. `backendErr` is currently a shared variable due to which even if one backend is invalid, no backend is set causing 0 nodes to be set on upstream even when there are valid nodes. A test case confirming the fix for this has been added. The test `valid backend is set even if other backend is invalid` confirms this fix. 2. The weight from backend was not set in the upstream label which is used to set weight on `weightedUpstreams` due to which all nodes always get `100` as weight. The tests `2:1 traffic split test` and `zero-weight test` confirm this fix. - [ ] Bugfix - [ ] New feature provided - [ ] Improve performance - [ ] Backport patches - [ ] Documentation - [ ] Refactor - [ ] Chore - [ ] CI/CD or Tests ### What this PR does / why we need it: <!--- Why is this change required? What problem does it solve? --> <!--- If it fixes an open issue, please link to the issue here. --> ### Pre-submission checklist: <!-- Please follow the requirements: 1. Use Draft if the PR is not ready to be reviewed 3. Test is required for the feat/fix PR, unless you have a good reason 4. Doc is required for the feat PR 5. Use a new commit to resolve review instead of `push -f` 6. Use "request review" to notify the reviewer once you have resolved the review --> - [ ] Did you explain what problem does this PR solve? Or what new features have been added? - [ ] Have you added corresponding test cases? - [ ] Have you modified the corresponding document? - [ ] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix-ingress-controller#community) first** -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org