Hello, Greenwave (https://pagure.io/greenwave/) needs at some point to ask some information to koji: the commit hash from a build. At the moment, what Greenwave does, is extracting from the build the field "source", however, that field may be referring to the branch name rather than a specific commit.
We were considering using instead: build['extra']['source']['original_url'] we used to, but we dropped it because it looks like containers don't have the ['extra']['source'] in the build. ref to the commit that dropped that: https://pagure.io/greenwave/c/58cbab67dfa5416c88d3e89f13c2eff0b45e54df
Is there any reason why container don't have this field? Is it possible to get it filled? It would be useful to us.
If you want to see the code for more context, here it is: https://pagure.io/greenwave/blob/master/f/greenwave/resources.py#_142
Thank you!
Giulia
cc. @lholecek @pingou
Container builds are imported into Koji by a content generator. The content of that metadata is controlled by that system, not Koji.
Odds are, nothing in the chain is sanitizing the submitted source url (which could easily refer to a branch or tag) into an immutable ref.
Side note: we made some changes to Koji a while back that sanitize git source urls to use the raw ref. This only happens for rpm builds peformed by Koji from a git source url. In this case, it is the build.source field that has the sanitized url, while build.extra.source.original_url is the original url submitted for the task.
Metadata Update from @mikem: - Custom field Size adjusted to None
So, I believe you need to take this up with the koji-containerbuild plugin folks.
https://github.com/containerbuildsystem/koji-containerbuild
Closing as this isn't something we can resolve in Koji.
Metadata Update from @dgregor: - Issue close_status updated to: Invalid - Issue status updated to: Closed (was: Open)
So, I believe you need to take this up with the koji-containerbuild plugin folks. https://github.com/containerbuildsystem/koji-containerbuild
Thanks!
This issue has been migrated to Fedora Forge: https://forge.fedoraproject.org/koji/koji/issues/1607
Please continue any further discussion there.