Unsure if h.get('maven_build_id', default=None) will be sufficient to catch maven builds - will queryHistory automatically pull in that field for maven builds, or should something be added to the queryHistory call?
h.get('maven_build_id', default=None)
maven_build_id is never populated by queryHistory
maven_build_id
This bit:
#get builds - history = session.tagHistory(tag=tagname, active=True, queryOpts={'order': '-create_ts'}) + history = session.queryHistory(tag=tagname, active=True)['tag_listing'] if not history:
queryHistory doesn't support queryOpts and doesn't sort the results. Perhaps it should do one or both of these. Until it does, perhaps this bit should do the sorting itself. Or perhaps this is an indication that we should hold of on this deprecation for a release or two in order to establish feature parity with the old call.
Issue: #1531
Issue: https://pagure.io/koji/issue/836
@mikem @tkopecek did we ever establish feature parity with the old call?
Yes, we're using new one everywhere (tagHistory is subset of what queryHistory does).
tagHistory
queryHistory
Metadata Update from @tkopecek: - Pull-request tagged with: testing-ready
Metadata Update from @jcupova: - Pull-request tagged with: testing-done
Commit cb8d096e fixes this pull-request
Pull-Request has been merged by tkopecek
This PR was merged without addressing the concern I raised above.
queryHistory doesn't support queryOpts and doesn't sort the results
It still does not, and koji-gc could now be using the wrong order when deciding which builds to prune
I have filed #2270 to follow up on that