locust-cloud 1.10.0__py3-none-any.whl → 1.11.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 +9 -8
- locust_cloud/cloud.py +4 -2
- locust_cloud/timescale/queries.py +1 -1
- {locust_cloud-1.10.0.dist-info → locust_cloud-1.11.0.dist-info}/METADATA +1 -1
- {locust_cloud-1.10.0.dist-info → locust_cloud-1.11.0.dist-info}/RECORD +7 -7
- {locust_cloud-1.10.0.dist-info → locust_cloud-1.11.0.dist-info}/WHEEL +0 -0
- {locust_cloud-1.10.0.dist-info → locust_cloud-1.11.0.dist-info}/entry_points.txt +0 -0
locust_cloud/auth.py
CHANGED
@@ -87,7 +87,7 @@ def register_auth(environment: locust.env.Environment):
|
|
87
87
|
|
88
88
|
credentials = auth_response.json()
|
89
89
|
|
90
|
-
if os.getenv("CUSTOMER_ID", "") and credentials["
|
90
|
+
if os.getenv("CUSTOMER_ID", "") and credentials["customer_id"] != os.getenv("CUSTOMER_ID", ""):
|
91
91
|
session["auth_error"] = "Invalid login for this deployment"
|
92
92
|
return redirect(url_for("locust.login"))
|
93
93
|
|
@@ -133,10 +133,11 @@ def register_auth(environment: locust.env.Environment):
|
|
133
133
|
"label": "Username",
|
134
134
|
"name": "username",
|
135
135
|
"is_required": True,
|
136
|
+
"type": "email",
|
136
137
|
},
|
137
138
|
{
|
138
139
|
"label": "Full Name",
|
139
|
-
"name": "
|
140
|
+
"name": "customer_name",
|
140
141
|
"is_required": True,
|
141
142
|
},
|
142
143
|
{
|
@@ -181,7 +182,7 @@ def register_auth(environment: locust.env.Environment):
|
|
181
182
|
session["auth_info"] = ""
|
182
183
|
|
183
184
|
username = request.form.get("username", "")
|
184
|
-
|
185
|
+
customer_name = request.form.get("customer_name", "")
|
185
186
|
password = request.form.get("password")
|
186
187
|
access_code = request.form.get("access_code")
|
187
188
|
|
@@ -193,9 +194,9 @@ def register_auth(environment: locust.env.Environment):
|
|
193
194
|
|
194
195
|
auth_response.raise_for_status()
|
195
196
|
|
196
|
-
session["
|
197
|
+
session["user_sub_id"] = auth_response.json().get("user_sub_id")
|
197
198
|
session["username"] = username
|
198
|
-
session["
|
199
|
+
session["customer_name"] = customer_name
|
199
200
|
session["auth_info"] = (
|
200
201
|
"Please check your email and enter the confirmation code. If you didn't get a code after one minute, you can [request a new one](/resend-code)"
|
201
202
|
)
|
@@ -212,7 +213,7 @@ def register_auth(environment: locust.env.Environment):
|
|
212
213
|
def resend_code():
|
213
214
|
try:
|
214
215
|
auth_response = requests.post(
|
215
|
-
f"{environment.parsed_options.deployer_url}/
|
216
|
+
f"{environment.parsed_options.deployer_url}/auth/resend-confirmation",
|
216
217
|
json={"username": session["username"]},
|
217
218
|
)
|
218
219
|
|
@@ -242,8 +243,8 @@ def register_auth(environment: locust.env.Environment):
|
|
242
243
|
f"{environment.parsed_options.deployer_url}/auth/confirm-signup",
|
243
244
|
json={
|
244
245
|
"username": session.get("username"),
|
245
|
-
"
|
246
|
-
"
|
246
|
+
"customer_name": session.get("customer_name"),
|
247
|
+
"user_sub_id": session["user_sub_id"],
|
247
248
|
"confirmation_code": confirmation_code,
|
248
249
|
},
|
249
250
|
)
|
locust_cloud/cloud.py
CHANGED
@@ -102,7 +102,7 @@ advanced.add_argument(
|
|
102
102
|
advanced.add_argument(
|
103
103
|
"--region",
|
104
104
|
type=str,
|
105
|
-
default=
|
105
|
+
default=os.environ.get("AWS_DEFAULT_REGION"),
|
106
106
|
help="Sets the AWS region to use for the deployed cluster, e.g. us-east-1. It defaults to use AWS_DEFAULT_REGION env var, like AWS tools.",
|
107
107
|
)
|
108
108
|
parser.add_argument(
|
@@ -172,7 +172,7 @@ logging.getLogger("requests").setLevel(logging.INFO)
|
|
172
172
|
logging.getLogger("urllib3").setLevel(logging.INFO)
|
173
173
|
|
174
174
|
|
175
|
-
api_url = f"https://api.{options.region}.locust.cloud/1"
|
175
|
+
api_url = os.environ.get("LOCUSTCLOUD_DEPLOYER_URL", f"https://api.{options.region}.locust.cloud/1")
|
176
176
|
|
177
177
|
|
178
178
|
def main() -> None:
|
@@ -181,6 +181,8 @@ def main() -> None:
|
|
181
181
|
"Setting a region is required to use Locust Cloud. Please ensure the AWS_DEFAULT_REGION env variable or the --region flag is set."
|
182
182
|
)
|
183
183
|
sys.exit(1)
|
184
|
+
if options.region:
|
185
|
+
os.environ["AWS_DEFAULT_REGION"] = options.region
|
184
186
|
|
185
187
|
s3_bucket = "dmdb-default" if options.region == "us-east-1" else "locust-default"
|
186
188
|
deployments: list[Any] = []
|
@@ -1,10 +1,10 @@
|
|
1
1
|
locust_cloud/__init__.py,sha256=q95z_3-z0f10hRLpYmgXS9T5brvDBJWboWATwkaHebM,3101
|
2
|
-
locust_cloud/auth.py,sha256=
|
3
|
-
locust_cloud/cloud.py,sha256=
|
2
|
+
locust_cloud/auth.py,sha256=OPJoUvTWRfqQcaNv9UHWICuSCyW3pNoa6LsRo1Y0zR4,10340
|
3
|
+
locust_cloud/cloud.py,sha256=mgumiDCZGa-rLDZSd8ZV3DwBK2fPa272kenltfIdB-s,16120
|
4
4
|
locust_cloud/credential_manager.py,sha256=MiESqS8IOxncBON04irK1-seF-VNAHHTcELcyxp1ZR8,5571
|
5
5
|
locust_cloud/idle_exit.py,sha256=bYD6LeUa0d8Ev2b1f-tiRXVnfyolCoACcDWC8zizNPE,1189
|
6
6
|
locust_cloud/timescale/exporter.py,sha256=10JOYo3X6ZlUxvKFVzNnCLYjpjuytM4apuJD6PNXvDE,12966
|
7
|
-
locust_cloud/timescale/queries.py,sha256=
|
7
|
+
locust_cloud/timescale/queries.py,sha256=d8ERzYpd_uDIoGumi4h8dCKAUF_80JIvxZ8W5_QhJ1w,6554
|
8
8
|
locust_cloud/timescale/query.py,sha256=gAi4wjlLZhgGo2ByQhlZxrtBhJDYKzHBvU8q9avU1wU,3065
|
9
9
|
locust_cloud/webui/.eslintrc,sha256=kIMPN7JEUqHPpFmFOR2iym-TitbXUds45y27dbR9UIQ,1152
|
10
10
|
locust_cloud/webui/.gitignore,sha256=i8EHIqDlVm1-Dkvf_GTZmP_Wu99GE7ABfbYzHXOU734,54
|
@@ -17,7 +17,7 @@ locust_cloud/webui/vite.config.ts,sha256=cqxPMkbwEA3H9mGGbuPulQUhIHCosUqm_1usxzs
|
|
17
17
|
locust_cloud/webui/yarn.lock,sha256=52aat3Nl-O3OVBRrKO4RMpNJFCIpodvop0rxp0iWo-E,220316
|
18
18
|
locust_cloud/webui/dist/index.html,sha256=6b_uDESY4tIoZr_a4zeIsbkUai5jX9oJaNKhWznWksw,664
|
19
19
|
locust_cloud/webui/dist/assets/index-DkFumpSS.js,sha256=aTeMYWJ0rkOJ7_jI5ofSd42qNJNatTjsZA4Qkntptaw,2864270
|
20
|
-
locust_cloud-1.
|
21
|
-
locust_cloud-1.
|
22
|
-
locust_cloud-1.
|
23
|
-
locust_cloud-1.
|
20
|
+
locust_cloud-1.11.0.dist-info/METADATA,sha256=tVaPg9LFaS2BziLCmWfAdX3pkZGiC7Co4BPFJyIHEAM,452
|
21
|
+
locust_cloud-1.11.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
22
|
+
locust_cloud-1.11.0.dist-info/entry_points.txt,sha256=PGyAb4e3aTsGS3N3VGShDl6VzJaXy7QwsEgsLOC7V00,57
|
23
|
+
locust_cloud-1.11.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|