Bug 1765515

Summary: python3-pdc-client has no configuration
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: pdc-clientAssignee: Lubomír Sedlář <lsedlar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 30CC: bliu, chcao, chuzhang, lholecek, lsedlar, sochotni, ycheng
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pdc-client-1.8.0-17.fc30 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-25 17:02:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Miro Hrončok 2019-10-25 10:16:56 UTC
I've installed python3-pdc-client-1.8.0-12.fc30.

I've attempted to use https://pagure.io/releng/blob/master/f/scripts/get-critpath

$ python3 get-critpath f31
Traceback (most recent call last):
  File "get-critpath", line 52, in <module>
    main()
  File "get-critpath", line 29, in main
    pdc = pdc_client.PDCClient('fedora')
  File "/usr/lib/python3.7/site-packages/pdc_client/__init__.py", line 238, in __init__
    token = self.obtain_token()
  File "/usr/lib/python3.7/site-packages/pdc_client/__init__.py", line 252, in obtain_token
    return self.auth[end_point]._(page_size=None)['token']
  File "/usr/lib/python3.7/site-packages/pdc_client/__init__.py", line 347, in __call__
    return self.client(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/beanbag/namespace.py", line 136, in fn
    *args, **kwargs)
  File "/usr/lib/python3.7/site-packages/beanbag/url_v1.py", line 102, in call
    return self.make_request(path, verb, kwargs, body)
  File "/usr/lib/python3.7/site-packages/beanbag/url_v1.py", line 151, in make_request
    r = self.session.request(verb, path, params=params, data=ebody)
  File "/usr/lib/python3.7/site-packages/requests/sessions.py", line 519, in request
    prep = self.prepare_request(req)
  File "/usr/lib/python3.7/site-packages/requests/sessions.py", line 462, in prepare_request
    hooks=merge_hooks(request.hooks, self.hooks),
  File "/usr/lib/python3.7/site-packages/requests/models.py", line 313, in prepare
    self.prepare_url(url, params)
  File "/usr/lib/python3.7/site-packages/requests/models.py", line 387, in prepare_url
    raise MissingSchema(error)
requests.exceptions.MissingSchema: Invalid URL 'fedora/auth/token/obtain/': No schema supplied. Perhaps you meant http://fedora/auth/token/obtain/?


Apparently, I need to install the pdc-client package to get /etc/pdc.d/fedora.json to make this work.

Arguably:

 1. python3-pdc-client should either include the config on depend ona  config subpackage that does that
 2. the library should produce some actionable traceback when the config doesn't exist


Thanks.

Comment 1 Fedora Update System 2019-10-25 11:20:46 UTC
FEDORA-2019-da1b467dcb has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-da1b467dcb

Comment 2 Fedora Update System 2019-10-25 11:49:28 UTC
FEDORA-2019-303ef02287 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-303ef02287

Comment 3 Fedora Update System 2019-10-25 17:02:00 UTC
pdc-client-1.8.0-17.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.