#1191 Bodhi sees frequent koji.AuthErrors since switching to Python 3
Closed: Fixed 3 years ago by tkopecek. Opened 5 years ago by bowlofeggs.

Since the day Bodhi switched to Python 3, it gets frequent koji.AuthErrors:

https://github.com/fedora-infra/bodhi/issues/2870

Retrying always seems to work so far, so I don't think there really is an auth error. Is there some instability with the Koji client library code under Python 3?


Here is a simple reproducer:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/python3
from datetime import datetime

import koji
import requests


session = koji.ClientSession('https://koji.fedoraproject.org/kojihub')
now = datetime.utcnow()


try:
    while True:
        session.echo()
        print(session.getBuild('bodhi-3.12.0-100.fc29'))
        print(session.getTaskInfo(31550270))
        print('Time elapsed: {}'.format(datetime.utcnow() - now))
except requests.ConnectionError as e:
    print(e.response)
    print(str(e))

Here's a very similar one that just uses requests:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#!/usr/bin/python3
from datetime import datetime

import requests


session = requests.Session()
now = datetime.utcnow()


try:
    while True:
        session.get('https://koji.fedoraproject.org/koji/')
        print('Time elapsed: {}'.format(datetime.utcnow() - now))
except requests.ConnectionError as e:
    print(e.response)
    print(str(e))

This may also be fixed by #1203.

This should bi fexd AFAIK.

Metadata Update from @tkopecek:
- Custom field Size adjusted to None
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.

Metadata