#2379 list-tags fails against older hub
Closed: Fixed 3 years ago by mikem. Opened 3 years ago 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

3 years ago

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

3 years ago

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

3 years ago

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #2387 Merged 3 years ago
  • #2380 Closed 3 years ago