<< Back to previous view

[QB-593] Conditional (via execute condition) QB repository dependency is always "resolved"/executed
Created: 29/Jul/10  Updated: 09/Aug/10

Status: Resolved
Project: QuickBuild
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: AlSt Assigned To: Robin Shen
Resolution: Won't Fix Votes: 0
Remaining Estimate: Unknown Time Spent: Unknown
Original Estimate: Unknown
Environment: QB 2.1.47

File Attachments: JPEG File screenshot-1.jpg     JPEG File screenshot-2.jpg     JPEG File screenshot-3.jpg     JPEG File screenshot-4.jpg     JPEG File screenshot-5.jpg    

 Description   
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?

 Comments   
Comment by 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;
Comment by 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.
Generated at Fri Oct 03 22:27:01 UTC 2025 using JIRA 189.