#2648 kojid 1.23 does not cope with kojihub 1.21 ( ParameterError: getAverageBuildDuration() got an unexpected keyword argument 'age')
Closed: Fixed 3 years ago by tkopecek. Opened 3 years ago by ignatenkobrain.

https://pagure.io/koji/pull-request/2421 seems to break compatibility with 1.21 kojihub which we are unable to upgrade atm because it drops Python 2 support.

Is this expected or you just did not notice breaking compatibility?


Hmm, we could fix this. I was expecting other way around (older builders + newer hub). As the hub is crucial I was thinking nobody will upgrade builders and not the hub.

Metadata Update from @tkopecek:
- Custom field Size adjusted to None

3 years ago

Metadata Update from @tkopecek:
- Issue set to the milestone: 1.24

3 years ago

@tkopecek we can't upgrade hub because it requires upgrade to CentOS 8 and we are blocked by our custom integration with pulp :( But builders were very easy to upgrade :)

FYI, I am working (in my largely non existant spare time) on moving koji in epel7 to python3... see https://bugzilla.redhat.com/show_bug.cgi?id=1862810

@kevin if you need any reviews - feel free to send em to me and I'll get them done :)

Metadata Update from @jcupova:
- Issue tagged with: testing-ready

3 years ago

Metadata Update from @jcupova:
- Issue tagged with: testing-done

3 years ago

I'm in the same situation with a CentOS 7 hub (1.21.1) and Fedora builders 1.23.0). The above patch for me didn't work:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/koji/__init__.py", line 2754, in _callMethod
    return self._sendCall(handler, headers, request)
  File "/usr/lib/python3.8/site-packages/koji/__init__.py", line 2672, in _sendCall
    return self._sendOneCall(handler, headers, request)
  File "/usr/lib/python3.8/site-packages/koji/__init__.py", line 2718, in _sendOneCall
    ret = self._read_xmlrpc_response(r)
  File "/usr/lib/python3.8/site-packages/koji/__init__.py", line 2730, in _read_xmlrpc_response
    result = u.close()
  File "/usr/lib64/python3.8/xmlrpc/client.py", line 655, in close
    raise Fault(**self._stack[0])
xmlrpc.client.Fault: <Fault 1019: "getAverageBuildDuration() got an unexpected keyword argument 'age'">

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/sbin/kojid", line 1332, in updateWeight
    avg = self.session.getAverageBuildDuration(name, age=6)
  File "/usr/lib/python3.8/site-packages/koji/__init__.py", line 2346, in __call__
    return self.__func(self.__name, args, opts)
  File "/usr/lib/python3.8/site-packages/koji/__init__.py", line 2773, in _callMethod
    raise err
koji.ParameterError: getAverageBuildDuration() got an unexpected keyword argument 'age'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/koji/daemon.py", line 1356, in runTask
    response = (handler.run(),)
  File "/usr/lib/python3.8/site-packages/koji/tasks.py", line 328, in run
    return koji.util.call_with_argcheck(self.handler, self.params, self.opts)
  File "/usr/lib/python3.8/site-packages/koji/util.py", line 271, in call_with_argcheck
    return func(*args, **kwargs)
  File "/usr/sbin/kojid", line 1388, in handler
    self.updateWeight(name)
  File "/usr/sbin/kojid", line 1333, in updateWeight
    except ParameterError:
NameError: name 'ParameterError' is not defined

Looks like it should be except koji.ParameterError.

Please note that we have never supported running mismatched hub and builders (or the web ui or kojira for that matter). It is really only the CLI and core lib where we specifically worry about cross-version compatibility with the hub,

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #2649 Merged 3 years ago