The COPR team deployed a change in prod that allows us to get build state per chroot. Let's implement this on our side as well:
Hey @TomasTomecek
I was looking into this and got the following error:
TypeError('get() takes 2 positional arguments but 3 were given')
when using this statement
ch = copr_client.build_proxy.get(build_id, "fedora-31-x86_64")
I also cross-checked copr package for the latest one. Do you know what problem might be?
@rishavanand thanks for looking into this! You're close: this issue is about updating code in tasks.py:
https://github.com/packit-service/packit-service/blob/master/packit_service/worker/tasks.py#L83
So just parse the build_proxy.get response:
build_copr = copr_client.build_proxy.get(build_id)
Edit: my bad that I didn't make this clear in my OP
@TomasTomecek well that's exactly what I did. I parsed the build_proxy.get response but did not find any status for chroot. So I went ahead to read the comments on bugzilla. According to this comment #2, two params will have to be passed to the get method, but this leads to the error listed above. There is something mentioned related to a frontend release, maybe that is when we will be able to use this feature?
@TomasTomecek my mistake!
I was using build_proxy instead of build_chroot_proxy
I'm looking into storing it in db now.
Most helpful comment
@TomasTomecek my mistake!
I was using
build_proxyinstead ofbuild_chroot_proxyI'm looking into storing it in db now.