chore(backend): modernize directus-sync setup for Directus 11.17#859
Merged
Conversation
3.5.1 is compatible with Directus 11.17, which the production stack runs after the 2026-06-06 update. The previous pin (3.4.0) only covered up to Directus 11.10 and would fail with a version mismatch. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Pulled current schema and collections from api.utopia-lab.org via directus-sync@3.5.1 pull, after the 2026-06-06 Directus update from 11.9.3 to 11.17.4. Notable diffs: - info.json bumped to 11.17.4 - Every field metadata gains a 'searchable' property (added in 11.13) - New specs/ directory with GraphQL + OpenAPI specs - Collections (permissions, presets, flows, settings, …) snapshot the state that has accumulated in production over the past months - directus_sync_id_map collection removed (internal table, recreated on demand) The schema-side production state already matches the repo after yesterday's 'directus-sync push --no-collections --force'. This commit brings the repo's view of collections up to date as well. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Match the production stack (updated 2026-06-06). With the directus-config snapshot now produced by 11.17.4 (it includes the new 'systemFields' key in info.json), CI's backend container has to be at the matching version or 'directus-sync push' fails with: Invalid payload. "systemFields" is not allowed. Schema migrations between 11.9.3 and 11.17.4 run automatically on container start, so no extra steps are needed. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This folder was removed from production at some point but is still referenced by 'seed/directus_files_marker_outline.json' (CI test data). Without it, the backend-seed CI step hits 'No id map found for folder' and 'directus-sync push' bails after 20 retry rounds. Repo-only entry: production neither has nor needs it. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The scripts blindly try to authenticate as soon as they run. When the backend container has just been started (the common case in CI and after a 'docker compose up'), Directus hasn't finished booting yet and the login request errors out with 'fetch failed / other side closed'. directus-sync 3.5.1 provides a 'wait-server-ready' command exactly for this. Adding it to the top of each script makes the scripts idempotent with respect to startup timing, so 'docker compose up -d --build && ./push.sh' just works without a manual sleep. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Direct 'directus-sync wait-server-ready' fails with 'error: unknown command'. The wait helper is exposed as 'directus-sync helpers wait-server-ready' (see tractr/directus-sync docs, 'Helpers' section). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
'directus-sync helpers wait-server-ready' relies on the SDK authenticating against the server, so it hits the timeout even when /server/health is already responsive — apparently the auth side isn't fully ready in the early seconds of a fresh boot. A plain curl against /server/health (which is public and only requires the HTTP server to be up) is more honest about what 'ready' means here. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
A first-boot bootstrap on an empty database (no data/ directory yet) can take well over a minute. Push 'wait for ready' out to 3 minutes so a fresh local setup doesn't time out before Directus has applied all its initial migrations. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two related changes to bring the backend tooling and the snapshot in
sync with the production stack, which was updated from Directus
11.9.3 → 11.17.4 on 2026-06-06.
Commit 1 —
chore(backend): bump directus-sync to 3.5.1backend/{push,pull,seed}.shpinneddirectus-sync@3.4.0, which onlysupports up to Directus 11.10. With production on 11.17, running these
scripts now fails with a schema-version mismatch.
3.5.1(the current latest, released 2026-04-13) is explicitly compatiblewith 11.17.
Commit 2 —
chore(backend): sync directus-config with productionPulled the live schema + collections from
api.utopia-lab.orgwithdirectus-sync@3.5.1 pull. Highlights:snapshot/info.json:directusfield bumped to11.17.4, newsystemFieldsarray"searchable": trueproperty (introduced in Directus 11.13)specs/directory (GraphQL + OpenAPI specs)collections/{permissions,presets,flows,settings,…}.jsonnow reflect the production statedirectus_sync_id_mapcollection removed from the snapshot (internal table, recreated on demand)The push side was already executed against production with
directus-sync@3.5.1 push --no-collections --force— this PR just bringsthe repo's view of the schema and collections back into sync.
Test plan
cd backend && ./push.shagainst a local dev instance succeeds without version mismatchcd backend && ./pull.shagainst a local dev instance succeeds and produces no diff🤖 Generated with Claude Code