#3200 Upload all file types after kiwi build
Closed 2 years ago by tkopecek. Opened 2 years ago by ignatenkobrain.
ignatenkobrain/koji kiwi2  into  master

file modified
+2 -9
@@ -393,17 +393,10 @@ 

          if os.path.exists(root_log_path):

              self.uploadFile(root_log_path, remoteName="image-root.log")

  

-         # for type in types:

-         #     img_file = '%s.%s-%s.%s' % (name, version, arch, type)

-         #     self.uploadFile(os.path.join(broot.rootdir()), remoteName=img_file)

-         #     imgdata['files'].append(img_file)

-         for ftype in ('disk_format_image', 'installation_image'):

-             fdata = result.result_files.get(ftype)

-             if not fdata:

-                 continue

+         for ftype, fdata in result_files.items():

              fpath = os.path.join(broot.rootdir(), fdata.filename[1:])

              img_file = os.path.basename(fpath)

-             self.uploadFile(fpath, remoteName=os.path.basename(img_file))

+             self.uploadFile(fpath, remoteName=img_file)

              imgdata['files'].append(img_file)

  

          if not self.opts.get('scratch'):

Please don't skip archiving these files.

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

2 years ago

@tkopecek what was the reason you did not want to archive those files in the beginning (initial kiwi support)?

It was just PoC "quickness" - there was no special reason. Btw, there is probably also remaining problem for multiarch builds as @djuarezg found when working on DUD plugin which needs to be fixed.

rebased onto 170eee3

2 years ago

there was no special reason

Ok then, I've removed that skip condition.

remaining problem for multiarch builds as @djuarezg found when working on DUD plugin which needs to be fixed

Not sure about that one, but I guess I don't have to fix it right now in this PR :)

Metadata Update from @jcupova:
- Pull-request untagged with: testing-ready

2 years ago

Dropped testing-ready tag, merge conflict in QE. I'll add testing-ready tag in future.

there was no special reason

Ok then, I've removed that skip condition.

remaining problem for multiarch builds as @djuarezg found when working on DUD plugin which needs to be fixed

Not sure about that one, but I guess I don't have to fix it right now in this PR :)

For context, this is the root cause that appears on the multiarch kiwi builds that @tkopecek mentioned and on my plugin, based on yours:

As soon as you initialize the BuildRoot it autocreates the hw_info.log, root.log, state.log etc and when child tasks are done it tries to put them into a path such as /koji/packages/myamazingthing/12/1/data/logs/image/. This then causes a failure as both child tasks (running both x86_64 and aarch64 builds) are trying to put their result logs into the same path, raising:

GenericError: Traceback (most recent call last):
  File "/usr/share/koji-hub/kojihub.py", line 10279, in importImageInternal
    raise koji.GenericError("Error importing build log. %s already exists." % final_path)
koji.GenericError: Error importing build log. /koji/packages/myamazingthing/12/1/data/logs/image/hw_info.log already exists.

I did not find any issue or PR for this, so if it exists please point me out to it.

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

2 years ago

Metadata Update from @jcupova:
- Pull-request untagged with: testing-ready

2 years ago

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

2 years ago

Metadata Update from @jcupova:
- Pull-request untagged with: testing-ready

2 years ago

closing as related commits are already part of #3205

Pull-Request has been closed by tkopecek

2 years ago
Metadata