StackStorm / StackStorm/st2

st2client calls `.lower()` on url path, causing name resolution issues in a docker environment

Open
#4,714 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stale status:under discussion
Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

SUMMARY

If the stackstorm client is given the hostname stackstorm-TRSTRUTH, it will attempt to make requests to stackstorm-trstruth/api/v1 which in turn causes a resolution error. I believe it is due to this line:
https://github.com/StackStorm/st2/blob/d17bf7e945168b87ba6f3c154fb272c7822531e8/st2client/st2client/models/core.py#L119

not sure if this is deliberate, but might we consider removing .lower() from that return statement?

ISSUE TYPE

Pick one below and delete the rest:

  • Bug Report
STACKSTORM VERSION

Paste the output of st2 --version:
st2 3.0.1, on Python 2.7.6

OS / ENVIRONMENT / INSTALL METHOD

Docker mppc

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 in st2client/st2client/models/core.py at the linked line and inspect how the URL path is assembled. Reproduce the request with the Docker hostname stackstorm-TRSTRUTH, then verify the behavior around case preservation and name resolution; done means the reported resolution issue is addressed without breaking URL construction.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, networking
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.