-
-
Notifications
You must be signed in to change notification settings - Fork 744
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Ignored Deployments
|
@@ -16,6 +16,11 @@ export const createKnexTransactionStarter = ( | |||
function transaction<T>( | |||
scope: (trx: KnexTransaction) => void | Promise<T>, | |||
) { | |||
if (!knex) { | |||
console.warn( |
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.
very often we get a weird error in tests that db is not provided. This will shorten debugging time.
}, | ||
}, | ||
}); | ||
db.rawDatabase, |
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.
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'], |
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.
added new category for dependencies
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
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.

Important files
Discussion points