#985 Use the actual name from the NVR instead of component.package when reusing components (FACTORY-2802)
Merged 8 months ago by mprahl. Opened 8 months ago by mprahl.

@@ -199,7 +199,7 @@ 

  

          tag_id = self.module_target['build_tag']

          repo = self.koji_session.getRepo(tag_id)

-         builds = [self.koji_session.getBuild(a) for a in artifacts or []]

+         builds = [self.koji_session.getBuild(a, strict=True) for a in artifacts or []]

          log.info("%r checking buildroot readiness for "

                   "repo: %r, tag_id: %r, artifacts: %r, builds: %r" % (

                       self, repo, tag_id, artifacts, builds))

@@ -747,6 +747,7 @@ 

          if show_state_url:

              state_url = get_url_for('component_build', api_version=api_version, id=self.id)

          json.update({

+             'batch': self.batch,

              'state_trace': [{'time': _utc_datetime_to_iso(record.state_time),

                               'state': record.state,

                               'state_name': INVERSE_BUILD_STATES[record.state],

@@ -67,7 +67,7 @@ 

              build_id=None,

              task_id=component.task_id,

              build_new_state=previous_component_build.state,

-             build_name=component.package,

+             build_name=nvr_dict['name'],

              build_version=nvr_dict['version'],

              build_release=nvr_dict['release'],

              module_build_id=component.module_id,

This addresses an issue when a module contains builds that have different names in their NVR than the component name in MBS. This happens with SCLs for instance. MBS wouldn't be able to find the component to mark as tagged in the database since it was searching by the wrong name, so the build would just stall. This uses the NVR now to find the correct build in the database.

This was approved in #983. For some reason the diff is still off...

Pull-Request has been merged by mprahl

8 months ago

The changes came in fine after merging. Not sure what happened.