Learn more about these different git repos.
Other Git URLs
The consumer has to check other info in msg body or call koji API to get the exact type of build. It would be better to add this field in msg
I think directly including it in get_build() is ok, and it's also a benefit for API users.
get_build()
Hmm, I'm not sure about putting it to get_build. Maybe with option (btype=True), but definitely not without it. Most of calls to get_build are internal and we don't need to know it saving one join. It also needs some more added logic to relatively clean get_build function.
get_build
btype=True
Maybe other option is to create condition in get_build_type. so, if buildInfo is already dict, get_build could be skipped. Then we would add it to all pre/postBuildStateChanges. It is still a lot of new code. Not sure if it is more effective to do it ahead or wait for consumer's additional call.
get_build_type
buildInfo
@mikem @julian8628 ?
Metadata Update from @tkopecek: - Custom field Size adjusted to None
I agree with Tomas here. There is no reason to change get_build. We already provide this data via getBuildType in the api.
getBuildType
The hub calls thepostBuildStateChange callback 15 different places. This is a lot of code to change.
postBuildStateChange
Given that, it's not clear to me that this RFE is worth doing. The messages on the bus are not expected to provide complete information. They just provide a signal with the basic info.
On the other hand, if we were to go with your original suggestion, that would not require changing all the callbacks individually.
I guess the question is whether the extra join is a performance hit. Maybe Tomas and I are over-optimizing.
I initialized the original idea when I checked some Jenkins jobs with koji. Jenkins listens to the messages on the bus via JMS-messaging plugin, and it can use filters to limit the msgs by the fields in the msg body to a smaller scope. Usually, they only want to receive the events with one btype, e.g, rpm, or module. Adding this in msg eases the Jenkins job's work. it doesn't need to get all msgs and call koji APIs to get btype. Anyway, no one complains this so far :-P.
filters
btype
I originally suggested to change get_build because it is a straight approach, but I think we could call getBuildType in protonmsg then set build_type in buildinfo. It seems simpler and with less side effects.
build_type
buildinfo
PR 2934
Metadata Update from @jcupova: - Issue set to the milestone: 1.26
Metadata Update from @julian8628: - Issue tagged with: testing-ready
Metadata Update from @mfilip: - Issue tagged with: testing-done
Commit 9b45805 fixes this issue
Commit e689602 fixes this issue
Login to comment on this ticket.