Skip to content

policies: update matched repos right after policy is created

Administrator requested to merge mrn+es/strawman-instant-policy into main

Created by: mrnugget

This is a strawman proposal: probably not the best code to solve this and maybe not performant, but something to start discussion.

Background is that I've been writing intergration tests for lockfile-indexing-based dependency search and the tests have to wait for the lockfile policy to take effect.

Without the change in this PR this takes ~1min, because the matcher only runs every minute and checks whether repos match a new policy.

With this change, we match the repositories right after creating policy. That's not ideal, it should be in the background, but it feels great man when the policy matches immediately after creation.

Test plan

  • Existing tests & manual testing

Merge request reports

Loading