Packit-service: copr build state: store up to date info in the DB

Created on 23 Mar 2020  路  4Comments  路  Source: packit/packit-service

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:

https://bugzilla.redhat.com/show_bug.cgi?id=1813227

copr database good-first-issue triaged

Most helpful comment

@TomasTomecek my mistake!
I was using build_proxy instead of build_chroot_proxy
I'm looking into storing it in db now.

All 4 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TomasTomecek picture TomasTomecek  路  10Comments

lachmanfrantisek picture lachmanfrantisek  路  11Comments

mrc0mmand picture mrc0mmand  路  7Comments

TomasTomecek picture TomasTomecek  路  5Comments

lachmanfrantisek picture lachmanfrantisek  路  7Comments