mozilla / code-review

Automated static analysis & linting bot for Mozilla repositories
Mozilla Public License 2.0
56 stars 42 forks source link

Remove assertion on issues publication #2519

Closed La0 closed 1 week ago

La0 commented 1 week ago

We cannot rely anymore on the backend returning the same number of issues as provided input (due to issues being de-duplicated)

This assert must be removed, and the code right below must be updated to iterate over the issues by hash:

Something like

created = {i["hash"] for i in response.get("issues")}
for (issue, _) in valid_data:
   issue.on_backend = created.get(issue.hash)
La0 commented 1 week ago

Sample bot run where this happens https://firefox-ci-tc.services.mozilla.com/tasks/RbV4KVHRQFuMClKv70sy_g/runs/0/logs/public/logs/live.log