Skip to content

feat: add ignore external keys feature#2616

Merged
JivusAyrus merged 1 commit intomainfrom
david/eng-9093-add-composition-option-to-db
Mar 9, 2026
Merged

feat: add ignore external keys feature#2616
JivusAyrus merged 1 commit intomainfrom
david/eng-9093-add-composition-option-to-db

Conversation

@Aenimus
Copy link
Copy Markdown
Member

@Aenimus Aenimus commented Mar 9, 2026

Summary by CodeRabbit

  • New Features
    • Added a new feature flag enabling organizations to customize composition behavior regarding external key handling.

Checklist

  • I have discussed my proposed changes in an issue and have received approval to proceed.
  • I have followed the coding standards of the project.
  • Tests or benchmarks have been added or updated.
  • Documentation has been updated on https://github.com/wundergraph/cosmo-docs.
  • I have read the Contributors Guide.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 9, 2026

Walkthrough

The PR introduces a new feature flag COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID across the controlplane codebase. It adds a constant definition and extends the feature ID type union, then integrates the new flag into the organization features map with default configuration.

Changes

Cohort / File(s) Summary
Feature Type Definition
controlplane/src/types/index.ts
Introduces new constant COMPOSITION_IGNORE_EXTERNAL_KEYS_FEATURE_ID with value 'composition-ignore-external-keys' and extends the FeatureIds union type to include this feature ID with an inline comment reference.
Feature Integration
controlplane/src/core/repositories/OrganizationRepository.ts
Imports the new feature constant and adds it to the getOrganizationFeatures method, including the flag in the default feature list with a false value. Adjusts field ordering and comments around boolean feature fields.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: add ignore external keys feature' directly and clearly summarizes the main change: introducing a new feature flag for ignoring external keys in composition logic.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)

Comment @coderabbitai help to get the list of available commands and usage tips.

@JivusAyrus JivusAyrus merged commit f29f5aa into main Mar 9, 2026
10 checks passed
@JivusAyrus JivusAyrus deleted the david/eng-9093-add-composition-option-to-db branch March 9, 2026 18:04
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 9, 2026

Codecov Report

❌ Patch coverage is 12.50000% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.25%. Comparing base (ea70e91) to head (873a67d).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...ne/src/core/repositories/OrganizationRepository.ts 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            main    #2616       +/-   ##
==========================================
+ Coverage   1.40%   64.25%   +62.85%     
==========================================
  Files        296      301        +5     
  Lines      47245    42658     -4587     
  Branches     432     4558     +4126     
==========================================
+ Hits         662    27410    +26748     
+ Misses     46297    15227    -31070     
+ Partials     286       21      -265     
Files with missing lines Coverage Δ
controlplane/src/types/index.ts 100.00% <100.00%> (ø)
...ne/src/core/repositories/OrganizationRepository.ts 77.37% <0.00%> (ø)

... and 595 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai coderabbitai bot mentioned this pull request Mar 9, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants