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: validate archive dependent features #5019

Merged
merged 3 commits into from
Oct 13, 2023

Conversation

kwasniew
Copy link
Contributor

@kwasniew kwasniew commented Oct 13, 2023

About the changes

Endpoint for validating if a group of features can be archived. The validation result is a list of parents that would orphan some child features. If the list is empty it means we can proceed.

It will be used in the next PR that will disable the archive button when archive operation leaves some orphan features.
Screenshot 2023-10-13 at 10 11 14

Important files

Discussion points

@vercel
Copy link

vercel bot commented Oct 13, 2023

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

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Oct 13, 2023 9:05am
unleash-monorepo-frontend ⬜️ Ignored (Inspect) Visit Preview Oct 13, 2023 9:05am

@@ -16,6 +16,11 @@ export const createKnexTransactionStarter = (
function transaction<T>(
scope: (trx: KnexTransaction) => void | Promise<T>,
) {
if (!knex) {
console.warn(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

very often we get a weird error in tests that db is not provided. This will shorten debugging time.

},
},
});
db.rawDatabase,
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 console.log in transactional code to indicate that this part is missing.

@@ -91,7 +90,7 @@ export default class DependentFeaturesController extends Controller {
permission: UPDATE_FEATURE_DEPENDENCY,
middleware: [
openApiService.validPath({
tags: ['Features'],
tags: ['Dependencies'],
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 category for dependencies

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

@kwasniew kwasniew merged commit 3eeafba into main Oct 13, 2023
8 checks passed
@kwasniew kwasniew deleted the verify-archive-dependent-features branch October 13, 2023 10:09
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