-
-
Notifications
You must be signed in to change notification settings - Fork 725
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: prevent adding dependency to archived or removed parent #4987
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
@@ -0,0 +1,3 @@ | |||
export interface IFeaturesReadModel { |
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.
introduced new read model in feature-toggle submodule so that we don't have to depend on feature-toggle-service with all write model operations.
.andWhere('archived_at', null) | ||
.select('name'); | ||
|
||
return rows.length > 0; |
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 find it more readable than inline select exists
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.
LGTM. Perhaps we warn you AND throw an error on the change request? Or we could not let you apply the change request before you deal with the conflicts.
About the changes
Prevents adding a dependency to a parent that was removed or archived or doesn't exist.
Important files
Discussion points
I'm not sure if we should fail those cases or just ignore. In the context of a change request we may end up in a situation where parent was deleted as the CR review was pending. So maybe it's better to show warning in CR and proceed without taking any action in the dependency service itself.