-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add base url path param #2925
Add base url path param #2925
Conversation
WEB UI is working fine, I can run it, connect to it, I can have worker and tasks is running, I can see all the stats But I can use any param for base url for worker now, it will be working anyway and it's confusing to me, because I am expecting it to work only if the both are same Maybe somebody can double check it after me? I am not sure I am doing it in the right way
I am using docker file like that for my local tests So I am confused what it's also working like that: But I am expecting to get an error because I am not able to connect to master, or am I missing something? |
"Base url" is not a good name, because that is what is used for HttpUser / -H parameter. Maybe ui_base_url? Needs tests. |
Maybe I'm confused, but why would this relate to zmq at all? Are you trying to host multiple locust master instances on the same machine? |
It's not only about UI, service will be running on that path, so workers should use it to be able to connect with master I am not sure so far are we able to do that or not |
I agree with @cyberw, we should use a new variable name such as The workers should not need to be concerned with this base url as only master exposes the web UI |
@@ -491,20 +497,21 @@ def ensure_user_class_name(config): | |||
else: | |||
web_host = options.web_host | |||
if web_host: | |||
logger.info(f"Starting web interface at {protocol}://{web_host}:{options.web_port}") | |||
logger.info(f"Starting web interface at {protocol}://{web_host}:{options.web_port}{options.base_url}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think url
doesn't actually make sense in this case, URL refers to the entire composition (e.g. protocol://domain:port/path?query=params), in this case base_path
would be more accurate
@@ -165,7 +166,7 @@ def send_assets(path): | |||
|
|||
return send_from_directory(directory, path) | |||
|
|||
@app.route("/") | |||
@app.route(f"{self.base_url}/") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If self.base_url
is /
(as it is by default) we will end up with @app.route("//")
right?
Closes #2909