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: expose lifecycle stage in project overview search #7017
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
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: FAILED
- Declining Code Health: 3 findings(s) 🚩
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: FAILED
- Declining Code Health: 3 findings(s) 🚩
featureSearchStore: new FeatureSearchStore( | ||
db, | ||
eventBus, | ||
getLogger, | ||
config.flagResolver, | ||
), |
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: Large Method
createStores increases from 106 to 112 lines of code, threshold = 70
@@ -224,6 +253,14 @@ class FeatureSearchStore implements IFeatureSearchStore { | |||
); | |||
}); | |||
|
|||
if (featureLifecycleEnabled) { | |||
query.leftJoin( |
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.
I would not join it into original query, but rather into final query, where the paging has been done already.
@@ -86,6 +95,19 @@ class FeatureSearchStore implements IFeatureSearchStore { | |||
const validatedSortOrder = | |||
sortOrder === 'asc' || sortOrder === 'desc' ? sortOrder : 'asc'; | |||
|
|||
const featureLifecycleEnabled = | |||
this.flagResolver.isEnabled('featureLifecycle'); | |||
const latestLifecycleStageQuery = this.db |
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.
Also can we look into opportunities to pull it out as a method, and put all selects, joins and query there
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: FAILED
- Declining Code Health: 3 findings(s) 🚩
const featureLifecycleEnabled = | ||
this.flagResolver.isEnabled('featureLifecycle'); | ||
|
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
FeatureSearchStore.searchFeatures increases in cyclomatic complexity from 11 to 12, threshold = 9
getAggregatedSearchData( | ||
rows, | ||
featureLifecycleEnabled: boolean, | ||
): IFeatureSearchOverview[] { |
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
FeatureSearchStore.getAggregatedSearchData increases in cyclomatic complexity from 9 to 11, threshold = 9
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.
LG!
About the changes
Each feature in project overview search will have a lifecycle with current stage and entered date similarly to single feature query.
I'm adding this new capability behind a flag so that we can safely roll it out.
Important files
Discussion points