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

Key: QB-593
Type: Bug Bug
Status: Resolved Resolved
Resolution: Won't Fix
Priority: Critical Critical
Assignee: Robin Shen
Reporter: AlSt
Votes: 0
Watchers: 0
Operations

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

Conditional (via execute condition) QB repository dependency is always "resolved"/executed

Created: 29/Jul/10 07:38 AM   Updated: 09/Aug/10 07:18 AM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: None
Image Attachments:

1. screenshot-1.jpg
(248 kb)

2. screenshot-2.jpg
(234 kb)

3. screenshot-3.jpg
(404 kb)

4. screenshot-4.jpg
(237 kb)

5. screenshot-5.jpg
(150 kb)
Environment: QB 2.1.47


 Description  « Hide
In a configuration the step "smoke" is a QB repository checkout step (latest build: generate new if necessary) with an execute condition "... && !(vars.get("skipSmoke") != null && vars.get("skipSmoke").asBoolean())". That is, setting the variable "skipSmoke" to "true" should allow skipping the step "smoke" for the sake of saving time.

However, the (QB repository) dependency (build) is seemingly executed before the dependent build and ignoring the execution condition.

Using the execution condition sounds like the perfect way to do this (as the logic is right where it belongs to).

What do you suggest?

A workaround like handing over the variable to the dependency build and in there checking the variable (master step execute condition) always leads to a new dependency build (independent of repository changes) due to the usage of variables IIRC.

Even thought I don't like this workaround because the logic is confusingly distributed: Would handing over the variable to the dependency build and extending the build condition of the dependency build to first check the variable value always lead to new dependency builds (independent of repository changes) in case it is not skipped?

 All   Comments   Work Log   Change History      Sort Order:
Robin Shen [29/Jul/10 02:01 PM]
The reason is that QuickBuild will by default take snapshot and check changes for all involved repositories referenced by repository related steps (such as checkout step, label step). To ignore the smoke test repository completely, I suggest modifying snapshot taking script and build condition like below:
snapshot taking script:
for (repository: configuration.getInvolvedRepositories()) {
  if (!repository.getName().equals("smoke test qb repository") || !vars.get("ignoreSmokeTest").asBoolean())
    repository.takeSnapshot();
}

build condition:
for (repository: configuration.getInvolvedRepositories()) {
  if ((!repository.getName().equals("smoke test qb repository") || !vars.get("ignoreSmokeTest").asBoolean()) && repository.isChanged())
    return true;
}
return false;

AlSt [09/Aug/10 07:18 AM]
Hi Robin,
thanks for the very quick (as usual) response with the provided acceptable workaround.

Unfortunately each of the scripts (snapshot taking and build condition) fills now almost the full screen due to having to supporting ~20 different conditions, therefore I had hoped to implement it according to the description. But, as already said, I can live with it.