From d0f46559bdc306e673187823ef57cc6174018b37 Mon Sep 17 00:00:00 2001 From: Jodi Jang <116035587+jangjodi@users.noreply.github.com> Date: Tue, 25 Jul 2023 10:02:25 -0700 Subject: [PATCH] ref: Update ownership rule evaluation flow for multiple owners in rule (#7478) Add that first owner in rule will be assigned in ownership rule doc Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com> --- src/docs/product/issues/ownership-rules/index.mdx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/docs/product/issues/ownership-rules/index.mdx b/src/docs/product/issues/ownership-rules/index.mdx index 241f57578cfc8..7758818cc1039 100644 --- a/src/docs/product/issues/ownership-rules/index.mdx +++ b/src/docs/product/issues/ownership-rules/index.mdx @@ -116,8 +116,13 @@ Create external team/user mappings for your GitHub/GitLab teams and users by nav If you have both ownership rules and code owners, Sentry evaluates an event’s in-app frames against the rules in the following order: 1. Code owners, top-to-bottom + + a. If there are multiple owners in the rule, left-to-right + 2. Ownership rules, top-to-bottom + a. If there are multiple owners in the rule, left-to-right + After evaluation, the last rule matching returns the assignment. The order of the event’s stacktrace filepaths is irrelevant in determining the rule assignment. ### Example @@ -131,7 +136,7 @@ codeowners:*.js #ecosystem **Ownership Rules:** ``` -path:*.js #ecosystem +path:*.js #ecosystem #frontend path:sentry/api/* #api url:*subscription* #billing path:dist/frontend/components/* #frontend @@ -139,7 +144,10 @@ path:dist/frontend/components/* #frontend When Sentry receives an event with a stacktrace filepath: `dist/frontend/components/sidebar.js`, we: -1. Evaluate against the code owners top-to-bottom; we get one match. +1. Evaluate against the code owners top-to-bottom; we get one match with two owners in the rule. + + a. Evaluate the rule left-to-right; we choose the first owner. + 2. Evaluate against the ownership rules top-to-bottom; we get two matches. The matches, in order, are: