Skip to content

Limit scratch asset upload size - #1051

Merged
mwtrew merged 3 commits into
mainfrom
limit-scratch-asset-upload-size
Oct 13, 2026
Merged

mwtrew merged 3 commits into
mainfrom
limit-scratch-asset-upload-size

Conversation

@mwtrew

@mwtrew mwtrew commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Status

What's changed?

  • Limits the size of uploaded Scratch assets based on the new SCRATCH_ASSET_MAX_SIZE_MB env var.

Steps to perform after deploying to production

Ensure https://github.com/RaspberryPiFoundation/terraform/pull/1497 is applied

@cla-bot cla-bot Bot added the cla-signed label Oct 8, 2026
@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Test coverage

94.11% line coverage reported by SimpleCov.
Run: https://github.com/RaspberryPiFoundation/editor-api/actions/runs/38402332582

@raspberrypiherokubot
raspberrypiherokubot temporarily deployed to editor-api-p-limit-scra-eteos8 October 8, 2026 15:20 Inactive
@mwtrew
mwtrew marked this pull request as ready for review October 13, 2026 13:06
@mwtrew
mwtrew temporarily deployed to editor-api-p-limit-scra-eteos8 October 13, 2026 13:06 Inactive

@zetter-rpf zetter-rpf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice one,

I might have mentioned this before, but we get value from using environment variables if they:

  • Protect secrets that we don't want in our codebase
  • Make it easy to vary a value per environment (I'm not counting tests as a class attribute would be just as easy to set/stub as an Env var).

Here I don't think there's much benefit and it makes it harder to set up because they are still in source control, just in a different repo (in terraform).

@mwtrew

mwtrew commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor Author

Here I don't think there's much benefit and it makes it harder to set up because they are still in source control, just in a different repo (in terraform).

Fair point, I think I'll leave it for now but happy to change it later if it causes any trouble 👍

@mwtrew
mwtrew merged commit 210c633 into main Oct 13, 2026
9 checks passed
@mwtrew
mwtrew deleted the limit-scratch-asset-upload-size branch October 13, 2026 14:07

This branch was previously deployed

1 inactive deployment
editor-api-p-limit-scra-eteos8 — 2b9bdeab Deployed Oct 13, 2026 by mwtrew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants