-
-
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: revived feature goes to initial lifecycle stage #6944
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Ignored Deployments
|
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: 1 findings(s) 🚩
|
||
eventStore.emit(FEATURE_REVIVED, { featureName }); | ||
await reachedStage('initial'); | ||
const initialLifecycle = | ||
await featureLifecycleService.getFeatureLifecycle(featureName); | ||
expect(initialLifecycle).toEqual([ | ||
{ stage: 'initial', enteredStageAt: expect.any(Date) }, | ||
]); |
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: Large Method
'can insert and read lifecycle stages' has 71 lines, threshold = 70
@@ -155,4 +161,9 @@ export class FeatureLifecycleService extends EventEmitter { | |||
]); | |||
this.emit(STAGE_ENTERED, { stage: 'archived' }); | |||
} | |||
|
|||
private async featureRevived(feature: string) { | |||
await this.featureLifecycleStore.delete(feature); |
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.
delete all previous stages
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, but I was thinking about it. If we want to measure how long we were in each stage, this makes it not countable, the first stage. Unless we take it from feature created date.
But if we use created date, then after revive, the created date could have been 2 years ago.
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 an opinion here. One option would be to delete all events expect from the initial event. So when you revive you only erase later stages.
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.
Since I don't know which is better I'll merge it now with an easy option to change it later
|
||
private async featureRevived(feature: string) { | ||
await this.featureLifecycleStore.delete(feature); | ||
await this.featureInitialized(feature); |
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.
re-initialize with a new date
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, but some thoughts added.
About the changes
Revived feature goes back to the initial stage. This is a new initial stage with a date matching the revive time.
Important files
Discussion points