Skip to content

feat(monorepo): allow excluding workspace apps via monorepo.exclude and enabled: false - #1812

Open
YK-03 wants to merge 1 commit into
oblien:mainfrom
YK-03:feat/1758-monorepo-exclude
Open

YK-03 wants to merge 1 commit into
oblien:mainfrom
YK-03:feat/1758-monorepo-exclude

Conversation

@YK-03

@YK-03 YK-03 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #1758

Currently, monorepo detection scans all workspace packages and creates a sub-app for each package found. In repositories with non-deployable packages (e.g. mobile applications, CLI tools, internal documentation), there was no way to prevent openship from treating them as deployable services.

This PR adds two complementary mechanisms in openship.json:

  1. monorepo.exclude: string[]: A list of root directory paths to omit from detected workspace packages.
  2. monorepo.apps[].enabled: false: Disables a specific workspace sub-app by root directory. When enabled: false, name is optional.

Changes

  • Core schema & parsing (packages/core):
    • Added exclude?: string[] to OpenshipMonorepo.
    • Added enabled?: boolean to OpenshipMonorepoApp (allowing name to be omitted if disabled).
    • Validated monorepo.exclude as an array of path strings and monorepo.apps[].enabled as boolean.
  • Engine overlay & filtering (packages/platform):
    • In mergeMonorepoApps, filtered out detected apps configured with enabled === false.
    • In applyOpenshipOverlay, filtered out apps matching paths in monorepo.exclude.
    • Added public diagnostics warning when any path in monorepo.exclude does not match any detected workspace sub-app (matching monorepo.apps behavior).
  • Docs & Schema (apps/web):
    • Updated openship.schema.json with monorepo.exclude and monorepo.apps[].enabled.
    • Updated apps/web/content/docs/reference/openship-json.mdx documentation.
  • Tests:
    • Unit tests in packages/core/src/openship-config/parse.test.ts.
    • End-to-end deployment prepare service tests in apps/api/test/modules/deployments/prepare.service.test.ts.

Verification

  • bun test packages/core/src/openship-config/parse.test.ts (101 tests passed)
  • bunx vitest run test/modules/deployments/prepare.service.test.ts (58 tests passed)

…nd enabled: false

Support excluding detected workspace packages from being deployed as services via openship.json.

- Allow specifying monorepo.exclude: string[] to omit workspace apps by rootDirectory
- Allow specifying enabled: false on monorepo.apps[] (omitting
ame when disabled)
- Filter excluded sub-apps from info.monorepoApps during deployment preparation
- Emit config warnings when an exclusion path does not match any detected workspace apps
- Update documentation and JSON schema
- Add unit tests for parsing and deployment info resolution

Fixes oblien#1758

Signed-off-by: Yash Kaushik <yash005kaushik@gmail.com>
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.

[Feature]: Let openship.json exclude detected monorepo apps (enabled: false / monorepo.exclude)

1 participant