Skip to content

Boot the backend and the files worker from the build in CI - #1532

Merged
helpcodeai merged 3 commits into
mainfrom
ci/boot-backend-and-files-worker
Nov 5, 2026
Merged

helpcodeai merged 3 commits into
mainfrom
ci/boot-backend-and-files-worker

Conversation

@helpcodeai

Copy link
Copy Markdown
Contributor

Summary

Unit tests build services by hand, so a dependency Nest cannot resolve only shows up when a process boots. Two of these reached production in three days:

This adds a step to the backend job, so it runs on every pull request. After the build, it starts dist/src/main.js (waits for /health) and dist/src/ee/file-search/files-worker.main.js (waits for "files-worker ready"), with the Cloud settings (NODE_ENV=production, DEPLOYMENT_MODE=cloud, MCP_AUTH_MODE=oauth2) against the job's test database. The step fails if a process exits first, or isn't ready within 120 s, and prints the last 80 log lines.

Changes

  • .github/workflows/ci.yml: new step "Boot the backend and the files worker from the build" in the Backend job. It adds CI-only FILES_WORKER_TOKEN, ports and URLs, and no secrets.
  • No application code, no ee/ change.

Type

  • Other: CI

Testing

  • Proof that it catches the bug: a throwaway branch with this step plus Let the files worker boot: make Redis optional in the management-key guard #1526 reverted (tmp/boot-check-proof, run 42004181698). The step failed with the production error: Nest can't resolve dependencies of the JwtOrManagementKeyGuard (PrismaService, ?). The branch is deleted.
  • This branch (run 42006310245): "backend ready after 5s", "files-worker ready after 2s". The Backend job is green, and the step adds about 10 s.
  • The YAML parses with js-yaml.

Checklist

  • My code follows the existing code style
  • I have tested my changes locally (and in CI on both branches)
  • I have updated documentation (if applicable): comment on the step
  • All existing tests pass
  • This PR has a descriptive title

Related Issues

Follow-up to #1526 (files-worker crash loop) and #1483. Daily check 2026-11-05, decided by Matteo.

Deployment: CI only. Nothing changes on Cloud or self-hosted.

@helpcodeai
helpcodeai enabled auto-merge (squash) November 5, 2026 10:10
@helpcodeai
helpcodeai merged commit a810004 into main Nov 5, 2026
14 checks passed
@helpcodeai
helpcodeai deleted the ci/boot-backend-and-files-worker branch November 5, 2026 11:09
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant