Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Would it be possible for "Record SCM Changes" to ignore errors? #4505

tomz ·

We have run into an issue where network hiccups have resulted in perforce or LDAP login failures that cause the pre-build portion of a build to fail outright. Sadly, this seems to happen a lot in our infrastructure, which we also need to fix. But, in the meantime, I would rather have missing SCM information than a failed triggered build, especially for builds that are supposed to trigger overnight. Would this be possible?

Alternatively, a retry operation, similar to retrying in steps, would also be nice here. Trying again in the next few seconds typically works for us.

  • replies 7
  • views 170
  • stars 0
robinshen ADMIN ·

How about turning off "Record SCM Changes" option in advanced setting of the configuration?

tomz ·

We still very much need this feature, turning it off would be worse than the 1 in a 50ish failures that it causes.

When I said "we'd rather have missing SCM information" I wasn't very clear. What I meant was, we'd rather have missing information whenever it fails to get it (around one in fifty builds). We can't turn it off entirely as we depend on it for several workflows.

robinshen ADMIN ·

Then how about specifying build condition as "always" for this configuration? And then configure checkout step to retry on failure. This way you still have scm changes but your night long build will always run on specified schedule.

tomz ·

Wait, just having a checkout step will also record SCM changes, so you don't need the prebuild step to do it? That is new information to me. This doesn't appear to be true with a sample build job.

We don't seem to get the nice list of SCM changes in the side bar unless advanced setting to record SCM changes is turned on. This means I either do not fully understand your solution, or your solution will not work for us.

If what I say is correct, and that the advanced setting needs to be turned on to get the SCM changes side bar data, then we require this feature to be more robust. Please add a bug ticket for it. If not, please give me more details on how to get that side bar populated without using this advanced setting feature to record SCM changes as a pre-build script.

robinshen ADMIN ·
tomz ·

FYI - the build conditions are already set as always, but the error still occurs. The way we fixed it, was by doing the following in a pre-build script:

import com.pmease.quickbuild.repositorysupport.Repository;  
for (Repository<?> repository: build.getRepositories()){  
	if(repository.isCheckout() || repository.isRecordChanges()){  

This effectively removes the master-step hidden code and allows the checkout/record changes steps to do it instead, and we set those steps to retry on failure. This appears to work, but I think you may want to review how/why the hidden master step code runs to record SCM changes.

robinshen ADMIN ·

Thanks for investigation. I checked the code and master step tries to retrieve changes when it starts, in order to show what have been changed at every beginning of build. What you did effectively disables that behavior.