Skip to content

Commit

Permalink
ref(ownership): remove premunge option
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshFerge committed Sep 11, 2024
1 parent 3c2f9e7 commit e0b6ffe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
5 changes: 2 additions & 3 deletions src/sentry/models/projectownership.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,8 @@ def _matching_ownership_rules(
) -> Sequence[Rule]:
rules = []
if ownership.schema is not None:
munged_data = None
if options.get("ownership.munge_data_for_performance"):
munged_data = Matcher.munge_if_needed(data)
munged_data = Matcher.munge_if_needed(data)

for rule in load_schema(ownership.schema):
if rule.test(data, munged_data):
rules.append(rule)
Expand Down
7 changes: 0 additions & 7 deletions src/sentry/options/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -2706,10 +2706,3 @@
default=0.0,
flags=FLAG_AUTOMATOR_MODIFIABLE,
)

register(
"ownership.munge_data_for_performance",
type=Bool,
default=False,
flags=FLAG_AUTOMATOR_MODIFIABLE,
)
4 changes: 2 additions & 2 deletions src/sentry/ownership/grammar.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ def test_with_munged(
self, data: PathSearchable, munged_data: tuple[Sequence[Mapping[str, Any]], Sequence[str]]
) -> bool:
"""
Temporary function to test pre-munging data performance in production. will remove
and combine with test if prod deployment goes well.
A function for optimized performance which can take in the pre-munged data.
functionalty equivalent to test() but faster when used repeatedly.
"""
if self.type == URL:
return self.test_url(data)
Expand Down

0 comments on commit e0b6ffe

Please sign in to comment.