#1506 RFE: get info for deleted tag entries via api
Closed: Fixed by tkopecek. Opened by mikem.

Deleted tags are still in the system. They just lack an active tag_config entry. (The same is true for build targets also, and possibly other types of data in the future).

While the getTag call does accept an event option that allows you to query at an event when the tag existed, it's not easy to guess what event might work.

It would be nice to have a way in the api to query for deleted tags. We might either:

  • add an option to getTag, e.g. allow_deleted
  • add a new call

Related: #1298

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

Metadata Update from @mikem:
- Issue priority set to: Low (was: Normal)

It may be that there is some clever way to get this through the api already.

The only way I can think of (since search has been fixed to excluded deleted tags), is with the queryHistory call.

[mike@localhost koji]$ lkoji taginfo foobar444
No such tag: foobar444
[mike@localhost koji]$ lkoji list-history --tag foobar444
Fri Apr 12 13:49:22 2019 new tag: foobar444 by mikem
Fri Apr 12 13:49:33 2019 tag deleted: foobar444 by mikem

While this technically works, it would give you much more data than you need if the tag_config entry had a long history. It's also very arcane compared to getTag().

I guess another possible solution would be for queryHistory to accept some options that would enable you to limit the query only to the most recent entry. However, again, this is a fairly complex call to use.

Related: #2917

Note that in #2917, what we really need is basically get_tag(tag_id, strict=True, included_deleted=True). The expected return would be the most recent taginfo data, and a field noting the deletion (perhaps just the revoke_event).

Edit: or possibly this can be worked in as a special value for the event param

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

Metadata Update from @tkopecek:
- Issue set to the milestone: 1.26 (was: 1.27)

PR #2923

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

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

Commit e7b6e78f fixes this issue

Commit 61ea78cf fixes this issue

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

Please continue any further discussion there.

Metadata
Related Pull Requests