#983 Use the actual name from the NVR instead of component.package when reusing components (FACTORY-2802)
Closed 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,

Use the actual name from the NVR instead of component.package when reusing components. This causes issues with SCLs.

While trying to debug FACTORY-2802, I wanted to know the NVR of a component build and its batch but realized I can't. This PR exposes this through the API. Additionally, while looking through the logs, it seems that in the buildroot_ready method, occasionally self.koji_session.getBuild returns None silently but we actually want it to fail right there if the build isn't found, as it causes issues in the koji.util.checkForBuilds method below it.

rebased onto 0e71f77502d287998143d7fcd2a6ee91417beba8

8 months ago

rebased onto 042b677

8 months ago

For some reason the diff is missing some stuff. I'll take a look to make sure the git history is still correct.

The diff is still wonky. I'll close the PR and reopen it.

Pull-Request has been closed by mprahl

8 months ago