#4274 Don't prepopulate log list for mavenBuild
Merged 4 months ago by tkopecek. Opened 4 months ago by tkopecek.
tkopecek/koji issue4273  into  master

file modified
+7 -4
@@ -2033,9 +2033,7 @@ 

                        os.path.join(outputdir, maven_info['artifact_id'] + '-' +

                                     maven_info['version'] + '-patches.zip'))

  

-         logs = ['checkout.log']

-         if self.opts.get('patches'):

-             logs.append('patches.log')

+         logs = []

          output_files = {}

  

          for path, dirs, files in os.walk(outputdir):
@@ -2058,9 +2056,14 @@ 

                  self.uploadFile(os.path.join(outputdir, relpath, filename),

                                  relPath=relpath)

  

-         # Also include the logs already upload by BuildRoot

+         # Also include the logs already uploaded by BuildRoot

          logs.extend(buildroot.logs)

  

+         # Also include the checkout logs (uploaded during checkout)

+         logs.append('checkout.log')

+         if self.opts.get('patches'):

+             logs.append('patches.log')

+ 

          buildroot.expire()

  

          return {'maven_info': maven_info,

Related: https://pagure.io/koji/issue/4273

I'm not completely sure that it is ok, but I believe that this is superceded by update in https://pagure.io/koji/c/c51ae5d6b34d67bc903a818241720e0b15c95de4

please doublecheck that I'm not breaking it. (real task in brew 66091839 - see that checkout.log is already there)

The problem is a longstanding bug in the maven code that was revealed by #4093.

The maven code is adding checkout.log to the logs list, where the entries are expected to be relative to outputdir. This file is under the task workdir. It's created by the call to scm.checkout, not by a BuildRoot method, so it won't be listed included in buildroot.logs. It is already uploaded though, because scm.checkout uses log_output.

The maven code is calling uploadFile with a path that never existed.

I suspect that the current version of this PR will prevent the inclusion of these files in the build entry, even though they are uploaded to the task directory.

1 new commit added

  • include the checkout logs in task result
4 months ago

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

4 months ago

Commit fccf4fa fixes this pull-request

Pull-Request has been merged by tkopecek

4 months ago
Metadata