Skip to content

Commit

Permalink
Fix merge issue during rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Shriganesh Shintre committed Aug 14, 2017
1 parent 9b9412c commit 3607eae
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions app/master/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,17 +303,14 @@ def _on_enter_preparing_state(self, event):

subjob_calculator = getattr(event, 'subjob_calculator', None)
if subjob_calculator is None:
raise RuntimeError('Build failed due to invalid subjob_calculator in PREPARING state.')
#try:
subjobs = subjob_calculator.compute_subjobs_for_build(self._build_id, job_config, self.project_type)
# except AtomizerError:
# # Ignore the AtomizerError if the build is canceled (AtomizerError can be intentional when build
# # is in canceled state.
# if self.is_canceled:
# raise
# else:
# raise

raise RuntimeError('Build failed as subjob_calculator is not set for this build {}.', self._build_id)
try:
subjobs = subjob_calculator.compute_subjobs_for_build(self._build_id, job_config, self.project_type)
except AtomizerError as ex:
if self.is_canceled:
# Add info to the AtomizerError error message. If build is canceled, then AtomizerError is expected.
ex.args = ex.args + ('This is expected as Build {} is CANCELED.'.format(self._build_id),)
raise
self._unstarted_subjobs = Queue(maxsize=len(subjobs)) # WIP(joey): Move this into BuildScheduler?
self._finished_subjobs = Queue(maxsize=len(subjobs)) # WIP(joey): Remove this and just record finished count.

Expand Down

0 comments on commit 3607eae

Please sign in to comment.