autoverse-cli 0.29.1.dev409__py3-none-any.whl → 0.29.1.dev410__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.
- {autoverse_cli-0.29.1.dev409.dist-info → autoverse_cli-0.29.1.dev410.dist-info}/METADATA +1 -1
- {autoverse_cli-0.29.1.dev409.dist-info → autoverse_cli-0.29.1.dev410.dist-info}/RECORD +9 -9
- avrs/app_version.py +1 -1
- avrs/race_cloud.py +0 -13
- avrs/race_cloud_util.py +22 -31
- {autoverse_cli-0.29.1.dev409.dist-info → autoverse_cli-0.29.1.dev410.dist-info}/WHEEL +0 -0
- {autoverse_cli-0.29.1.dev409.dist-info → autoverse_cli-0.29.1.dev410.dist-info}/entry_points.txt +0 -0
- {autoverse_cli-0.29.1.dev409.dist-info → autoverse_cli-0.29.1.dev410.dist-info}/licenses/LICENSE +0 -0
- {autoverse_cli-0.29.1.dev409.dist-info → autoverse_cli-0.29.1.dev410.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
autoverse_cli-0.29.1.
|
|
1
|
+
autoverse_cli-0.29.1.dev410.dist-info/licenses/LICENSE,sha256=d4eWXho-u18HkBsX4K21uHX_bBb2UXZSrJdsb7Z_JlM,2647
|
|
2
2
|
avrs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
avrs/app_version.py,sha256=
|
|
3
|
+
avrs/app_version.py,sha256=XVzglkP1sgPsZ1joxaoIxLD7DhHtNYgEDohH7v8nKZg,864
|
|
4
4
|
avrs/argparse_help.py,sha256=EoEaohGXZXqJvs1dFEzbo9vh47CYdHdSY2Im2Ps2iFo,945
|
|
5
5
|
avrs/avrs.py,sha256=pQHc8KLAD0hCxpBoNbXOgj2Et3qiqxSMKyAXFLwWFjE,5787
|
|
6
6
|
avrs/can_tool.py,sha256=IBoctKobBJ3wCq4ZdtuXuXH4AMEUxazCfYT6YP0Luw8,7161
|
|
@@ -8,11 +8,11 @@ avrs/can_tool_util.py,sha256=G3q21dTGMLc09SDq_RieoW7kSn-kXPkXxPDjavPh4hQ,7710
|
|
|
8
8
|
avrs/cfg.py,sha256=kMn08Z4Ms1PAu2-U1QI8weEJeIVEppP4A4_tFfwnjtg,2924
|
|
9
9
|
avrs/launcher.py,sha256=uk7xG2JTLJv7FJMDo1diwc-zmTvUxXJME9-0ctrZRuk,11352
|
|
10
10
|
avrs/launcher_util.py,sha256=zXUbJByn9M-ErkNM6DvLCFtUkueYH-R0dehjQj0aYEs,6879
|
|
11
|
-
avrs/race_cloud.py,sha256=
|
|
11
|
+
avrs/race_cloud.py,sha256=GydDqbx_1PiqTA-GV3NAavY3O10RF_nJOhCND-EciiE,23011
|
|
12
12
|
avrs/race_cloud_bridge_can.py,sha256=K3is7GFzWo2KBojr6V65kz138UfkVFXXofVxSAziArY,2888
|
|
13
13
|
avrs/race_cloud_cfg_util.py,sha256=TF_gsP7c_39MKs1CyzeXkTH-Fwyd8wLkFkMbqQVmdeo,12066
|
|
14
14
|
avrs/race_cloud_fwd_api.py,sha256=jB4kt6Shu9Pj96WPVjK790PZjucYxmuHjjVKczQfyZI,1620
|
|
15
|
-
avrs/race_cloud_util.py,sha256=
|
|
15
|
+
avrs/race_cloud_util.py,sha256=PgzXdqEJ8xHkflHBG0uxD8xtaU6MpfDJb56NeL7ZKeU,16003
|
|
16
16
|
avrs/shell_completion.py,sha256=_IM85ADKQHYNMlTa1_nhnYWsgdOzRQ7tIFHxAT6EWWA,4298
|
|
17
17
|
avrs/simconfig.py,sha256=UZc4FrxVHUkk2e9IglSpuojXkaL_nPrJW7trbEGgOOo,2907
|
|
18
18
|
avrs/simconfig_util.py,sha256=ronvXg9Mraz60K99ABBvo_YDI1_rWphUWUn_s_voTKw,6044
|
|
@@ -44,8 +44,8 @@ avrs/requests/toggle_hud.py,sha256=sV5t5QZc4uvRihPVk8jEKZiQNsyF9tsUwq5b4jjZplc,3
|
|
|
44
44
|
avrs/requests/vd.py,sha256=Rd0mCc89m2yKjftVf0cMHMFbJG4iFd09KzrI-DsCLgI,2606
|
|
45
45
|
avrs/requests/vehicle_input.py,sha256=R1b1xkRtOBkwyU6OSN4bWVlYsIUroZG0WKbYbc4pEH8,729
|
|
46
46
|
avrs/requests/vehicle_replay.py,sha256=7HPfVLjSLNbOyzU77Bz29qpHqRsMUAIWvnwvnNiw2nk,15026
|
|
47
|
-
autoverse_cli-0.29.1.
|
|
48
|
-
autoverse_cli-0.29.1.
|
|
49
|
-
autoverse_cli-0.29.1.
|
|
50
|
-
autoverse_cli-0.29.1.
|
|
51
|
-
autoverse_cli-0.29.1.
|
|
47
|
+
autoverse_cli-0.29.1.dev410.dist-info/METADATA,sha256=iiVN6wpip0Bu2XsDnVBdgGg2Q9kl_xscPIwkUJP2h8Y,4588
|
|
48
|
+
autoverse_cli-0.29.1.dev410.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
49
|
+
autoverse_cli-0.29.1.dev410.dist-info/entry_points.txt,sha256=Cb9qsUyU5AKkklehCcvtfT0-N3SXbUEqvjze4iEU5kE,40
|
|
50
|
+
autoverse_cli-0.29.1.dev410.dist-info/top_level.txt,sha256=-AJO2e4MCVej6hY0U84pu5NfMeMW5qaAPSMisDT5rmA,5
|
|
51
|
+
autoverse_cli-0.29.1.dev410.dist-info/RECORD,,
|
avrs/app_version.py
CHANGED
avrs/race_cloud.py
CHANGED
|
@@ -209,13 +209,8 @@ class AvrsRaceCloud(AvrsApiRequest):
|
|
|
209
209
|
def race_connect(self, args):
|
|
210
210
|
logger = logging.getLogger('avrs')
|
|
211
211
|
|
|
212
|
-
print('[DEBUG] ===== RACE CONNECT START =====')
|
|
213
|
-
print('[DEBUG] sim_target argument: {}'.format(args.sim_target))
|
|
214
|
-
|
|
215
212
|
# Validate sim_target (can be legacy index 0-5 or public IP only)
|
|
216
213
|
is_valid, parsed_value, is_ip = parse_sim_target(args.sim_target)
|
|
217
|
-
print('[DEBUG] parse_sim_target result: is_valid={}, parsed_value={}, is_ip={}'.format(
|
|
218
|
-
is_valid, parsed_value, is_ip))
|
|
219
214
|
|
|
220
215
|
if not is_valid:
|
|
221
216
|
print('invalid sim_target: {}'.format(parsed_value))
|
|
@@ -223,7 +218,6 @@ class AvrsRaceCloud(AvrsApiRequest):
|
|
|
223
218
|
|
|
224
219
|
# make api call to begin connection
|
|
225
220
|
our_ip = get_local_instance_ip()
|
|
226
|
-
print('[DEBUG] Local instance IP (our_ip): {}'.format(our_ip))
|
|
227
221
|
|
|
228
222
|
if our_ip == '127.0.0.1':
|
|
229
223
|
print('this machines IP was returned as localhost. was this run on the cloud instance?')
|
|
@@ -280,18 +274,11 @@ class AvrsRaceCloud(AvrsApiRequest):
|
|
|
280
274
|
'config_data': vcfg_data
|
|
281
275
|
}
|
|
282
276
|
|
|
283
|
-
print('[DEBUG] ===== CONNECTION REQUEST =====')
|
|
284
|
-
print('[DEBUG] sim_id (parsed): {}'.format(parsed_value))
|
|
285
|
-
print('[DEBUG] our_ip: {}'.format(our_ip))
|
|
286
|
-
print('[DEBUG] team_name: {}'.format(args.team_name))
|
|
287
|
-
print('[DEBUG] instance_id override: {}'.format(args.instance_id))
|
|
288
|
-
|
|
289
277
|
ok, response = call_race_cloud_api(connection_request)
|
|
290
278
|
if not ok:
|
|
291
279
|
print('connect api error: {}'.format(response))
|
|
292
280
|
return
|
|
293
281
|
|
|
294
|
-
print('[DEBUG] API call succeeded, parsing response...')
|
|
295
282
|
ok, rbody, sim_ip = get_api_script_response(response)
|
|
296
283
|
if not ok:
|
|
297
284
|
print(rbody)
|
avrs/race_cloud_util.py
CHANGED
|
@@ -366,21 +366,13 @@ def call_race_cloud_api(body):
|
|
|
366
366
|
url = 'https://9gca6018p0.execute-api.us-east-1.amazonaws.com/backend/race-connect'
|
|
367
367
|
region = 'us-east-1'
|
|
368
368
|
|
|
369
|
-
print('[DEBUG] ===== RACE CLOUD API CALL =====')
|
|
370
|
-
print('[DEBUG] URL: {}'.format(url))
|
|
371
|
-
print('[DEBUG] Request body: {}'.format(json.dumps(body, indent=2)))
|
|
372
|
-
|
|
373
369
|
# Get credentials from boto3 session (uses IAM role on EC2)
|
|
374
370
|
session = boto3.Session()
|
|
375
371
|
credentials = session.get_credentials()
|
|
376
372
|
|
|
377
373
|
if credentials is None:
|
|
378
|
-
print('[DEBUG] ERROR: No AWS credentials found!')
|
|
379
374
|
return (False, 'No AWS credentials available')
|
|
380
375
|
|
|
381
|
-
print('[DEBUG] AWS credentials found: access_key={}...'.format(
|
|
382
|
-
credentials.access_key[:10] if credentials.access_key else 'None'))
|
|
383
|
-
|
|
384
376
|
# Prepare the request body
|
|
385
377
|
body_json = json.dumps(body)
|
|
386
378
|
|
|
@@ -395,14 +387,6 @@ def call_race_cloud_api(body):
|
|
|
395
387
|
# Sign the request with SigV4
|
|
396
388
|
SigV4Auth(credentials, 'execute-api', region).add_auth(request)
|
|
397
389
|
|
|
398
|
-
print('[DEBUG] Request headers after signing:')
|
|
399
|
-
for k, v in request.headers.items():
|
|
400
|
-
# Don't print full auth header for security
|
|
401
|
-
if k.lower() == 'authorization':
|
|
402
|
-
print('[DEBUG] {}: {}...'.format(k, v[:50]))
|
|
403
|
-
else:
|
|
404
|
-
print('[DEBUG] {}: {}'.format(k, v))
|
|
405
|
-
|
|
406
390
|
# Make the request using urllib
|
|
407
391
|
try:
|
|
408
392
|
req = urllib.request.Request(
|
|
@@ -411,35 +395,42 @@ def call_race_cloud_api(body):
|
|
|
411
395
|
headers=dict(request.headers),
|
|
412
396
|
method='POST'
|
|
413
397
|
)
|
|
414
|
-
print('[DEBUG] Sending request...')
|
|
415
398
|
with urllib.request.urlopen(req) as response:
|
|
416
399
|
response_body = response.read().decode('utf-8')
|
|
417
|
-
print('[DEBUG] Response status: {}'.format(response.status))
|
|
418
|
-
print('[DEBUG] Response body (first 500 chars): {}'.format(response_body[:500]))
|
|
419
400
|
return (True, response_body)
|
|
420
401
|
except urllib.error.HTTPError as e:
|
|
421
402
|
error_body = e.read().decode('utf-8')
|
|
422
|
-
print('[DEBUG] HTTP ERROR!')
|
|
423
|
-
print('[DEBUG] Status code: {}'.format(e.code))
|
|
424
|
-
print('[DEBUG] Reason: {}'.format(e.reason))
|
|
425
|
-
print('[DEBUG] Headers: {}'.format(dict(e.headers)))
|
|
426
|
-
print('[DEBUG] Body: {}'.format(error_body))
|
|
427
403
|
logger.error('API error - status: {}, body: {}'.format(e.code, error_body))
|
|
428
404
|
return (False, 'response had status code {} - {}'.format(e.code, error_body))
|
|
429
405
|
except Exception as e:
|
|
430
|
-
print('[DEBUG] EXCEPTION: {} - {}'.format(type(e).__name__, str(e)))
|
|
431
406
|
logger.error('API request failed: {}'.format(str(e)))
|
|
432
407
|
return (False, 'request failed: {}'.format(str(e)))
|
|
433
408
|
|
|
434
409
|
def get_api_script_response(raw):
|
|
435
410
|
logger = logging.getLogger('avrs')
|
|
436
|
-
|
|
411
|
+
|
|
412
|
+
# Parse the raw JSON response
|
|
437
413
|
api_response = json.loads(raw)
|
|
438
|
-
|
|
439
|
-
#
|
|
440
|
-
|
|
414
|
+
|
|
415
|
+
# Handle different response formats from API Gateway
|
|
416
|
+
# Format 1: {"body": "{...}"} - Lambda Proxy integration with string body
|
|
417
|
+
# Format 2: {"script_response": {...}, "sim_private_ip": ...} - Direct response
|
|
418
|
+
if 'body' in api_response:
|
|
419
|
+
body_str = api_response['body']
|
|
420
|
+
# Body is a JSON string from Lambda Proxy integration
|
|
421
|
+
decoded = json.loads(body_str) if isinstance(body_str, str) else body_str
|
|
422
|
+
else:
|
|
423
|
+
# Response came directly without body wrapper
|
|
424
|
+
decoded = api_response
|
|
425
|
+
|
|
441
426
|
logger.info('race cloud api response: {}'.format(decoded))
|
|
427
|
+
|
|
442
428
|
if decoded['script_response']['statusCode'] != 200:
|
|
443
429
|
return (False, 'inner response had bad status code {}'.format(decoded))
|
|
444
|
-
|
|
445
|
-
|
|
430
|
+
|
|
431
|
+
# Parse the script_response body
|
|
432
|
+
script_body = decoded['script_response']['body']
|
|
433
|
+
if isinstance(script_body, str):
|
|
434
|
+
script_body = json.loads(script_body)
|
|
435
|
+
|
|
436
|
+
return (True, script_body, decoded['sim_private_ip'])
|
|
File without changes
|
{autoverse_cli-0.29.1.dev409.dist-info → autoverse_cli-0.29.1.dev410.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{autoverse_cli-0.29.1.dev409.dist-info → autoverse_cli-0.29.1.dev410.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{autoverse_cli-0.29.1.dev409.dist-info → autoverse_cli-0.29.1.dev410.dist-info}/top_level.txt
RENAMED
|
File without changes
|