#986 Construct the NVR for the KojiTagChange messages
Merged a year ago by mprahl. Opened a year ago by mprahl.

@@ -156,9 +156,13 @@ 


              elif category == 'buildsys' and event == 'tag':

                  tag = msg_inner_msg.get('tag')

-                 artifact = msg_inner_msg.get('name')

-                 nvr = msg_inner_msg.get('nvr')

-                 msg_obj = KojiTagChange(msg_id, tag, artifact, nvr)

+                 name = msg_inner_msg.get('name')

+                 version = msg_inner_msg.get('version')

+                 release = msg_inner_msg.get('release')

+                 nvr = None

+                 if name and version and release:

+                     nvr = '-'.join((name, version, release))

+                 msg_obj = KojiTagChange(msg_id, tag, name, nvr)


              elif category == 'mbs' and object == 'module' and \

                      subobject == 'state' and event == 'change':

@@ -47,7 +47,7 @@ 

      component = models.ComponentBuild.from_component_nvr(

          session, msg.nvr, module_build.id)

      if not component:

-         log.error("No component %s in module %r", msg.artifact, module_build)

+         log.error("No component %s in module %r", msg.nvr, module_build)



      log.info("Saw relevant component tag of %r from %r." % (component.nvr,

Brew publishes the NVR on tag change messages, but Koji in Fedora infra does not. This constructs the NVR based on the name, version, and release in the Fedora formatted message. The Brew messaging is handled elsewhere.

1 new commit added

  • Fix a log statement in the tag handler
a year ago

rebased onto 28acfd8

a year ago

I realized that artifact and name had the same value so I got rid of artifact. Since it's a minor cosmetic change, I'll just merge it without another review.

Pull-Request has been merged by mprahl

a year ago