Skip to content

dependencies: Proactively parse lockfiles in background

Administrator requested to merge ef/31643 into main

Created by: efritz

Fixes #31643 (closed).

Test plan

  • Existing tests in CI and newly added unit tests
  • Manual e2e testing:
    • Add "codeIntelLockfileIndexing.enabled": true to site config
    • Create global auto-indexing policy
    • Wait and then confirm with psql
    sourcegraph@localhost:5432 sourcegraph# select * from last_lockfile_scan;
     repository_id |     last_lockfile_scan_at
    ---------------+-------------------------------
                 1 | 2022-05-23 12:59:50.152192+02
                 2 | 2022-05-23 12:59:50.152192+02
                 3 | 2022-05-23 12:59:50.152192+02
    (3 rows)
    
    sourcegraph@localhost:5432 sourcegraph# select * from codeintel_lockfiles;
     id | repository_id |                commit_bytea                | codeintel_lockfile_reference_ids
    ----+---------------+--------------------------------------------+----------------------------------
      1 |             1 | \xf144a35ed4ac538fae93fa3783175108738f71b9 | {}
      2 |             2 | \xbaf6e34a292ff7b57184d2987d79f0352987d8b4 | {1,2}
      3 |             3 | \x285adcc5ced0bb267a7c874cfa3ca238266ce14f | {3,4,5,6,7}
    (3 rows)

Merge request reports

Loading