posit-dev / posit-dev/rsconnect-python
bootstrap should error if no API key is returned
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 37
- Forks
- 28
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 7
Description
On versions older than 2022.10.0, the (experimental) bootstrap endpoint does not exist. The HTTP request returns 404, but produce_bootstrap_output() returns successfully but with an empty API key. That's because the case that checks for the 404 status just adds a "message": https://github.com/posit-dev/rsconnect-python/blob/main/rsconnect/json_web_token.py#L127-L131.
bootstrap should either return an API key and exit 0, or if no key is returned, for whatever reason, it should exit 1.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in rsconnect/json_web_token.py around produce_bootstrap_output(), especially the 404 handling at lines 127-131. Trace the bootstrap command's exit behavior and verify that it exits 0 only when an API key is returned; when the key is empty for any reason, it should exit 1.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100