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: prevent adding dependency to archived or removed parent #4987

Merged
merged 2 commits into from
Oct 11, 2023

Conversation

kwasniew
Copy link
Contributor

@kwasniew kwasniew commented Oct 10, 2023

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.

@vercel
Copy link

vercel bot commented Oct 10, 2023

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 Oct 10, 2023 1:03pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Oct 10, 2023 1:03pm

@@ -0,0 +1,3 @@
export interface IFeaturesReadModel {
Copy link
Contributor Author

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

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

Copy link
Contributor

@FredrikOseberg FredrikOseberg left a 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.

@kwasniew kwasniew merged commit 30e9fb8 into main Oct 11, 2023
14 checks passed
@kwasniew kwasniew deleted the prevent-archived-removed-parent branch October 11, 2023 14:21
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