Rule Templates
Rule Templates are global Regular Expressions, which expand into Rules, when new (untriaged) signatures are encountered by Simscope.
- During Regression imports, if a Job is imported but no existing rules match it, then a Rule Template can automatically Create a New Rule.
- Rule templates can match across any Signature and any branch.
This is an advanced use case, where you want to automatically assign new errors to a user, based on the incoming Job's:
- Signature pattern (Regular Expression)
- Component
- Branch pattern (Regular Expression)
- Optionally: any other job field
Example Rule Template
For example, you might want to automatically assign a group of new errors to Nancy
:
- Component
alpha_cpu_core
- Branch
main|dev
(regular expression:main
ordev
branch) - Job contains
testgroup =~ daily
- Signature Title contains
overflow
→ A Rule Template can do this.
Adding a Rule Template
Note: adding/editing Rule Templates requires Manager or higher user privileges.
To add a Rule Template:
- In the top blue bar, Click Rules.
- Click Rule Templates.
- Click the Add Rule Template button.
Then set the rule fields:
- Signature pattern (use
.*
to match any signature). - Job pattern (e.g.
component=abc
or regex:component=~abc|xyz
). - Branch pattern (either a raw string or a Regular Expression).
- Assignee.
Example: Rule Template assignment
This example shows a Rule Template (0.4
) expanding into 3 child Rules (based on 3 Signatures):
Rule Template 0.4
├── Rule 1248.1
├── Rule 903.1
└── Rule 751.2
Rule Template assignment email
When a Rule template matches a new Signature, it will send the assignee an email notification.
Here is an example email notification, for user pdq
on Signature 19
:
Rule Template Fields
Note: Rule Template fields are a super-set of Rule fields.
Field | Optional | Example |
---|---|---|
Signature Pattern | corelogic | |
Job Search Pattern | component =~ alphaǀbeta | |
Branch | main | |
State | OPEN | |
Assignee | Jill | |
Issue | ✅ | CHIP-99 |
Rule Template Activation
Afterward, if a regression runs on the alpha_cpu_core
component, and a new Pipeline mismatch
error with testgroup daily2
is posted to Simscope, then it will automatically:
- Create a Signature Rule (based on the above matching template).
- Assign to user
Jill
. - And send a notification email to Jill.
Rule Template Restrictions
- Rule Templates do not match on existing jobs. They only match on future jobs imported to Simscope.
- If an active Rule matches the incoming job, Rule templates will be ignored (skipped).
- Rule Templates cannot be marked as
FIXED
.- Since template rules act on brand new Signatures, marking them as
FIXED
is specifically defeating triage. - However, you can mark a template rule as
WONTFIX
- Also, after the template rule creates a child rule, you can mark the child rule as
FIXED
with a Fix ID.
- Since template rules act on brand new Signatures, marking them as