mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-10-26 04:57:46 +09:00
Hosted Assets queries started returning 502 in 0.301.0 because publish sync omitted their query database. Restore that database for hosted builds while keeping Markdown body-reference queries on demand. Static exports still prepare their database in the build runner. Reject builds with Assets queries but no database before changing generated files, so this failure cannot silently produce another broken deployment or erase the previous generated output. Uses the existing shared query compiler; no MCP-specific logic or API schema changes. Closes #6450 Ref #6427 Replaces #6453 with the same commits on `assets.staging`, which matches the staging deployment branch policy. ## Checklist - [x] Reproduce the reported 502 and verify the fix on project and custom origins. - [x] Preserve static export behavior and on-demand Markdown loading. - [x] Add a regression test for rejecting missing databases; demonstrate failure before the fix and success afterward. - [x] Review documentation impact and update the Content Engine publishing explanation. - [x] Run relevant tests, Builder/CLI typechecks, lint, formatting, and package-boundary checks. - [x] Run the full fixture link, sync, and build pipeline against the patched preview API. Regenerate all eight JSON snapshots with the current formatter; parsed data is unchanged and generated application files are unchanged. Validation: 88 CLI tests, 22 Builder tests, and four no-body-read publication tests pass. Fixture size checks were unavailable without compiled app bundles. Agent evaluations were not run. Existing affected sites need republishing after the fix is deployed.
Webstudio Fixtures
Fixtures are test projects that ensure the CLI and build process work correctly across different deployment targets.
Updating Fixtures After Changes
# From repository root - updates all fixtures
pnpm fixtures
This command will:
- Link all fixtures to their respective projects
- Sync the latest data from the development environment
- Build all fixtures with the latest code
Working with Individual Fixtures
# Go to fixture folder
cd fixtures/webstudio-features
# Link to project
pnpm fixtures:link
# Sync latest data
pnpm fixtures:sync
# Build fixture
pnpm fixtures:build
# Start it
pnpm run dev
Adding Assets to Fixtures
To add a new asset (image, video, audio, etc.) to a fixture:
-
Publish to staging
- Make your changes in the builder
- Publish to the staging environment
-
Get the build ID from CI
- After publishing, check the CI logs
- Find the build ID that was created
-
Update the fixture's build ID
- Edit
fixtures/[fixture-name]/package.json - Update the
--buildIdparameter in thefixtures:syncscript
"fixtures:sync": "pnpm cli sync --buildId NEW_BUILD_ID_HERE && pnpm oxfmt ./.webstudio/" - Edit
-
Sync with the correct environment
# Go to fixture folder cd fixtures/webstudio-features # Sync from staging environment (replace with your branch) BUILDER_HOST=fix-assets.staging.webstudio.is pnpm run fixtures -
Fix the origin URL
- After syncing, edit
.webstudio/data.json - Change the origin back to:
"origin": "https://main.development.webstudio.is"- This is necessary because sync changes it to the current branch
- After syncing, edit
-
Commit the changes
git add fixtures/ git commit -m "chore: update fixtures with new assets" git push