Skip to content

DBC22-6080: Add Brotli/zstd compression to backend#1301

Merged
bcgov-brwang merged 1 commit into
mainfrom
task/DBC22-6080
May 14, 2026
Merged

DBC22-6080: Add Brotli/zstd compression to backend#1301
bcgov-brwang merged 1 commit into
mainfrom
task/DBC22-6080

Conversation

@wmuldergov
Copy link
Copy Markdown
Collaborator

@wmuldergov wmuldergov commented Apr 17, 2026

📝 Submitter

🔗 JIRA Ticket


✅ Quality Assurance & Requirements

  • Requirements Met: I have confirmed that all acceptance criteria from the JIRA ticket are fulfilled.
  • Tested desktop in local or dev envs
  • Tested mobile in local or dev envs
  • Ran unit tests locally
  • SonarCloud: I have verified that the SonarCloud analysis is clean/passing for this branch.

🧪 How to Test (if required)

  1. Open devtools
  2. Confirm that the API's are using br for compression
  3. Try run a few curl requests like these with different encoding types curl -v -X GET -H "Accept-Encoding: gzip, br" "https://dev.drivebc.ca/api/webcams/?" -o /dev/null
  4. curl -v -X GET -H "Accept-Encoding: gzip, br, zstd" "https://dev.drivebc.ca/api/webcams/?" -o /dev/null
  5. curl -v -X GET -H "Accept-Encoding: gzip" "https://dev.drivebc.ca/api/webcams/?" -o /dev/null
  6. All should return the encoding you requested with zstd being first priority, br second and gzip 3rd.
  7. Go to dev.drivebc.ca and confirm site and API's work as expected. Also try on mobile.

🔍 Reviewer Checklist

  • Reviewed code for logic and cleanliness
  • Re-tested desktop/mobile in local or dev envs
  • Verified no new console warnings/errors
  • Confirmed that any new env variables are understood/documented

@wmuldergov wmuldergov requested a review from bcgov-brwang April 17, 2026 16:19
@wmuldergov
Copy link
Copy Markdown
Collaborator Author

wmuldergov commented Apr 17, 2026

This will need some further work, due to new errors in the timelapse API discovered:
UnicodeDecodeError at /api/webcams/343/timelapse/20260417190009/
'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

Update: Switched to a different package that also supports zstd, which seems to not cause this error.

@wmuldergov wmuldergov removed the request for review from bcgov-brwang April 17, 2026 19:18
@wmuldergov wmuldergov force-pushed the task/DBC22-6080 branch 2 times, most recently from 75216d4 to 66aa123 Compare May 8, 2026 16:32
@sonarqubecloud
Copy link
Copy Markdown

@wmuldergov wmuldergov changed the title DBC22-6080: Add Brotli compression to backend DBC22-6080: Add Brotli/zstd compression to backend May 14, 2026
@bcgov-brwang bcgov-brwang merged commit 1fa8ac7 into main May 14, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review The PR is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants