Skip to content

repo-updater: Update out parameter on missed code path

Administrator requested to merge vg/no-panic into main

Created by: varungandhi-src

The 'sourced' parameter is used as an "out parameter", initially its ID is not set, but it will set when the repo is created. However, on this code path, the ID was not updated.

Since the returned diff is ignored in syncRepo, it makes sense to update the out parameter, otherwise the new ID is lost.

This fixes a downstream crash when trying to enqueue an update for a repo with ID == 0.

Tentative fix for #32171 (closed). This seem to fix the crash in local testing when I try a dependency search after truncating lsif_dependency_repos and using update repo set deleted_at = now() where name like 'npm/%';.

Test plan

  • TODO: Add tests (how do we test this easily?)

Merge request reports

Loading