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

add isInfo to audits #370

Closed
wants to merge 1 commit into from

Conversation

kaligrafy
Copy link
Contributor

No description provided.

@kaligrafy kaligrafy requested a review from tahini February 5, 2024 14:28
Copy link
Contributor

@tahini tahini left a comment

Choose a reason for hiding this comment

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

info/warning looks like a log's level concept. We should rather have a level field, with an enum or number to identify an audit level. The number allows to have a hierarchy of the levels. Otherwise, we can have an audit that can be both info and warning and that is not conceptually right.


export async function up(knex: Knex): Promise<unknown> {
return knex.schema.alterTable(tableName, (table: Knex.TableBuilder) => {
table.boolean('is_info');
Copy link
Contributor

Choose a reason for hiding this comment

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

Can an audit be both info and warning? Usually, concepts like that will use a level field: error, warning, info (critical, debug, trace, but we don't need those for audits I suppose)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Merging warning and error into a level would mean long refactoring. Let's keep as is for now, and add an issue for later?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So we replace is_warning and is_info with level and we put default to error?

@kaligrafy kaligrafy closed this Feb 5, 2024
@kaligrafy
Copy link
Contributor Author

Replaced by #372

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants