#1920 display some taskinfo for deleted buildtags
Merged 2 years ago by tkopecek. Opened 2 years ago by tkopecek.
tkopecek/koji issue1866  into  master

file modified
+8 -4
@@ -624,15 +624,19 @@ 

      values['buildroots'] = buildroots

  

      if task['method'] == 'buildArch':

-         buildTag = server.getTag(params[1])

-         values['buildTag'] = buildTag

+         try:

+             values['buildTag'] = server.getTag(params[1], strict=True)['name']

+         except koji.GenericError:

+             values['buildTag'] = "%d (deleted)" % params[1]

      elif task['method'] == 'buildMaven':

          buildTag = params[1]

          values['buildTag'] = buildTag

      elif task['method'] == 'buildSRPMFromSCM':

          if len(params) > 1:

-             buildTag = server.getTag(params[1])

-             values['buildTag'] = buildTag

+             try:

+                 values['buildTag'] = server.getTag(params[1], strict=True)['name']

+             except koji.GenericError:

+                 values['buildTag'] = "%d (deleted)" % params[1]

      elif task['method'] == 'tagBuild':

          destTag = server.getTag(params[0])

          build = server.getBuild(params[1])

file modified
+4 -4
@@ -79,7 +79,7 @@ 

          #if $task.method == 'buildSRPMFromSCM'

          <strong>SCM URL:</strong> $params[0]<br/>

          #if $len($params) > 1

-         <strong>Build Tag:</strong>: <a href="taginfo?tagID=$buildTag.name">$buildTag.name</a><br/>

+         <strong>Build Tag:</strong> <a href="taginfo?tagID=$buildTag">$buildTag</a><br/>

          #end if

          #if $len($params) > 2

          $printOpts($params[2])
@@ -88,7 +88,7 @@ 

          <strong>CVS URL:</strong> $params[0]

          #elif $task.method == 'buildArch'

          <strong>SRPM:</strong> $params[0]<br/>

-         <strong>Build Tag:</strong> <a href="taginfo?tagID=$buildTag.name">$buildTag.name</a><br/>

+         <strong>Build Tag:</strong> <a href="taginfo?tagID=$buildTag">$buildTag</a><br/>

          <strong>Arch:</strong> $params[2]<br/>

          <strong>Keep SRPM?</strong> #if $params[3] then 'yes' else 'no'#<br/>

          #if $len($params) > 4
@@ -140,8 +140,8 @@ 

          #elif $task.method == 'wrapperRPM'

          <strong>Spec File URL:</strong> $params[0]<br/>

          #if 'locked' in $buildTarget

-         #set $buildTag = $buildTarget

-         <strong>Build Tag:</strong> <a href="taginfo?tagID=$buildTag.id">$buildTag.name</a><br/>

+         #set $buildTag = $buildTarget.name

+         <strong>Build Tag:</strong> <a href="taginfo?tagID=$buildTag">$buildTag</a><br/>

          #else

          <strong>Build Target:</strong> <a href="buildtargetinfo?targetID=$buildTarget.id">$buildTarget.name</a><br/>

          #end if

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

2 years ago

rebased onto f0ff55a

2 years ago

Metadata Update from @jcupova:
- Pull-request tagged with: testing-done

2 years ago

Commit d696c7c fixes this pull-request

Pull-Request has been merged by tkopecek

2 years ago