apply.sh does not wait for current commit to be applied (race)

I observed the follwing in my dev env:

  • I run apply.sh to update to recent main (without changing values)
  • apply.sh runs and completes very quickly...
  • ... but hasn't actually waited properly

It doesn't occur all the time.

When it occurs, running sylvactl watch .. again allows to proceed to completion.

I suspect the reason is something like this:

  • when the HelmRelease reconciliation is triggered the sylva-units GitRepository hasn't yet been update
  • the HelmRelease template rendering hence does a lookup on the not-yet-updated sylva-units GitRepository
  • the sylva-core GitRepository (whose ref depends on this lookup) isn't updated
  • sylvactl prematurely concludes that this GitRepository (which a dependency of all units) is ready

/cc @feleouet

Assignee Loading
Time tracking Loading