Open-Source Wikis

/

GitLab

/

Packages

gitlab-org/gitlab

Packages

Workspace gems extracted from the monolith. Each lives under gems/<name>/ and is loaded via path: in the Gemfile so it ships with the monorepo, but each gem could be released independently if needed.

Inventory

Gem Purpose
gitlab-utils Shared utilities: lazy methods, json wrappers, retry helpers
gitlab-rspec Shared RSpec helpers reused across this gem set
gitlab-rspec_flaky Flaky-test detection helpers
gitlab-database-load_balancing Postgres replica/primary read routing
gitlab-database-data_isolation Cross-database / cross-cell query rejection
gitlab-database-lock_retries Retryable schema-modifying transactions
gitlab-active-context Backend-agnostic vector + keyword retrieval
gitlab-housekeeper Automated MR generator
gitlab-backup-cli Standalone CLI for backup/restore
gitlab-secret_detection Secret detection rules and engine
gitlab-glaz GitLab Authoring Style ruleset
gitlab-grape-openapi Grape OpenAPI extensions
gitlab-http HTTP client wrapper with redirect/SSRF protections
gitlab-safe_request_store Per-request key/value store
gitlab-schema-validation Schema parsing and assertions
auto_freeze Freezes constants in Rails dev to catch mutation bugs
bundler-checksum Verifies gem checksums (deprecated; kept for transition)
mail-smtp_pool SMTP connection pool
csv_builder Streaming CSV builder
error_tracking_open_api OpenAPI client for the error-tracking service
ipynbdiff Jupyter notebook diff helper
activerecord-gitlab ActiveRecord patches and scopes
action_dispatch-draw_all Allow drawing routes in multiple definitions

26 gems total in gems/ (plus a config/ directory with shared CI templates and a README.md).

Why monorepo gems?

  • Ownership: each subsystem can have its own gemspec, dependencies, and README.
  • Isolation: tests for the gem run independently; the gem doesn't load the full Rails stack.
  • Reusability: a gem might one day be extracted (e.g., gitlab-database-load_balancing is internal-only but stable enough to publish).
  • CI granularity: changes to a gem only re-run that gem's tests, not the whole monolith.

Gem CI

Each gem is verified by gems/gem.gitlab-ci.yml. The template includes RSpec, Rubocop, and gemspec validation. Gems with PG dependencies extend gem-pg.gitlab-ci.yml.

Adding a new gem

  1. mkdir gems/my-gem.

  2. Run bundle gem ... inside it.

  3. Add the gem to the root Gemfile:

    gem 'my-gem', path: 'gems/my-gem', feature_category: :foo
  4. Add a .gitlab-ci.yml extending the gem template.

  5. Document the gem under packages/<gem>.md here.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Packages – GitLab wiki | Factory