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: kept and discarded read model #7045

Merged
merged 2 commits into from
May 13, 2024
Merged

Conversation

kwasniew
Copy link
Contributor

@kwasniew kwasniew commented May 13, 2024

About the changes

  • Adding status information to stages
  • Modifying single feature read model and search query
  • Modelled field as optional but when the field is present it's not null
  • Making lifecycle UI display when lifecycle is present (previously we had as short window where lifecycle had no value after new feature creation)
Screenshot 2024-05-13 at 12 44 46 Screenshot 2024-05-13 at 12 44 52

Important files

Discussion points

Copy link

vercel bot commented May 13, 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 13, 2024 10:55am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview May 13, 2024 10:55am

@@ -43,7 +43,10 @@ export const populateCurrentStage = (
case 'completed':
return {
name: 'completed',
status: 'kept',
status:
feature.lifecycle.status === 'discarded'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

special case for discarded, other states use green icon

@@ -10,8 +10,8 @@ import type { StageName } from '../../types';
type DBType = {
stage: StageName;
created_at: string;
status?: string;
status_value?: string;
status: string | null;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

in DB the column is nullable

@@ -62,6 +66,11 @@ const getFeatureLifecycle = async (featureName: string, expectedCode = 200) => {
.get(`/api/admin/projects/default/features/${featureName}/lifecycle`)
.expect(expectedCode);
};

const getCurrentStage = async (featureName: string) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

added new method to test the read model directly inside this module

@kwasniew kwasniew merged commit dfc0655 into main May 13, 2024
11 checks passed
@kwasniew kwasniew deleted the kept-discarded-status-read-model branch May 13, 2024 12:24
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