locust-cloud 1.0.20__py3-none-any.whl → 1.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
locust_cloud/auth.py CHANGED
@@ -4,8 +4,9 @@ from datetime import UTC, datetime, timedelta
4
4
  import requests
5
5
  from flask import redirect, request, url_for
6
6
  from flask_login import UserMixin, current_user, login_user
7
+ from locust_cloud.constants import DEFAULT_LAMBDA_URL
7
8
 
8
- LAMBDA = "https://deployer.locust.cloud/1"
9
+ LAMBDA = DEFAULT_LAMBDA_URL
9
10
 
10
11
 
11
12
  class AuthUser(UserMixin):
@@ -17,6 +18,9 @@ class AuthUser(UserMixin):
17
18
 
18
19
 
19
20
  def set_credentials(credentials, response):
21
+ if not credentials.get("cognito_client_id_token"):
22
+ return response
23
+
20
24
  id_token = credentials["cognito_client_id_token"]
21
25
  user_sub_id = credentials["user_sub_id"]
22
26
  refresh_token = credentials["refresh_token"]
locust_cloud/cloud.py CHANGED
@@ -190,8 +190,8 @@ def main() -> None:
190
190
  )
191
191
  sys.exit(1)
192
192
 
193
- logger.info(f"Logging you into Locust Cloud ({options.lambda_url}, {options.aws_region_name}, v{__version__})")
194
-
193
+ logger.info(f"Logging you into Locust Cloud ({options.aws_region_name}, v{__version__})")
194
+ logger.debug(f"Lambda url: {options.lambda_url}")
195
195
  credential_manager = CredentialManager(
196
196
  lambda_url=options.lambda_url,
197
197
  access_key=options.aws_access_key_id,
@@ -255,6 +255,7 @@ def main() -> None:
255
255
  {"name": "LOCUST_REQUIREMENTS_URL", "value": requirements_url},
256
256
  {"name": "LOCUST_FLAGS", "value": " ".join(locust_options)},
257
257
  {"name": "LOCUST_WEB_HOST_DISPLAY_NAME", "value": "_____"},
258
+ {"name": "LOCUST_API_BASE_URL", "value": DEFAULT_LAMBDA_URL},
258
259
  *locust_env_variables,
259
260
  ],
260
261
  "worker_count": worker_count,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: locust-cloud
3
- Version: 1.0.20
3
+ Version: 1.1.0
4
4
  Summary: Locust Cloud
5
5
  Requires-Python: >=3.11
6
6
  Requires-Dist: blessed==1.20.0
@@ -1,6 +1,6 @@
1
1
  locust_cloud/__init__.py,sha256=51wdjGT0nqS5dVuFVDMhthnPacrctteiCMrwRqaPaQg,1867
2
- locust_cloud/auth.py,sha256=B68r0Hv2mXm_2caqOhofuqaSPVIdWZb6_4_9g7M7zco,3045
3
- locust_cloud/cloud.py,sha256=LusCi_y8WXyyjR3-_9OhSzzpuhcgia39fecAFNZ--Q8,14547
2
+ locust_cloud/auth.py,sha256=2fcTIq0tYDckDsZZ7yFTHZn5nG7Ir1dlV1QIu_tp3JA,3164
3
+ locust_cloud/cloud.py,sha256=dsWd66H2-xPX4A5f2lsXUzPaOaFFVQ6VXerNoLwDl4E,14660
4
4
  locust_cloud/constants.py,sha256=YGgIEnaOT9cAA8F8a8Z8lOmlI78D2fXiVpP0RF213MA,167
5
5
  locust_cloud/credential_manager.py,sha256=JbuS22RTGAmngVB9DFLxHIgaonCSImemMGvtWnxBZRE,5515
6
6
  locust_cloud/timescale/exporter.py,sha256=j1K-czMUdOLFt5Sop0PTF6TL52vYdngEEI5OEM3Xl60,11128
@@ -15,7 +15,7 @@ locust_cloud/webui/vite.config.ts,sha256=cqxPMkbwEA3H9mGGbuPulQUhIHCosUqm_1usxzs
15
15
  locust_cloud/webui/yarn.lock,sha256=OgV48S7IOMpqldFPL5MFG1fjP8HTcDlFSFzMuRCkGWU,216596
16
16
  locust_cloud/webui/dist/index.html,sha256=aWAK1eKa4qBfhMonHNf2sHC6iY9RoTzNdvFcc33Wtp4,664
17
17
  locust_cloud/webui/dist/assets/index-BG65KOq7.js,sha256=vKgju6VqTxkI5yFtyDr6zGtb3D7V_AcVCYPDm4SeJos,2795922
18
- locust_cloud-1.0.20.dist-info/METADATA,sha256=6281q7mD58ZMnErkvivktsnlTmQ0X7_Xfx8-cJX8DUI,2189
19
- locust_cloud-1.0.20.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
20
- locust_cloud-1.0.20.dist-info/entry_points.txt,sha256=PGyAb4e3aTsGS3N3VGShDl6VzJaXy7QwsEgsLOC7V00,57
21
- locust_cloud-1.0.20.dist-info/RECORD,,
18
+ locust_cloud-1.1.0.dist-info/METADATA,sha256=8o_Pqe64eIvwPi6kgGnojL0p-bzC6YwCbADxpTEO8kY,2188
19
+ locust_cloud-1.1.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
20
+ locust_cloud-1.1.0.dist-info/entry_points.txt,sha256=PGyAb4e3aTsGS3N3VGShDl6VzJaXy7QwsEgsLOC7V00,57
21
+ locust_cloud-1.1.0.dist-info/RECORD,,