#111 CLI should guess product version based on the subject of the waiver
Closed: Fixed 5 years ago Opened 6 years ago by dcallagh.

In Waiverdb, a waiver must be recorded against a specific product-version ("fedora-26" etc). However, for uncomplicated products like Fedora, the appropriate product-version is obvious from the thing that I am waiving.

As a user of the CLI it feels redundant to have to tell the tool that I am waiving results for a .fc26 build for the fedora-26 product-version. The tool could figure that out for me.


We could just have some logic which is activated when the --product-version option is not given. It would examine the subject of the waiver, and look for a few easily recognisable things.

If it has "type": "koji_build" then it could look for the dist tag in the NVR and guess based on that. I feel like someone already has some logic for this (pyrpkg or fedpkg perhaps). Or, if necessary, it could even call koji to look up the NVR and find the build target and decide the product based on that. Pretty sure someone has logic for that too.

If it has a key "productmd.compose.id" then it could at least guess the product version from the name of the compose.

Maybe some similar logic if the subject is an update? Research more.

In all cases, if the user gives --product-version then the guessing should be skipped. And if the guessing is not able to decide on a sane product-version, the CLI should fall back to the current behaviour of demanding the user identify the right product-version.

Metadata Update from @gnaponie:
- Issue assigned to gnaponie

5 years ago

Metadata Update from @gnaponie:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

5 years ago

Metadata Update from @lholecek:
- Issue set to the milestone: 0.11
- Issue status updated to: Open (was: Closed)

5 years ago

Metadata Update from @lholecek:
- Issue status updated to: Closed (was: Open)

5 years ago

Metadata Update from @dcallagh:
- Issue close_status updated to: Fixed
- Issue tagged with: enhancement

5 years ago

Login to comment on this ticket.

Metadata