Disabling Repository won't stop fetching updates

Hi,

if i disable a repository by setting “[ ] Enabled” to off, Continua continues to poll for changes. It just does not stop. Not even after the configured timeout value. This issue is even more a problem, if VersionControl is not reachable. For example when Credentials are invalid for a TFS server.

Thomas

Hi Thomas,

Repositories should not start a new repository polling task after they are disabled. However, any current polling task which is in progress will not be terminated. This is to ensure that the repository is not left in a indeterminate state in order to prevent problems if it is re-enabled. 

We have done some testing today and not been able to reproduce a scenario where a repository starts a new polling task after being disabled. To investigate further we would need further details:

Can you let us know which version of Continua CI you are running? What repository type has this issue (Git or TFS) and the repository settings used. Also let us know details of any errors listed in the event log. The diagnostics report which can be downloaded from the Administration -> Event Log page will contain these details. 

Ideally, if you can reproduce the issue with debug logging enabled and send us the log file, this will help us to quickly identify the cause of the issue. 

Please send the requested details to support@finalbulder.com.

Posted By Dave Sparks on 22 Nov 2017 06:26 PM
Repositories should not start a new repository polling task after they are disabled.
Yes.

However, any current polling task which is in progress will not be terminated. This is to ensure that the repository is not left in a indeterminate state in order to prevent problems if it is re-enabled. 
I understand. However, i won't be able to stop polling. Deleting and creating the repository, just to stop polling is not acceptable as a workaround. Suggestion: Disabling a repo should stop any pending actions and clear CI's repo cache. The repo state is defined to a clear state. When enabling the repo again, it will refresh anyway.

Thomas

Hi Thomas,

We don’t agreed that disabling the repository should reset its state. The Reset button does this. Disabling should only stop it from further polling (and triggering builds). Reinitialiising a repository after a full reset can take some time and the reset would clear the changeset history which may be a issue for some users .

It is however possible that we could change things to improve this - maybe allow the disabled repository to be reset, add some sort of stop-polling-now button or disable-and-reset button. 

We are however not completely clear what exactly is happening to cause this to be a problem for you. When we disable a repository, it is marked as such, and the repository continues to update the cache with any changes that is has already detected in the background. No further builds are run and once the current poll is finished, no more polling is started. Is the issue that the current poll is taking a long time and that the git executable using CPU cycle during that time?  If there is a credentials error then we would expect it to immediately fail with an error. Unless, maybe this is a Git repository and you are using the Git Credentials Manager with the credential.interactive switch on and this is hanging because is it attempting to show the username/password dialog? 

Can you provide us with more details so we can get clearer idea of what the issue is?

Hi Dave,

thanks for your complete feedback.

 Posted By Dave Sparks on 23 Nov 2017 03:14 PM
The Reset button does this.
I don't see a reset button. Is it available to Admins only? Right now, i am a project admin only.

It is however possible that we could change things to improve this - maybe allow the disabled repository to be reset, add some sort of stop-polling-now button or disable-and-reset button. 
We had trouble with build projects that were setup by devs, who no longer work for us. Thus the credentials became invalid, while the repo continued to poll (more than 240000 times) until we realized what was going on. As a workaround i might be able to provide valid credentials, so that the repo can get updated and disabled successfully. I considered the whole issue to be a bug. Now i better understand the functionality. As for now, i am not asking to change or add behaviour. Though such a solution as suggested by you can help to solve such issues.

Thanks a lot for your outstanding help.

Thomas

Hi Thomas,

Yes, the Reset button is only on the administration page at the moment. 

If the repository continued to poll 240000 times when disabled then this does appear to be a bug. We have not however managed to reproduce this.