Skip to content

Commit

Permalink
Use < OR > query in aliases to fix issue (#2094)
Browse files Browse the repository at this point in the history
Fixing issues with the `!=` operator, see #2093
  • Loading branch information
michaelkedar committed Apr 9, 2024
1 parent 900148e commit 1f06a66
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docker/alias/alias_computation.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ def main():
AliasGroups and creating new AliasGroups for un-computed bugs."""

# Query for all bugs that have aliases.
bugs = osv.Bug.query(osv.Bug.aliases != '')
# Use (> '' OR < '') instead of (!= '') / (> '') to de-duplicate results
# and avoid datastore emulator problems, see issue #2093
bugs = osv.Bug.query(ndb.OR(osv.Bug.aliases > '', osv.Bug.aliases < ''))
all_alias_group = osv.AliasGroup.query()
allow_list = {
allow_entry.bug_id for allow_entry in osv.AliasAllowListEntry.query()
Expand Down

0 comments on commit 1f06a66

Please sign in to comment.