Skip to content
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

[Bug]: Incorrect makefile usage of environment variable #1416

Open
1 task done
Yuzobra opened this issue Nov 16, 2024 · 1 comment
Open
1 task done

[Bug]: Incorrect makefile usage of environment variable #1416

Yuzobra opened this issue Nov 16, 2024 · 1 comment
Assignees

Comments

@Yuzobra
Copy link

Yuzobra commented Nov 16, 2024

File Name

Makefile

What happened?

When running the make load_test command, the RUN_SERVICE_URL environment var is being used as $RUN_SERVICE_URL, when the correct usage should be ${RUN_SERVICE_URL}, which is causing an incorrect interpolation.

Relevant log output

> make load_test 
poetry run locust -f tests/load_test/load_test.py -H https://genai-app-sample-<ID>.<REGION>.run.app --headless -t 30s -u 60 -r 2 --csv=tests/load_test/.results/results --html=tests/load_test/.results/report.html
[2024-11-16 17:47:10,969] LAPTOP-MGB9F34E/INFO/locust.main: Starting Locust 2.32.2
[2024-11-16 17:47:10,971] LAPTOP-MGB9F34E/INFO/locust.main: Run time limit set to 30 seconds
Type     Name                                                                          # reqs      # fails |    Avg     Min     Max    Med |   req/s  failures/s
--------|----------------------------------------------------------------------------|-------|-------------|-------|-------|-------|-------|--------|-----------
--------|----------------------------------------------------------------------------|-------|-------------|-------|-------|-------|-------|--------|-----------
         Aggregated                                                                         0     0(0.00%) |      0       0       0      0 |    0.00        0.00

[2024-11-16 17:47:10,973] INFO/locust.runners: Ramping to 60 users at a rate of 2.00 per second
[2024-11-16 17:47:10,981] ERROR/locust.user.task: Invalid URL 'UN_SERVICE_URL/stream_events': No scheme supplied. Perhaps you meant https://UN_SERVICE_URL/stream_events?
Traceback (most recent call last):
  File "<HOME_PATH>/python3.12/site-packages/locust/user/task.py", line 340, in run
    self.execute_next_task()
  File "<HOME_PATH>/python3.12/site-packages/locust/user/task.py", line 373, in execute_next_task
    self.execute_task(self._task_queue.popleft())
  File "<HOME_PATH>/python3.12/site-packages/locust/user/task.py", line 490, in execute_task
    task(self.user)
  File "/home/<PERSONAL_REPO>/tests/load_test/load_test.py", line 49, in chat_stream
    with self.client.post(
         ^^^^^^^^^^^^^^^^^
  File "<HOME_PATH>/python3.12/site-packages/locust/clients.py", line 286, in post
    return self.request("POST", url, data=data, json=json, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<HOME_PATH>/python3.12/site-packages/locust/clients.py", line 192, in request
    response = self._send_request_safe_mode(method, url, data=data, json=json, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<HOME_PATH>/python3.12/site-packages/locust/clients.py", line 237, in _send_request_safe_mode
    return super().request(method, url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<HOME_PATH>/python3.12/site-packages/requests/sessions.py", line 575, in request
    prep = self.prepare_request(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<HOME_PATH>/python3.12/site-packages/requests/sessions.py", line 484, in prepare_request
    p.prepare(
  File "<HOME_PATH>/python3.12/site-packages/requests/models.py", line 367, in prepare
    self.prepare_url(url, params)
  File "<HOME_PATH>/python3.12/site-packages/requests/models.py", line 438, in prepare_url
    raise MissingSchema(
requests.exceptions.MissingSchema: Invalid URL 'UN_SERVICE_URL/stream_events': No scheme supplied. Perhaps you meant https://UN_SERVICE_URL/stream_events?

Code of Conduct

  • I agree to follow this project's Code of Conduct
@eliasecchig
Copy link
Contributor

Thanks a lot for raising this! Will fix it in the next release which should happen maximum next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants