[FF] rspack_production_assets -- serve Rspack-built assets in production
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
Roll out the Rspack adoption currently behind the rspack_production_assets feature flag.
- DRI: @slashmanov
- Team Slack channel:
#g_foundations
Note
"Rolling out" means incrementally enabling the flag on GitLab.com to validate stability — it is not the same as releasing the feature, which happens when the flag is removed. Feature flag controls · Feature flag lifecycle
What could go wrong?
When enabled, Rails serves the Rspack-built asset bundles (manifest.rspack.json) instead of Webpack's. Blast radius is frontend asset delivery for flagged requests: a bad Rspack manifest or a missing/incorrect chunk would break page JS on those page loads. The flag is checked against a per-request actor (so the percentage rollout covers anonymous traffic too) and is instantly reversible. Both bundlers' assets ship in the same /assets/webpack/ folder, so disabling the flag falls straight back to the Webpack manifest.
Prerequisite: CI must build and ship both bundlers' output (see the build/CI wiring in !243058 (merged)) before enabling in production, otherwise manifest.rspack.json will be absent.
Rollout
Run all production /chatops in #production and cross-post to #g_foundations.
Non-production
/chatops gitlab run feature set rspack_production_assets 50 --actors --dev --pre --staging --staging-ref
/chatops gitlab run feature set rspack_production_assets true --dev --pre --staging --staging-refProduction — percentage rollout (wait ≥15 min between steps, watch dashboards):
/chatops gitlab run feature set rspack_production_assets <percentage> --actorsBecause the actor is the request, --user and --group have no effect on this flag. To opt in specific users, use rspack_production_assets_opt_in instead (#631217):
/chatops gitlab run feature set rspack_production_assets_opt_in true --user=slashmanovBefore global rollout
- CI ships both Webpack and Rspack manifests in the assets image (!243058 (merged))
- Key pages verified rendering from the Rspack manifest with no console errors
- Change management issue opened, if required
Cleanup
Remove the flag once deemed stable — see cleaning up. Remove the flag and its YAML definition from the codebase, then:
/chatops gitlab run feature delete rspack_production_assets --dev --pre --staging --staging-ref --production