jdecool/scaleway-runtimepublic Fork
⑂ main
Commits
⬇ Clone ▾
git clone https://git.rickub.com/jdecool/scaleway-runtime.git
git clone ssh://git@rickub.com/jdecool/scaleway-runtime.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP

v0.3.0

v0.3.0 · @jdecool ·
Release notes

This release lets the function serve its own Static Files, and adds a check that the Function Runtime meets the application's Platform Requirements before you deploy.

[!IMPORTANT]
Files under public/ are now served by the runtime before the Application is built, and a file wins over a route of the same path.
If a controller answers a path such as /robots.txt while public/robots.txt exists, delete the file to keep the route.

Static Files

  • Serves GET and HEAD requests for regular files under public/ without booting the Kernel, even when the Application fails to build.
  • Refuses dotfiles (except /.well-known/), .php files and symbolic links leading out of public/. There is no index file and no directory listing.
  • Sends ETag, 304 on If-None-Match, and X-Content-Type-Options: nosniff.
  • Caches files whose name changes with their content for a year, as immutable. These are the files mapped by an AssetMapper or Webpack Encore manifest.json. Other files are revalidated on each use.
  • Sends precompressed .br, .zst or .gz variants when the client accepts them.
    The new static_compression option ("gzip", "zstd" or "br") compresses text files at runtime and keeps the results in memory for the Warm Process.
  • Refuses Static Files over 6 MiB, because responses of 10 MiB and more intermittently fail on Scaleway. scaleway-package warns about such files.

Compatibility check

  • New vendor/bin/scaleway-doctor --runtime=php84|php85 checks the Platform Requirements (php, ext-*) of composer.lock against the chosen Function Runtime, using Composer's own constraint engine.
    An unmet requirement makes Scaleway's composer install fail silently, and every Invocation then answers a 500.
  • scaleway-package --runtime=... runs the same check before writing the zip.
  • The check relies on the Function Runtime Catalogue that ships with the package. It is generated from probe measurements of php84 (PHP 8.4.28) and php85 (PHP 8.5.13).
    A weekly CI workflow measures the runtimes again and opens a pull request when they change.

Fixes

  • Emulator: php -S no longer adds a charset to text responses.

Documentation

  • The README is split into a docs/ folder organised by domain.
  • Records the Function Response sizes and encodings measured on Scaleway, and the decision to serve Static Files from the function (ADR 0009).

Dependencies

  • Adds composer/semver and symfony/mime as requirements.

The [!IMPORTANT] block at the top is the one change from the earlier releases' layout. Unlike v0.2.0, this version changes how the runtime behaves when upgrading: requests for files in public/ no longer reach the application.

Assets