#2379 list-tags fails against older hub
Closed: Fixed by mikem. Opened by mikem.

[mikem@localhost koji]$ kdev lkoji list-tags
Traceback (most recent call last):
  File "/home/mikem/Devel/koji/koji/cli2/lkoji", line 338, in <module>
    rv = locals()[command].__call__(options, session, args)
  File "/home/mikem/Devel/koji/koji/cli/koji_cli/commands.py", line 4128, in anon_handle_list_tags
    tags = list(itertools.chain(*[t.result for t in tags]))
  File "/home/mikem/Devel/koji/koji/cli/koji_cli/commands.py", line 4128, in <listcomp>
    tags = list(itertools.chain(*[t.result for t in tags]))
  File "/home/mikem/Devel/koji/koji/koji/__init__.py", line 3233, in result
    raise err
koji.ParameterError: list_tags() got an unexpected keyword argument 'pattern'

This is due to the recent changes for #2086. The parameter was added to the hub call and cli was adjusted to pass it unconditionally.

It is incredibly common for folks to use a newer client with an older hub. Many Koji deployments lag behind a version or two, but they will almost certainly have some users running the latest client. When we make api changes we must consider that.


I'm marking this for 1.22 because it is a regression in another 1.22 change and causes the complete failure of a common command in a common case.

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

Often when we add a hub call parameter like this, the cli gains new usage and we can simply avoid passing the parameter when it is not given. However in this case, the cli changes the behavior of an existing parameter, so we cannot do that.

Options:

  • revert the cli part of the change until all supported version of koji-hub support it
  • check the signature of the call first and fall back to the old behavior
  • catch the error and fall back to the old behavior

Given that we're already behind on 1.22, I think the first option is safest.

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

PR #2380

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

Commit 2d27453a fixes this issue

Commit a15d1c52 fixes this issue

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/koji/koji/issues/2379

Please continue any further discussion there.

Metadata
Related Pull Requests