StackStorm / StackStorm/st2

httpclient module in st2client abuses kwargs

Open
#2,641 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

complexity:medium refactor stale
Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

I have a use case where I need to pass a query param to final API call and the only way I can do it right now is something like

kwargs['params'] = {}
kwargs['params']['decrypt'] = true

This is sad. We should fix this by not abusing kwargs.
https://github.com/StackStorm/st2/blob/master/st2client/st2client/utils/httpclient.py#L68

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at st2client/st2client/utils/httpclient.py around line 68, then inspect the callers of the httpclient module to understand how request arguments reach the final API call. Confirm the expected handling of query parameters and identify the existing tests, if any; done means callers can pass query parameters without placing them inside kwargs.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.