patch..
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
-- Remote visualization must load an ARM64 bridge image. The previous
|
||||
-- `latest` artifact is AMD64 and can only work when a Jetson bridge image
|
||||
-- happened to be preinstalled on the platform.
|
||||
WITH refreshed_runtime_images AS (
|
||||
SELECT
|
||||
profile.id,
|
||||
jsonb_agg(
|
||||
CASE WHEN artifact->>'image' IN (
|
||||
'slam-ros-bridge:latest',
|
||||
'slam-ros-bridge:jetson_orin-20260819-sensor-cloud-v1'
|
||||
) THEN
|
||||
jsonb_build_object(
|
||||
'url', 'https://pub-ca72c40797144462bdb7d200c215d361.r2.dev/studio-artifacts/runtime-images/slam-ros-bridge/jetson-orin/latest/slam-ros-bridge-jetson-orin.tar.zst?v=0659d4cf5578',
|
||||
'image', 'slam-ros-bridge:jetson_orin',
|
||||
'fileName', 'slam-ros-bridge-jetson-orin.tar.zst',
|
||||
'required', true,
|
||||
'checksumSha256', '0659d4cf5578c43bc9c25e4a4fc5d226ccd5b7bec43becfdff83b5390717114e'
|
||||
)
|
||||
ELSE artifact
|
||||
END
|
||||
) AS runtime_images
|
||||
FROM "course_environment_profiles" profile
|
||||
CROSS JOIN LATERAL jsonb_array_elements(COALESCE(profile.config::jsonb->'runtimeImages', '[]'::jsonb)) artifact
|
||||
WHERE profile."platform_key" = 'PLATFORM'
|
||||
AND profile.config::jsonb #>> '{target}' = 'remote-jetson'
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(COALESCE(profile.config::jsonb->'runtimeImages', '[]'::jsonb)) item
|
||||
WHERE item->>'image' IN (
|
||||
'slam-ros-bridge:latest',
|
||||
'slam-ros-bridge:jetson_orin-20260819-sensor-cloud-v1'
|
||||
)
|
||||
)
|
||||
GROUP BY profile.id
|
||||
)
|
||||
UPDATE "course_environment_profiles" profile
|
||||
SET
|
||||
"config" = jsonb_set(profile.config::jsonb, '{runtimeImages}', refreshed.runtime_images, true),
|
||||
"updated_at" = CURRENT_TIMESTAMP
|
||||
FROM refreshed_runtime_images refreshed
|
||||
WHERE profile.id = refreshed.id;
|
||||
Reference in New Issue
Block a user