History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-3087
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Steve Luo
Reporter: Sebastian Potasiak
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
QuickBuild

Git repository settings change detected improperly causing working directory to be deleted and recreated

Created: 24/Nov/17 02:08 PM   Updated: 22/Feb/18 03:09 AM
Component/s: None
Affects Version/s: 6.0.36, 7.0.28
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
We have a git repository configured in our setup. We observe that once in a while before a build starts, it deletes the whole working directory.

In logs we have observed an INFO message:

INFO - Repository setting changed, deleting working directory [...]

QuickBuild detects settings change, resulting in working directory deletion, even though nothing changed. It is a big problem for us since we have big repositories that require 5 - 30 minutes to be checked out.

What we have noticed is that the setting change is detected only after new revision is created in a repository - problem doesn't occur when there are no changes in code.

In theory, QB deletes working directory when it detects changes in its properties located in .qbcache/git-scm.xml, eg.:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<entry key="fetchurl">https://git_user_name:******@bitbucket.tomtomgroup.com/scm/project/repository_name.git&lt;/entry>
<entry key="pushurl">https://git_user_name:******@bitbucket.tomtomgroup.com/scm/project/repository_name.git&lt;/entry>
</properties>

The settings change detection compares each <entry> with values read from Git repository settings, using java.util.Properties objects, and com.google.common.base.Objects.equal() function in com.pmease.quickbuild.plugin.scm.helper.AbstractRepository<>.getChangedSettings() method (called by com.pmease.quickbuild.plugin.scm.helper.AbstractRepository<>.hasSettingChanged()).

Current repository configuration is being read using com.pmease.quickbuild.plugin.scm.git.GitRepository.getCurrentRC() method and returns java.util.Properties object with URLs corresponding to the git-scm.xml file eg.:

fetchurl = https://git_user_name:******@bitbucket.tomtomgroup.com/scm/project/repository_name.git
pushurl = https://git_user_name:******@bitbucket.tomtomgroup.com/scm/project/repository_name.git

Note that asterisks come from QuickBuild itself (we use masked passwords stored in secret variables).

 All   Comments   Work Log   Change History      Sort Order:
No work has yet been logged on this issue.