Skip to content

feat(server): consolidate historian and gitrest into routerlicious workspace#26612

Draft
alexvy86 wants to merge 3 commits intomicrosoft:mainfrom
alexvy86:consolidate-server
Draft

feat(server): consolidate historian and gitrest into routerlicious workspace#26612
alexvy86 wants to merge 3 commits intomicrosoft:mainfrom
alexvy86:consolidate-server

Conversation

@alexvy86
Copy link
Copy Markdown
Contributor

@alexvy86 alexvy86 commented Mar 2, 2026

Summary

  • Merges the three separate pnpm workspaces (server/historian, server/gitrest, server/routerlicious) into a single workspace under server/routerlicious, enabling all server components to be published together as one release group with workspace:~ interdependencies instead of versioned cross-workspace deps.
  • Moves historian, historian-base, gitrest, and gitrest-base packages into server/routerlicious/packages/
  • Renames DockerfileDockerfile.historian and creates Dockerfile.gitrest for per-service Docker builds; updates docker-compose.yml accordingly
  • Removes gitrest and historian as separate release groups from fluidBuild.config.cjs and removes their layer definitions from layerInfo.json
  • Adds pnpm overrides: @types/node@^18.17.1 (fixes Docker build type conflict) and isomorphic-git@1.25.10 (maintains gitrest-base storage access baseline tests)
  • Fixes configureThrottler in historian-base to handle IHybridThrottleConfig union type from updated getThrottleConfig return type

Test plan

  • pnpm build passes in server/routerlicious
  • pnpm test passes (44 historian-base tests + 425 gitrest-base tests + all existing routerlicious tests)
  • pnpm run build:docker builds main routerlicious image
  • pnpm run build:docker:historian builds historian image
  • pnpm run build:docker:gitrest builds gitrest image

🤖 Generated with Claude Code

…rkspace

Merges the three separate pnpm workspaces (`server/historian`, `server/gitrest`,
`server/routerlicious`) into a single workspace under `server/routerlicious`,
enabling all server components to be published together as one release group.

Changes:
- Move `historian` and `historian-base` packages into `server/routerlicious/packages/`
- Move `gitrest` and `gitrest-base` packages into `server/routerlicious/packages/`
- Update all cross-workspace `8.0.0-347501`/`8.0.0-366087` deps to `workspace:~`
- Add `Dockerfile.historian` and `Dockerfile.gitrest` for per-service Docker builds
- Update `docker-compose.yml` to build historian and gitrest from source
- Remove `server/historian/` and `server/gitrest/` directories
- Remove `gitrest` and `historian` as separate release groups from `fluidBuild.config.cjs`
- Remove obsolete `GitRest` and `Historian` layer definitions from `layerInfo.json`
- Add pnpm overrides: `@types/node@^18.17.1`, `isomorphic-git@1.25.10`
- Fix `configureThrottler` in `historian-base` to handle `IHybridThrottleConfig` union type

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 2, 2026 20:19
@alexvy86 alexvy86 marked this pull request as draft March 2, 2026 20:21
These pipelines are no longer needed as gitrest and historian have been
merged into the server/routerlicious workspace and will be built by the
server-routerlicious pipeline instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR consolidates the previously separate server/historian, server/gitrest, and server/routerlicious pnpm workspaces into a single workspace rooted at server/routerlicious, so the server components can be built/published together with workspace:~ interdependencies. It also updates Docker build/compose flows and adjusts Historian throttling config handling to support a new hybrid throttler config type.

Changes:

  • Moved Historian/GitRest packages under server/routerlicious/packages/* and switched cross-package deps to workspace:~.
  • Added per-service Dockerfiles (Dockerfile.historian, Dockerfile.gitrest) and updated docker-compose.yml and build scripts accordingly.
  • Updated build/release-group configuration (fluidBuild.config.cjs, layerInfo.json) and added pnpm overrides/pins in server/routerlicious/package.json.

Reviewed changes

Copilot reviewed 52 out of 165 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
server/routerlicious/packages/historian/tsconfig.json Adds Historian package TS config in consolidated workspace.
server/routerlicious/packages/historian/src/www.ts Adds Historian service entrypoint for routerlicious workspace.
server/routerlicious/packages/historian/package.json Moves Historian package metadata + switches deps to workspace:~.
server/routerlicious/packages/historian/eslint.config.mts Adds per-package ESLint flat config.
server/routerlicious/packages/historian/config.json Adds Historian local config for docker/dev runs.
server/routerlicious/packages/historian/README.md Adds package README.
server/routerlicious/packages/historian/LICENSE Adds package license file in new location.
server/routerlicious/packages/historian/.gitignore Adds package gitignore in new location.
server/routerlicious/packages/historian-base/tsconfig.json Adds Historian-base TS config in consolidated workspace.
server/routerlicious/packages/historian-base/src/utils.ts Adds shared Historian-base utilities (token parsing, errors, etc.).
server/routerlicious/packages/historian-base/src/test/utils/testTenantService.ts Adds test tenant service helper in new workspace layout.
server/routerlicious/packages/historian-base/src/test/utils/testLumberEngine.ts Adds console-debug Lumberjack engine for tests.
server/routerlicious/packages/historian-base/src/test/utils/testDocumentManager.ts Adds test document manager stub for Historian-base tests.
server/routerlicious/packages/historian-base/src/test/utils/testCache.ts Adds in-memory cache impl for tests.
server/routerlicious/packages/historian-base/src/test/utils/index.ts Exports Historian-base test utilities.
server/routerlicious/packages/historian-base/src/test/tsconfig.json Adds tsconfig for Historian-base test compilation.
server/routerlicious/packages/historian-base/src/test/testRedisClientConnectionManagerWithInvalidation.ts Adds redis test connection manager with invalidation support.
server/routerlicious/packages/historian-base/src/test/redis.spec.ts Adjusts redis tests to new cache APIs/types.
server/routerlicious/packages/historian-base/src/services/simplifiedCustomDataRetriever.ts Adds simplified custom data retriever implementation.
server/routerlicious/packages/historian-base/src/services/redisTenantCache.ts Adds tenant/token redis cache implementation.
server/routerlicious/packages/historian-base/src/services/redisCache.ts Adds generic redis cache implementation.
server/routerlicious/packages/historian-base/src/services/index.ts Barrel exports for Historian-base services.
server/routerlicious/packages/historian-base/src/services/definitions.ts Adds service interfaces/types (cache, tenant service, etc.).
server/routerlicious/packages/historian-base/src/runnerFactory.ts Updates throttler creation to support hybrid throttler configs.
server/routerlicious/packages/historian-base/src/runner.ts Adds Historian runner implementation in new workspace.
server/routerlicious/packages/historian-base/src/routes/repository/headers.ts Adds repository headers route module.
server/routerlicious/packages/historian-base/src/routes/repository/contents.ts Adds repository contents route module.
server/routerlicious/packages/historian-base/src/routes/repository/commits.ts Adds repository commits route module (with sha validation).
server/routerlicious/packages/historian-base/src/routes/index.ts Adds route composition for Historian-base.
server/routerlicious/packages/historian-base/src/routes/git/trees.ts Adds git trees routes.
server/routerlicious/packages/historian-base/src/routes/git/tags.ts Adds git tags routes.
server/routerlicious/packages/historian-base/src/routes/git/commits.ts Adds git commits routes.
server/routerlicious/packages/historian-base/src/routes/git/blobs.ts Adds git blobs routes + ping/raw endpoints.
server/routerlicious/packages/historian-base/src/logger.ts Adds Historian Lumberjack logging setup helper.
server/routerlicious/packages/historian-base/src/index.ts Adds public exports for Historian-base.
server/routerlicious/packages/historian-base/src/customizations.ts Adds customization hook types for Historian resources.
server/routerlicious/packages/historian-base/src/app.ts Adds Historian express app setup in new workspace.
server/routerlicious/packages/historian-base/package.json Moves Historian-base metadata + switches deps to workspace:~.
server/routerlicious/packages/historian-base/eslint.config.mts Adds per-package ESLint flat config.
server/routerlicious/packages/historian-base/README.md Adds package README.
server/routerlicious/packages/historian-base/LICENSE Adds package license file in new location.
server/routerlicious/packages/historian-base/.gitignore Adds package gitignore in new location.
server/routerlicious/packages/gitrest/tsconfig.json Adds GitRest package TS config in consolidated workspace.
server/routerlicious/packages/gitrest/src/www.ts Adds GitRest service entrypoint for routerlicious workspace.
server/routerlicious/packages/gitrest/package.json Moves GitRest metadata + switches deps to workspace:~ and ESLint 9.
server/routerlicious/packages/gitrest/eslint.config.mts Adds per-package ESLint flat config.
server/routerlicious/packages/gitrest/config.json Adds GitRest local config for docker/dev runs.
server/routerlicious/packages/gitrest/README.md Adds package README.
server/routerlicious/packages/gitrest/LICENSE Adds package license file in new location.
server/routerlicious/packages/gitrest/.gitignore Adds package gitignore in new location.
server/routerlicious/packages/gitrest-base/tsconfig.json Adds GitRest-base TS config in consolidated workspace.
server/routerlicious/packages/gitrest-base/src/utils/wholeSummary/readWholeSummary.ts Adds whole-summary read utility.
server/routerlicious/packages/gitrest-base/src/utils/wholeSummary/index.ts Exports whole-summary helpers.
server/routerlicious/packages/gitrest-base/src/utils/wholeSummary/definitions.ts Adds whole-summary types/enums.
server/routerlicious/packages/gitrest-base/src/utils/wholeSummary/constants.ts Adds constants for whole-summary logic.
server/routerlicious/packages/gitrest-base/src/utils/redisFs/index.ts Exports redis FS utilities.
server/routerlicious/packages/gitrest-base/src/utils/redisFs/helpers.ts Adds metrics + RedisFsError helper.
server/routerlicious/packages/gitrest-base/src/utils/index.ts Barrel exports for GitRest-base utils.
server/routerlicious/packages/gitrest-base/src/utils/gitrestTelemetryDefinitions.ts Adds GitRest Lumber event/property enums.
server/routerlicious/packages/gitrest-base/src/utils/filesystems.ts Adds filesystem manager factories (node/mem/redis).
server/routerlicious/packages/gitrest-base/src/utils/fileSystemHelper.ts Adds filesystem error mapping + helpers.
server/routerlicious/packages/gitrest-base/src/utils/definitions.ts Adds core interfaces for repo manager + filesystem abstractions.
server/routerlicious/packages/gitrest-base/src/test/utils.ts Adds test config + helpers for GitRest-base tests.
server/routerlicious/packages/gitrest-base/src/test/tsconfig.json Adds tsconfig for GitRest-base test compilation.
server/routerlicious/packages/gitrest-base/src/test/testRedisClientConnectionManagerWithInvalidation.ts Adds redis test connection manager with invalidation support.
server/routerlicious/packages/gitrest-base/src/test/storageAccess.ts Adds baseline storage-access performance assertions.
server/routerlicious/packages/gitrest-base/src/test/redis.spec.ts Adds redis FS tests for redisfs/hashmap-redisfs.
server/routerlicious/packages/gitrest-base/src/test/helpers.spec.ts Adds tests for sizeof helper.
server/routerlicious/packages/gitrest-base/src/test/gitManager.spec.ts Adds isomorphic-git manager tests + size limits tests.
server/routerlicious/packages/gitrest-base/src/runner.ts Adds GitRest runner implementation in new workspace.
server/routerlicious/packages/gitrest-base/src/routes/repository/contents.ts Adds GitRest repository contents route.
server/routerlicious/packages/gitrest-base/src/routes/repository/commits.ts Adds GitRest repository commits route.
server/routerlicious/packages/gitrest-base/src/routes/index.ts Adds route composition for GitRest-base.
server/routerlicious/packages/gitrest-base/src/routes/git/trees.ts Adds git trees routes for GitRest.
server/routerlicious/packages/gitrest-base/src/routes/git/tags.ts Adds git tags routes for GitRest.
server/routerlicious/packages/gitrest-base/src/routes/git/repos.ts Adds repo endpoints (no-op when repo-per-doc enabled).
server/routerlicious/packages/gitrest-base/src/routes/git/refs.ts Adds refs routes for GitRest.
server/routerlicious/packages/gitrest-base/src/routes/git/commits.ts Adds commits routes for GitRest.
server/routerlicious/packages/gitrest-base/src/routes/git/blobs.ts Adds blobs routes for GitRest.
server/routerlicious/packages/gitrest-base/src/logger.ts Adds GitRest Lumberjack logging setup helper.
server/routerlicious/packages/gitrest-base/src/index.ts Adds public exports for GitRest-base.
server/routerlicious/packages/gitrest-base/src/externalStorageManager.ts Adds external storage manager + null impl.
server/routerlicious/packages/gitrest-base/src/customizations.ts Adds customization hook types for GitRest resources.
server/routerlicious/packages/gitrest-base/src/app.ts Adds GitRest express app setup in new workspace.
server/routerlicious/packages/gitrest-base/package.json Moves GitRest-base metadata + switches deps to workspace:~ and ESLint 9.
server/routerlicious/packages/gitrest-base/eslint.config.mts Adds per-package ESLint flat config.
server/routerlicious/packages/gitrest-base/README.md Adds package README.
server/routerlicious/packages/gitrest-base/LICENSE Adds package license file in new location.
server/routerlicious/packages/gitrest-base/.gitignore Adds package gitignore in new location.
server/routerlicious/package.json Adds per-service docker build scripts + pnpm overrides/pins.
server/routerlicious/feeds/public.txt Adds historian/gitrest packages to public feed list.
server/routerlicious/feeds/internal-test.txt Adds historian/gitrest packages to internal-test feed list.
server/routerlicious/feeds/internal-build.txt Adds historian/gitrest packages to internal-build feed list.
server/routerlicious/docker-compose.yml Switches historian/gitrest services to local docker builds.
server/routerlicious/Dockerfile.historian Adds historian-specific docker build based on consolidated workspace.
server/routerlicious/Dockerfile.gitrest Adds gitrest-specific docker build based on consolidated workspace.
server/routerlicious/Dockerfile Updates main routerlicious Dockerfile to include new packages.
server/historian/scripts/only-pnpm.cjs Removes obsolete standalone historian workspace script.
server/historian/prettier.config.cjs Removes obsolete standalone historian workspace prettier config.
server/historian/pnpm-workspace.yaml Removes obsolete standalone historian workspace definition.
server/historian/packages/historian/LICENSE Removes old historian package license in previous location.
server/historian/packages/historian/.gitignore Removes old historian package gitignore in previous location.
server/historian/packages/historian-base/LICENSE Removes old historian-base package license in previous location.
server/historian/package.json Removes obsolete historian release-group root package.json.
server/historian/fluidBuild.docker.config.cjs Removes obsolete historian-specific docker build config.
server/historian/eslint.config.base.mts Removes obsolete historian workspace ESLint base config.
server/historian/README.md Removes obsolete historian workspace README.
server/historian/.vscode/settings.json Removes obsolete workspace VSCode settings.
server/historian/.vscode/launch.json Removes obsolete workspace VSCode launch config.
server/historian/.releaseGroup Removes obsolete historian release group marker.
server/historian/.prettierignore Removes obsolete historian workspace prettierignore copy.
server/historian/.npmrc Removes obsolete historian workspace npmrc.
server/historian/.editorconfig Removes obsolete historian workspace editorconfig.
server/historian/.dockerignore Removes obsolete historian workspace dockerignore.
server/gitrest/scripts/only-pnpm.cjs Removes obsolete standalone gitrest workspace script.
server/gitrest/prettier.config.cjs Removes obsolete standalone gitrest workspace prettier config.
server/gitrest/pnpm-workspace.yaml Removes obsolete standalone gitrest workspace definition.
server/gitrest/packages/gitrest/.gitignore Removes old gitrest package gitignore in previous location.
server/gitrest/package.json Removes obsolete gitrest release-group root package.json.
server/gitrest/fluidBuild.docker.config.cjs Removes obsolete gitrest-specific docker build config.
server/gitrest/eslint.config.base.mts Removes obsolete gitrest workspace ESLint base config.
server/gitrest/docker-compose.yml Removes obsolete gitrest standalone compose file.
server/gitrest/docker-compose.dev.yml Removes obsolete gitrest dev compose override.
server/gitrest/.vscode/settings.json Removes obsolete workspace VSCode settings.
server/gitrest/.vscode/launch.json Removes obsolete workspace VSCode launch config.
server/gitrest/.releaseGroup Removes obsolete gitrest release group marker.
server/gitrest/.prettierignore Removes obsolete gitrest workspace prettierignore copy.
server/gitrest/.npmrc Removes obsolete gitrest workspace npmrc.
server/gitrest/.editorconfig Removes obsolete gitrest workspace editorconfig.
server/gitrest/.dockerignore Removes obsolete gitrest workspace dockerignore.
layerInfo.json Removes separate GitRest/Historian layer definitions (now under server).
fluidBuild.config.cjs Removes separate historian/gitrest release groups from build config.
Comments suppressed due to low confidence (4)

server/routerlicious/packages/historian-base/src/test/redis.spec.ts:89

  • These assert.rejects(...) calls are not awaited. In async mocha tests, not awaiting means the test can pass even if the promise resolves (and can also lead to unhandled rejections). Use await assert.rejects(...) (and consider asserting the error shape/status).
    server/routerlicious/packages/historian/package.json:5
  • description is incorrect for this package (it says "Git REST API" but this is the Historian entrypoint). This will surface in npm metadata and can confuse consumers; update it to describe Historian.
    server/routerlicious/Dockerfile.gitrest:35
  • This Dockerfile downloads the tini binary directly from GitHub (see the TINI_VERSION use with the ADD below) without any checksum or signature verification. If the GitHub release asset or the download path is ever compromised, every image build will pick up and execute a malicious PID 1 process inside this container. Consider pinning tini to a specific, verified checksum (or using a distro-packaged init binary) and validating the downloaded binary before using it as the container entrypoint.
    server/routerlicious/Dockerfile.gitrest:136
  • Previously this container image ran its process as root, so any remote code execution in gitrest would have full root privileges inside the container and an easier path to host/container breakout. This change adds USER node so the service no longer runs as root, significantly reducing the impact of a compromise. No further action is required here, but be sure future Dockerfile changes preserve the non-root user configuration.

Comment on lines 144 to 149
"pnpm": {
"commentsOverrides": [
"@types/node is overridden to v18 to ensure all packages are building using the v18 types.",
"isomorphic-git is pinned to 1.25.10 to maintain storage access baseline performance in gitrest-base tests.",
"node types >= 22 are bumped down to 20.x to work around issues with packages using different types.",
"oclif includes some AWS-related features, but we don't use them, so we override those dependencies with empty packages. This helps reduce lockfile churn since the deps release very frequently.",
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pnpm.commentsOverrides says node types >=22 are bumped down to 20.x, but the actual override is @types/node: ^18.17.1. Please update/remove the comment so it matches the real override behavior (otherwise it’s misleading when troubleshooting dependency resolution).

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 2, 2026

🔗 No broken links found! ✅

Your attention to detail is admirable.

linkcheck output


> fluid-framework-docs-site@0.0.0 ci:check-links /home/runner/work/FluidFramework/FluidFramework/docs
> start-server-and-test "npm run serve -- --no-open" 3000 check-links

1: starting server using command "npm run serve -- --no-open"
and when url "[ 'http://127.0.0.1:3000' ]" is responding with HTTP status code 200
running tests using command "npm run check-links"


> fluid-framework-docs-site@0.0.0 serve
> docusaurus serve --no-open

[SUCCESS] Serving "build" directory at: http://localhost:3000/

> fluid-framework-docs-site@0.0.0 check-links
> linkcheck http://localhost:3000 --skip-file skipped-urls.txt

Crawling...

Stats:
  257792 links
    1822 destination URLs
    2063 URLs ignored
       0 warnings
       0 errors


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants