openSUSE / obs-service-tar_scm

An OBS source service: fetches code from any SCM and archives it
GNU General Public License v2.0
31 stars 105 forks source link

KeyError: 'object_kind' in TarSCM/tasks.py on Leap 15.4 #446

Closed perlpunk closed 1 year ago

perlpunk commented 2 years ago

We are using the OBS scm feature and would like to test our code on openSUSE Leap 15.4.

I added the 15.4 repository to our workflow (in my fork only so far):

---
pr:
  steps:
  - link_package:
      source_project: devel:openQA
      source_package: os-autoinst
      target_project: home:tinita:branches:devel:openQA:GitHub
  - configure_repositories:
      project: home:tinita:branches:devel:openQA:GitHub
      repositories:
      - name: openSUSE_Tumbleweed
        paths:
          - target_project: openSUSE:Factory
            target_repository: snapshot
        architectures: [ x86_64 ]
      - name: openSUSE_Leap_15.3
        paths:
          - target_project: devel:openQA:Leap:15.3
            target_repository: openSUSE_Leap_15.3
        architectures: [ x86_64 ]
      - name: openSUSE_Leap_15.4
        paths:
          - target_project: devel:openQA:Leap:15.4
            target_repository: openSUSE_Leap_15.4
        architectures: [ x86_64 ]
  filters:
    event: pull_request

But the build fails early with:

[   54s] Unpacking os-autoinst-4.6.1655222857.cb9d974.obscpio ...
[   55s] 68005 blocks
[   55s] Running build time source services...
[   55s] Traceback (most recent call last):
[   55s]   File "/usr/lib/obs/service/tar", line 30, in <module>
[   55s]     main()
[   55s]   File "/usr/lib/obs/service/tar", line 26, in main
[   55s]     TarSCM.run()
[   55s]   File "/usr/lib/obs/service/TarSCM/__init__.py", line 39, in run
[   55s]     task_list.process_list()
[   55s]   File "/usr/lib/obs/service/TarSCM/tasks.py", line 118, in process_list
[   55s]     self.process_single_task(task)
[   55s]   File "/usr/lib/obs/service/TarSCM/tasks.py", line 173, in process_single_task
[   55s]     self.args = self.check_for_branch_request(args)
[   55s]   File "/usr/lib/obs/service/TarSCM/tasks.py", line 156, in check_for_branch_request
[   55s]     if j['object_kind'] == 'merge_request':
[   55s] KeyError: 'object_kind'
[   55s] service run failed for service 'tar'

This seems to have been fixed with https://github.com/openSUSE/obs-service-tar_scm/commit/405750618935948f6e316c2f660ae48681e14654 but that commit is not yet in the current package on 15.4 (0.10.22.1615538418.07a353d-3.12.1)

Will this be updated? Are there workarounds to be able to run tests on 15.4?

perlpunk commented 2 years ago

A workaround exists:

      - name: openSUSE_Leap_15.4
        paths:

        # Add openSUSE:Tools as a workaround until the fixed version is packaged
        - target_project: openSUSE:Tools
          target_repository: 15.4

        - target_project: devel:openQA:Leap:15.4
          target_repository: openSUSE_Leap_15.4
        - target_project: devel:openQA
          target_repository: openSUSE_Leap_15.4
        architectures: [ x86_64 ]
M0ses commented 1 year ago

Fix should have been released with https://build.opensuse.org/package/show/openSUSE:Leap:15.4:Update/obs-service-tar_scm.24636

Feel free to reopen if the problem still exists