#1327 Allow the poller to clean up module builds without arches
Merged 4 years ago by mprahl. Opened 4 years ago by mprahl.

@@ -181,7 +181,9 @@ 

          self.koji_session = self.get_session(config)

          self.arches = [arch.name for arch in self.module.arches]

  

-         if not self.arches:

+         # Allow KojiModuleBuilder to be initialized if no arches are set but the module is in

+         # a failed set. This will allow the clean up of old module builds.

+         if not self.arches and module.state not in models.FAILED_STATES:

              raise ValueError("No arches specified in module build.")

  

          # These eventually get populated by calling _connect and __prep is set to True

@@ -82,6 +82,7 @@ 

  }

  

  INVERSE_BUILD_STATES = {v: k for k, v in BUILD_STATES.items()}

+ FAILED_STATES = (BUILD_STATES["failed"], BUILD_STATES["garbage"])

  

  

  def _utc_datetime_to_iso(datetime_object):

no initial comment

+1 Looks reasonable.

Move this to a public place, probably the models.py, in order to make it reusable in future code?

LGTM. Just one minor comment.

rebased onto 51722895fcdccc7d09141441ad68263c5a5be46c

4 years ago

@cqi I implemented your suggestion. Could you please take a look?

Build #228 failed (commit: 51722895fcdccc7d09141441ad68263c5a5be46c).
Rebase or make new commits to rebuild.

rebased onto ff32eaee4795e225b89d2bb4557b8ccbed58289f

4 years ago

rebased onto ddafbb8

4 years ago

Pull-Request has been merged by mprahl

4 years ago

Build #231 failed (commit: ddafbb8).
Rebase or make new commits to rebuild.