Kallithea issues archive

Issue #248: [doc/feature] Improve cache invalidation to detect changes to repositories

Reported by: Charles Murphy
State: open
Created on: 2016-10-09 02:54
Updated on: 2018-05-18 20:16

Description

Kallithea should detect and use changes to the repositories done outside of it without requiring to drop caches manually.

Original report:

I've recently set up a Kallithea sever for evaluation locally, based on the documentation. It seems that the server isn't displaying the pushed changesets in the log/graph, unless I restart the server. This is a recent install/config on windows with the most recent version 0.3.2 using mercurial.

Attachments

Comments

Comment by Thomas De Schampheleire, on 2016-10-09 05:50

To which path/url are you pushing? If you do not push via the Kallithea url, Kallithea does not see the new commits until its cache is invalidated. That can be done manually via the Settings of that repo (Advanced), or scripted via an API call.

The normal way though is to push to the Kallithea url so you don't have to care about caches...

Comment by Charles Murphy, on 2016-10-10 01:28

Correct; I was pushing directly through the filesystem for my demo configuration which would never happen in practical use. I apologize for submitting a non-issue. Thanks for the prompt and helpful response.

Comment by Charles Murphy, on 2016-10-10 01:28

There was no issue, the software wasn't being used as intended

Comment by Andrej Shadura, on 2016-10-10 06:27

Comment by Andrej Shadura, on 2016-10-10 06:27

I do actually think it is an issue we’d need to deal with one day.

Comment by Andrej Shadura, on 2016-10-10 06:27

Comment by Andrej Shadura, on 2016-10-10 06:28

Comment by domruf, on 2016-10-10 12:46

FYI I have experimented with celerybeat to allow cron like tasks.

Maybe we simply add a tasks that checks for changes once an hour?

Comment by Thomas De Schampheleire, on 2016-10-10 12:56

Once an hour is still too slow for many use cases. When something is pushed to the repo, it may be expected to be immediately visible in Kallithea UI.

For example, we use a 'push' wrapper that also creates a review request; between the push and creation of the review request, Kallithea cache needs to be invalidated first. If Kallithea would detect the change 'immediately' then it would be easier.

Comment by domruf, on 2016-10-10 13:31

This was more of an idea for a short term solution until the problem gets 'really' solved.

Comment by Mads Kiilerich, on 2016-10-13 18:50

I don't like polling. Unexpected magic can make it harder to figure out what is going on.

If repositories are modified outside Kalliteha, they should call the push hook directly. For Mercurial it can be configured in .hg/hgrc manually. I guess the hooks are installed for Git but might require some tweaking. I don't know what the 'real' solution (if any) should be, but I think the short term solution is to document this workaround (after figuring out exactly what works).

Comment by Thomas De Schampheleire, on 2018-05-18 20:16