Closed Bug 1067402 Opened 10 years ago Closed 8 years ago

allow alias' for rules

Categories

(Release Engineering Graveyard :: Applications: Balrog (backend), defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bhearsum, Assigned: bhearsum)

Details

Attachments

(2 files)

I was going through all of the Balrog rules today to make sure that we don't have anything overlapping between betas/releases/esrs. In doing so I need to update a bunch of rule ids in release configs. Right now, these are just numbers that correspond to the rule_id column in the balrog database - they really mean nothing. It might be nice if we supported alias' on them so we could do things like:
releaseConfig['testChannelRuleIds'] = ['beta-cdntest', 'beta-localtest']

...which have much more meaning, and would hopefully prevent typo errors (eg, typing 62 instead of 63).
Got to thinking about this a bit today...here's a couple of random thoughts:
* We need to be careful not to allow collisions between rule ids and alias. Eg: if we have a rule id of 100 and someone sets an alias of 100 to another rule, there's no way for the server to resolve it.
** One way of enforcing this is to require at least one non-numeric character in the alias.
* We should think about whether we may want multiple alias' for a single rule. Multiple vs. single alias is likely to have an effect on the database schema. My gut says that we're opening the door to a lot of confusion if we have multiple alias' for a single rule, but we should think about it a bit more.
Another thing to consider is how alias might work with the history API. Should you be able to query by alias there? Eg: /rules/<rule_id_or_alias>/revisions. What would you return for that? The revisions of the rule as far back as that alias was on it? Or return the full history of the rule that currently matches that alias?
Assignee: nobody → bhearsum
Attachment #8703155 - Flags: review?(catlee)
Attachment #8703156 - Flags: review?(catlee)
Commit pushed to master at https://github.com/mozilla/balrog

https://github.com/mozilla/balrog/commit/b808ecd839182e48dfb250f7243a51639341ce92
Merge pull request #40 from bhearsum/rule-alias

bug 1067402: Allow rules to have alias'. r=catlee
Comment on attachment 8703155 [details] [review]
add alias support to backend

Got r+ in PR. Will do final verification on aus4-dev before pushing to production.
Attachment #8703155 - Flags: review?(catlee)
Attachment #8703155 - Flags: review+
Attachment #8703155 - Flags: checked-in+
Attachment #8703156 - Flags: review?(catlee)
Attachment #8703156 - Flags: review+
Attachment #8703156 - Flags: checked-in+
Verified in dev this morning, and pushed to prod.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Product: Release Engineering → Release Engineering Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: