fedora-active-user icon indicating copy to clipboard operation
fedora-active-user copied to clipboard

checks for BugZilla activity broken since switch to token authentication

Open decathorpe opened this issue 3 years ago • 8 comments

$ python3 ./fedora_active_user.py --user olem --email [email protected]

(...)

Bugzilla activity
   20 bugs assigned, cc or on which [email protected] commented
ERROR:active-user:<Fault Client: "Application failed during request deserialization: 32000: The method 'User.get' is not supported without using API keys and the the authentication header. See https://bugzilla.redhat.com/docs/en/html/api/core/v1/general.html#authentication for details on using the 'Authorization' header. at /usr/share/perl5/vendor_perl/SOAP/Lite.pm line 2855.\n">

decathorpe avatar Sep 02 '22 10:09 decathorpe

Seeing this too. Do we have a workaround that we can use in the meantime?

sanjayankur31 avatar Oct 30 '22 14:10 sanjayankur31

Do you have something like

[bugzilla.redhat.com]
api_key = XXXXXXXXXXXX

in ~/.config/python-bugzilla/bugzillarc?

gotmax23 avatar Oct 30 '22 16:10 gotmax23

With a properly configured bugzillarc, I'm not able to reproduce this:

$ python ./fedora_active_user.py --user olem --email [email protected] --nofas
Last action on koji:
   Wed, 05 Oct 2022 tag_package_owners entry revoked by bodhi

Last package update on bodhi:
   2022-02-02 18:36:31 on package open-policy-agent-0.31.0-2.fc35
Last actions performed according to fedmsg:
  - io.pagure.prod.pagure.issue.comment.added on 2022-10-04 15:47:44
  - Fedora 35 Update: open-policy-agent-0.31.0-2.fc35 on 2022-02-10 19:23:38
  - olem's open-policy-agent-0.31.0-2.fc35 bodhi update completed push to stable on 2022-02-10 19:19:54
  - FEDORA-2022-7adcde1092 has met stable testing requirements on 2022-02-09 19:36:02
  - bodhi submitted FEDORA-2022-7adcde1092 to stable on 2022-02-09 19:36:02
  - olem's open-policy-agent-0.31.0-2.fc35 bodhi update completed push to testing on 2022-02-02 19:34:10
  - Bodhi's open-policy-agent-0.31.0-2.fc35 bodhi update is ready for testing on 2022-02-02 19:33:58
  - olem edited FEDORA-2022-7adcde1092 on 2022-02-02 12:37:46
  - olem submitted FEDORA-2022-7adcde1092 to testing on 2022-02-02 12:36:39
  - FEDORA-2022-caa8151005 has met stable testing requirements on 2022-02-02 11:09:41

Last email on mailing list:
  On 2021-12-02T19:02:33Z [email protected] emailed as Olivier Lemasle on https://lists.fedoraproject.org/archives/api/list/[email protected]/
  On 2021-06-20T13:29:55Z [email protected] emailed as Olivier Lemasle on https://lists.fedoraproject.org/archives/api/list/[email protected]/
  On 2020-11-02T21:45:09Z [email protected] emailed as Olivier Lemasle on https://lists.fedoraproject.org/archives/api/list/[email protected]/
  On 2019-07-15T14:46:11Z [email protected] emailed as Olivier Lemasle on https://lists.fedoraproject.org/archives/api/list/[email protected]/
  On 2019-07-11T20:32:06Z [email protected] emailed as Olivier Lemasle on https://lists.fedoraproject.org/archives/api/list/[email protected]/
  On 2017-03-06T22:22:48Z [email protected] emailed as Olivier Lemasle on https://lists.fedoraproject.org/archives/api/list/[email protected]/
  On 2017-03-05T23:06:33Z [email protected] emailed as Olivier Lemasle on https://lists.fedoraproject.org/archives/api/list/[email protected]/

Bugzilla activity
   20 bugs assigned, cc or on which [email protected] commented
Last comment on the most recent ticket on bugzilla:
   #1965682 2021-05-28 [email protected]
   #1922803 2021-05-10 [email protected]
   #1922802 2021-05-12 [email protected]
   #1922801 2021-05-10 [email protected]
   #1922798 2021-05-10 [email protected]
   #1922795 2021-05-12 [email protected]

gotmax23 avatar Oct 30 '22 16:10 gotmax23

Ah, no, I didn't realise one needs a bugzillarc file. I don't think that's mentioned in the readme etc---maybe that just needs documenting?

sanjayankur31 avatar Oct 30 '22 17:10 sanjayankur31

bugzillarc

I've never heard of this file. Is this documented anywhere?

decathorpe avatar Oct 30 '22 19:10 decathorpe

It's used by the bugzilla Python module. If you have python3-bugzilla-cli, you can also create the file with bugzilla login --api-key. R.e. documentation, there's man bugzilla [1], bugzilla login -h, and docstrings for the Python API[2].

The failures you're having may be related to fedora-devel -- Action Required: Bugzilla - API Authentication changes, or there may have been some other backend change which made this operation require auth when it didn't before.

[1] https://www.mankier.com/1/bugzilla#Authentication_Cache_and_API_Keys [2] https://github.com/python-bugzilla/python-bugzilla/blob/a7c324041175a4157823bc2332a046cc2a54d105/bugzilla/base.py#L79

EDIT: Mention Python docstrings

gotmax23 avatar Oct 30 '22 22:10 gotmax23

In any case, I agree that the auth requirement should be documented in this repo.

gotmax23 avatar Oct 30 '22 22:10 gotmax23

Yeah, that's probably it. I generated a new API key and saved it with bugzilla login --api-key, thanks for the tip.

decathorpe avatar Oct 31 '22 10:10 decathorpe