Warning: I'm not familiar with the Koji codebase. But I think a warning like this would be very useful to casual Koji users.
If you accidentally use latest-build with a tag argument that is
not a buildroot, latest-build gives very confusing results. This
mistake is easy to make if the tag builds into a buildroot of a
different name. With this patch, we now a warning and suggest to
use the corresponding buildroot tag instead:
$ koji latest-build f32 glibc
warning: 'f32' is not a buildroot tag
warning: Did you mean 'f32-build' instead?
Build Tag Built by
glibc-2.30.9000-11.fc32 f32 submachine
Is there any reason to use
getBuildTargets
instead ofgetBuildTarget
? You are querying against strict name, so you can never get more than one (would also simplify rest of code)