ps-19 opened a new pull request, #1806: URL: https://github.com/apache/apisix-ingress-controller/pull/1806
<!-- Please answer these questions before submitting a pull request --> ### Type of change: <!-- Please delete options that are not relevant. --> <!-- Select all the options from below that matches the type your PR best --> - [ ] Bugfix - [x] New feature provided - [ ] Improve performance - [ ] Backport patches - [ ] Documentation - [ ] Refactor - [ ] Chore - [ ] CI/CD or Tests ### What this PR does / why we need it: The pull request proposes to add a feature to the end-to-end (e2e) test cases of a system to check if the controller has restarted. The goal is to detect and report any issues with the controller that may cause it to crash and restart, which could lead to false-positive results in the test cases. The proposed solution is to add a detection mechanism at the end of each e2e use case that checks if the controller has restarted. This check will be performed in the afterEach() function and will report any restarts detected during the test case cleanup. The code snippet provided in the pull request suggests using the Kubernetes API to retrieve the status of the controller deployment and comparing the number of replicas specified in the deployment specification with the number of ready replicas. If the check detects a controller restart, it will fail the test case and return true, indicating that a restart was detected. Otherwise, it will return false, indicating that no restart was detected. <!--- 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 2. Test is required for the feat/fix PR, unless you have a good reason 3. Doc is required for the feat PR 4. Use a new commit to resolve review instead of `push -f` 5. Use "request review" to notify the reviewer once you have resolved the review --> - [x] Did you explain what problem does this PR solve? Or what new features have been added? - [x] Have you added corresponding test cases? - [x] Have you modified the corresponding document? - [x] 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
