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

feat: expose lifecycle stage in project overview search #7017

Merged
merged 3 commits into from May 9, 2024

Conversation

kwasniew
Copy link
Contributor

@kwasniew kwasniew commented May 8, 2024

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

Copy link

vercel bot commented May 8, 2024

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

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 9, 2024 8:46am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview May 9, 2024 8:46am

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: 3 findings(s) 🚩

View detailed results in CodeScene

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: 3 findings(s) 🚩

View detailed results in CodeScene

Comment on lines +149 to +154
featureSearchStore: new FeatureSearchStore(
db,
eventBus,
getLogger,
config.flagResolver,
),

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

Suppress

@@ -224,6 +253,14 @@ class FeatureSearchStore implements IFeatureSearchStore {
);
});

if (featureLifecycleEnabled) {
query.leftJoin(
Copy link
Contributor

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
Copy link
Contributor

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

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: 3 findings(s) 🚩

View detailed results in CodeScene

Comment on lines +112 to +114
const featureLifecycleEnabled =
this.flagResolver.isEnabled('featureLifecycle');

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

Suppress

Comment on lines +389 to +392
getAggregatedSearchData(
rows,
featureLifecycleEnabled: boolean,
): IFeatureSearchOverview[] {

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

Suppress

Copy link
Contributor

@sjaanus sjaanus left a comment

Choose a reason for hiding this comment

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

LG!

@kwasniew kwasniew merged commit 97d702a into main May 9, 2024
10 of 11 checks passed
@kwasniew kwasniew deleted the expose-lifecycle-stage-project-overview-search branch May 9, 2024 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants