galaxyproject / galaxyproject/planemo
planemo's configuration of bioblend's api key prevents running commands without authentication that don't require it
- Dominant language
- Python
- Stars
- 110
- Forks
- 102
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 13
Description
e.g.
```
bioblend DEBUG 2024-09-26 12:36:21,127: GET - attempts left: 10; retry delay: 10.0
urllib3.connectionpool DEBUG 2024-09-26 12:36:21,129: Starting new HTTPS connection (1): usegalaxy.org:443
urllib3.connectionpool DEBUG 2024-09-26 12:36:21,774: https://usegalaxy.org:443 "GET /api/invocations/84e15596bd4fc608 HTTP/11" 401 62
bioblend WARNING 2024-09-26 12:36:21,774: GET: error 401: b'{"err_msg":"Provided API key is not valid.","err_code":401001}', 9 attempts left
```
that api invocation is public (thanks for the tip @mvdbeek) but planemo's invocation fails due to the API key.
The corresponding bioblend code without an API key however succeeds:
```python
from bioblend.galaxy import GalaxyInstance
gi = GalaxyInstance('https://usegalaxy.org')
print(gi.invocations.show_invocation(invocation_id='84e15596bd4fc608'))
```
If `key=None` or `key=""` is passed to `GalaxyInstance` the call continues to succeed, so however planemo is setting the empty API causes an issue.
Contributor guide
Research direction
Start by inspecting how planemo configures bioblend's GalaxyInstance and reproducing the public invocation request against usegalaxy.org. Done means commands that do not require authentication succeed when no API key is configured, while authenticated commands continue to use their key.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100