-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore: Make validation pipelines more sensitive and meaningful (#1874)
#### Details Our validation pipeline is not very good at surfacing customer-impacting failures. It intentionally contains "should succeed" and "should fail" test cases, but failures from the "should fail" cases could mean "we completed the analysis and found accessibility errors" or "we failed to complete the analysis". ADO returns both cases as "partially successful", and the differences are only apparent by drilling down into the logs. This is why the puppeteer failure went unnoticed for so long. This PR improves validation usefulness by splitting the validation into 2 jobs--one that runs the tests, and one that validates the artifacts generated while running those tests. If any of the test cases fail to run, it will cause the set of artifacts to change, and the validation job will fail. If the validation job fails, then ADO will report the overall build status as "failed" instead of "partially succeeded". The validation job intentionally checks only the _presence_ of the expected artifact files, without validating the _contents_ of the expected artifact files. This allows us to continue to use the same template across Canary, Insider, and Production, even if the artifact content varies due to changes in our code or in a package that we consume (examples: ai-scan, axe-core). Artifact content validation is already handled in the PR and CI builds, where the code and the tests can be kept tightly synchronized. This PR also reclassifies the azure portal test from "should pass" (a classification added when we weren't 100% sure of the actual status due to the puppeteer problem) to "should fail" because it scans a page with a known accessibility error. It also puts the "should fail" tests that generate no artifacts at the end of the list of "should fail" tests that _do_ generate artifacts. This results in more intuitive naming for the "should fail" artifacts. Validation build using this change is at https://dev.azure.com/accessibility-insights-private/Accessibility%20Insights%20(private)/_build/results?buildId=48232&view=results. Review note: This PR involves adding some additional indentation to the old job. It's a lot easier if you select the "Hide whitespace" option when reviewing. It might also be useful to review it on a per-commit basis. The reclassification went in first, followed by adding the validation job. ##### Motivation Make it easier to detect customer-impacting failures via the validation pipeline ##### Context <!-- Are there any parts that you've intentionally left out-of-scope for a later PR to handle? --> <!-- Were there any alternative approaches you considered? What tradeoffs did you consider? --> #### Pull request checklist <!-- If a checklist item is not applicable to this change, write "n/a" in the checkbox --> - [n/a] Addresses an existing issue: Fixes - [n/a] Added relevant unit test for your changes. (`yarn test`) - [n/a] Verified code coverage for the changes made. Check coverage report at: `<rootDir>/test-results/unit/coverage` - [x] Ran precheckin (`yarn precheckin`)
- Loading branch information
Showing
1 changed file
with
181 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters