Skip to content

AssertionError: Build target not found #119

@La0

Description

@La0

https://sentry.prod.mozaws.net/operations/code-review-bot/issues/6358889/

AssertionError: Build target not found
(1 additional frame(s) were not displayed)
...
  File "python3.7/contextlib.py", line 74, in inner
    return func(*args, **kwds)
  File "code_review_bot/cli.py", line 99, in main
    update_build=phabricator_reporting_enabled,
  File "code_review_bot/revisions.py", line 87, in __init__
    self.load_phabricator(try_task)
  File "code_review_bot/revisions.py", line 123, in load_phabricator
    buildable = self.api.find_target_buildable(self.build_target_phid)
  File "libmozdata/phabricator.py", line 460, in find_target_buildable
    assert len(targets) == 1, "Build target not found"

AssertionError: Build target not found

I think this issue happens a lot on testing only, because the testing hook is triggered for pulse messages from prod. But it's currently connected to the phab-dev instance (which does not have the requested build).

Cleanly failing the task with a specific exception + log should do the trick.

Metadata

Metadata

Assignees

Labels

botCode review botbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions