-
-
Notifications
You must be signed in to change notification settings - Fork 656
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
feat: frontend api clean up not needed columns #6489
Conversation
sjaanus
commented
Mar 11, 2024
- Clean up not used fields
- Fix a bug where segment was not attached
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
@@ -142,6 +140,9 @@ export default class ClientFeatureToggleReadModel | |||
feature.strategies = feature.strategies || []; | |||
feature.strategies.push(this.rowToStrategy(row)); | |||
} | |||
if (row.segment_id) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was missing from new query
@@ -36,7 +36,6 @@ export default class ClientFeatureToggleReadModel | |||
'features.project as project', | |||
'features.stale as stale', | |||
'features.impression_data as impression_data', | |||
'features.created_at as created_at', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not used
@@ -118,7 +117,6 @@ export default class ClientFeatureToggleReadModel | |||
project: row.project, | |||
stale: row.stale, | |||
type: row.type, | |||
dependencies: [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is same as in old frontend api.
There was a problem hiding this 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: OK
- Declining Code Health: 2 findings(s) 🚩
- Improving Code Health: 0 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Lightweight sanity check
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Overall Code Complexity client-feature-toggle-read-model.ts
- Complex Method client-feature-toggle-read-model.ts: ClientFeatureToggleReadModel.getAggregatedData
if (row.segment_id) { | ||
this.addSegmentIdsToStrategy(feature, row); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Getting worse: Complex Method
ClientFeatureToggleReadModel.getAggregatedData increases in cyclomatic complexity from 13 to 14, threshold = 9
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.
@@ -36,7 +36,6 @@ export default class ClientFeatureToggleReadModel | |||
'features.project as project', | |||
'features.stale as stale', | |||
'features.impression_data as impression_data', | |||
'features.created_at as created_at', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ New issue: Overall Code Complexity
This module has a mean cyclomatic complexity of 4.29 across 7 functions. The mean complexity threshold is 4
Why does this problem occur?
This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals. Read more.
To ignore this warning click here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a test to show a bug we fixed
There was a problem hiding this 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: OK
- Declining Code Health: 2 findings(s) 🚩
- Improving Code Health: 0 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Lightweight sanity check
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
- Overall Code Complexity client-feature-toggle-read-model.ts
- Complex Method client-feature-toggle-read-model.ts: ClientFeatureToggleReadModel.getAggregatedData