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


+             '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_name=component.package,

+             build_name=nvr_dict['name'],




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

a year ago

rebased onto 042b677

a year 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

a year ago