Skip to content

Fix/camera list resilient s3 image url#554

Merged
fe51 merged 13 commits intomainfrom
fix/camera-list-resilient-s3-image-url
Mar 20, 2026
Merged

Fix/camera list resilient s3 image url#554
fe51 merged 13 commits intomainfrom
fix/camera-list-resilient-s3-image-url

Conversation

@fe51
Copy link
Member

@fe51 fe51 commented Mar 18, 2026

Fixes #553 "GET /cameras/ fails entirely when a single camera's S3 image is unavailable"

This PR introduces the following modifications

  • Schema (CameraRead.last_image_url): updated field description to document that null is returned when the image is not yet uploaded or temporarily unavailable in S3
  • GET /cameras/: added description on the route documenting the null fallback behavior for last_image_url
  • GET /cameras/{camera_id}: same documentation addition as above
  • fetch_cameras / get_camera: last_image_url resolution is now wrapped in a try/except — any HTTPException raised by the S3 presign call is caught and the field falls back to null instead of aborting the response

@codecov
Copy link

codecov bot commented Mar 18, 2026

Codecov Report

❌ Patch coverage is 62.50000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.07%. Comparing base (1c546d5) to head (7b41f49).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/app/api/api_v1/endpoints/cameras.py 57.14% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #554      +/-   ##
==========================================
- Coverage   88.16%   88.07%   -0.10%     
==========================================
  Files          51       51              
  Lines        2138     2147       +9     
==========================================
+ Hits         1885     1891       +6     
- Misses        253      256       +3     
Flag Coverage Δ
backend 88.09% <62.50%> (-0.10%) ⬇️
client 87.80% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions github-actions bot added the topic: build Related to build, installation & CI label Mar 19, 2026
@fe51 fe51 requested a review from MateoLostanlen March 20, 2026 14:03
MateoLostanlen
MateoLostanlen previously approved these changes Mar 20, 2026
Copy link
Member

@MateoLostanlen MateoLostanlen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for you fix @fe51

@fe51
Copy link
Member Author

fe51 commented Mar 20, 2026

Last check :

  • Launch services via pyro-envdev
  • call camera endpoints successfully
  • delete the last image on s3 of camera 1
  • call endpoints again, no error, just, as expected, an empty path for last image url
image

@fe51 fe51 requested a review from MateoLostanlen March 20, 2026 16:36
@fe51 fe51 merged commit b71cc17 into main Mar 20, 2026
22 of 24 checks passed
@fe51 fe51 deleted the fix/camera-list-resilient-s3-image-url branch March 20, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

endpoint: cameras module: schemas topic: build Related to build, installation & CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GET /cameras/ fails entirely when a single camera's S3 image is unavailable

2 participants