Shopify / cli

Build apps, themes, and hydrogen storefronts for Shopify
https://shopify.dev
MIT License
436 stars 128 forks source link

Report GraphQL system errors as expected #4811

Open gordonhirsch opened 1 week ago

gordonhirsch commented 1 week ago

WHY are these changes introduced?

Improve accuracy of the CLI error count SLOs by marking GraphQL failures due to internal server errors as expected.

Internal server errors are recorded as unexpected events by the back-end that generates them. From the point of view of the CLI, we expect such errors will occur and we communicate the failure to the user. That's all we can do, so they should not count against the error count SLOs

WHAT is this pull request doing?

Uses a common type to identify all GraphQL. Interrogates the error response info to determine if the error is internal, and reports the error as expected if it is internal.

How to test your changes?

Post-release steps

Measuring impact

How do we know this change was effective? Please choose one:

Checklist

github-actions[bot] commented 1 week ago

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟑 Statements
72% (-0.03% πŸ”»)
8351/11599
🟑 Branches
68.42% (-0.04% πŸ”»)
4038/5902
🟑 Functions
71.34% (+0.02% πŸ”Ό)
2193/3074
🟑 Lines
72.37% (-0.04% πŸ”»)
7897/10912
Show files with reduced coverage πŸ”»
|
St.:grey_question:
| File | Statements | Branches | Functions | Lines | | :----------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------- | :------------------------------------------------------------- | :------------------------------------------------------------- | :------------------------------------------------------------- | | 🟒 |
`...` / ConcurrentOutput.tsx
|
98.39% (-1.61% πŸ”»)
|
90.91% (-4.55% πŸ”»)
| 100% |
98.33% (-1.67% πŸ”»)
| | 🟑 |
`...` / error.ts
|
70.42% (-8.89% πŸ”»)
|
63.64% (-9.89% πŸ”»)
|
93.33% (+1.03% πŸ”Ό)
|
69.57% (-9.01% πŸ”»)
|

Test suite run success

1890 tests passing in 865 suites.

Report generated by πŸ§ͺjest coverage report action from e35b8aba785f7356269a0f15dc776fef2b23bb45