Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: revert composition root #6492

Merged
merged 1 commit into from
Mar 11, 2024
Merged

fix: revert composition root #6492

merged 1 commit into from
Mar 11, 2024

Conversation

kwasniew
Copy link
Contributor

About the changes

Closes #

Important files

Discussion points

Copy link

vercel bot commented Mar 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Mar 11, 2024 0:02am
unleash-monorepo-frontend ⬜️ Ignored (Inspect) Visit Preview Mar 11, 2024 0:02am

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 1 findings(s) 🚩
  • Improving Code Health: 0 findings(s) ✅
  • Affected Hotspots: 1 files(s) 🔥

Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene

🚩 Declining Code Health (highest to lowest):

Comment on lines +299 to +319
const clientFeatureToggleReadModel = db
? new ClientFeatureToggleReadModel(db, config.eventBus)
: new FakeClientFeatureToggleReadModel();
const globalFrontendApiCache = new GlobalFrontendApiCache(
config,
segmentReadModel,
clientFeatureToggleReadModel,
configurationRevisionService,
);

const proxyService = new ProxyService(
config,
stores,
{
featureToggleServiceV2,
clientMetricsServiceV2,
settingService,
configurationRevisionService,
},
globalFrontendApiCache,
);

Choose a reason for hiding this comment

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

❌ Getting worse: Complex Method
createServices already has high cyclomatic complexity, and now it increases in Lines of Code from 250 to 267

Why does this problem occur?

This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring. Read more.

To ignore this warning click here.

@kwasniew kwasniew merged commit c841e72 into main Mar 11, 2024
8 of 9 checks passed
@kwasniew kwasniew deleted the revert-proxy-composition-root branch March 11, 2024 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants