Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Longhaul: Tolerance adjustments (Azure#5916)
## Overview I split Azure#5869 into two PRs. The first (Azure#5902) has been merged. This is the second. Currently longhaul pass results don't indicate the current release criteria. I am updating the tolerances for our tests in order to make it easier on the release manager to know what is releasable vs what requires further investigation. I have added tolerances for the broker-enabled case too, just so we know we aren't causing any big regressions. A lot of these failures already have associated PBIs. For these cases I have linked the PBI/bugs below in the tolerance description section. In order to do this there were these steps: 1. Logic specific to each test report type to determine pass result from report data (i.e. test events + test conditions). 2. Modified tests as needed. No new tests added as I was thinking it is fine to verify manually. The unit tests are super valuable for this test framework when dealing with report generators (i.e. the classes that have complex logic to deal with multiple queues of test events). But since I didn't touch those I didn't think it was worth the opportunity cost to add further testing. I currently have longhaul and nested longhaul running and will wait to make sure the tolerances behave as expected before merge. ## Tolerance Descriptions **Custom Mqtt Telemetry Tolerance** Overview: - Sometimes we see message loss here so need a tolerance. Tolerance description: - [Nested-Edge] [Broker-Enabled]: We pass the tests as long as we get back 80% of messages. We sometimes have message loss, especially in middle->lower node telemetry. PBI Required: - No. We are rewriting the current version of the broker so not worth fixing, but the tolerance is good just to make sure nothing regresses. Notes: - When the new broker is running off of master branch, then this tolerance should be removed so we assure the new broker functions properly. **IoTHub Message Tolerance** Overview: - This only affects the broker. Sometimes we see message loss here so need a tolerance. When this problem occurs it affects < 10 messages. Tolerance description: - [Nested-Edge] [Broker-Enabled]: Pass the test if we receive 99% of messages. PBI Required: - No. We are rewriting the current version of the broker so not worth fixing, but the tolerance is good just to make sure nothing regresses. Notes: - When the new broker is running off of master branch, then this tolerance should be removed so we assure the new broker functions properly. **Twin Test Tolerance** Overview: - Sometimes we see some twin updates are missing in nested edge, but have still released in the past. This problem seems worse for non-broker vs broker-enabled, so it seems like a product issue we should followup on. I have only added a tolerance for the broker case so as not to mask this important issue. Tolerance description: - [Nested-Edge] [Broker-Enabled]: Two issues. 1) Missing some desired property updates coming through the sdk registered callback function. 2) Failing to update reported properties from the client. For both of these issues, we pass the tests if it happens less than 0.5% of the time. PBI Required: - No PBI needed to unwind this tolerance since it only affects the broker-enabled case. However it looks like there is a product issue for the non-broker case. I didn't add a tolerance here, as I think first we should do some investigation. It is worth running longhaul also on 1.2 to confirm behavior is the same. We logged a bug for a prior release [here](https://msazure.visualstudio.com/One/_workitems/edit/10039969), but now the problem may be more severe. We will need logs to investigate further. **Direct Method Tolerance** Overview: - A lot of these tolerances existed previously. For resource errors and transient errors, the tolerance seemed too high so I made the tests behave more strictly. For DeviceNotFound exceptions, we are looking at the test conditions to specify the exact tolerance. Tolerance description: - [All-Cases] Status code 0: Fail the tests if we get > 1 in 1000 direct methods with status code 0. - [All-Cases] Resource error: Fail the tests if we get > 1 in 1000 direct methods with resource error. - [All-Cases] Unauthorized: Fail the tests if we get > 1 in 1000 direct methods with resource error. - [All-Cases] Transient error: Fail the tests if we get > 1 in 1000 direct methods with transient error. - [All-Cases] NotImplemented: Fail the tests if we get > 1 in 1000 direct methods with NotImplemented error. - [Nested-Edge] [Broker-Enabled] DeviceNotFound: Fail the tests if we get > 1 in 400 direct methods with DeviceNotFound - [Nested-Edge] [Non-Broker] DeviceNotFound: Fail the tests if we get > 1 in 250 direct methods with DeviceNotFound - [Single-Node] DeviceNotFound: Fail the tests if we get > 1 in 200 direct methods with DeviceNotFound PBI Required: - Yes, only for the fact that in nested edge, broker-enabled gets way less DeviceNotFound exceptions compared to non-broker. The bug we logged during a prior release exists [here](https://msazure.visualstudio.com/One/_workitems/edit/10149346). We will need logs to investigate further. ## Pipeline Confirmation Here are the pipelines I have ran with these changes to confirm this will not regress any of our infra: 1. Longhaul: https://msazure.visualstudio.com/One/_build/results?buildId=49427019&view=results 2. Nested Longhaul: https://msazure.visualstudio.com/One/_build/results?buildId=49427258&view=results 3. Connectivity: https://msazure.visualstudio.com/One/_build/results?buildId=49431644&view=results 4. Nested Connectivity: https://msazure.visualstudio.com/One/_build/results?buildId=49431669&view=results 5. End to End: https://dev.azure.com/msazure/One/_build/results?buildId=49431614&view=results 6. Nested End-to-End : https://msazure.visualstudio.com/One/_build/results?buildId=49431628&view=results ## Azure IoT Edge PR checklist:
- Loading branch information