-
Notifications
You must be signed in to change notification settings - Fork 10
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
fix(modelql)!: disable implicit queries to avoid accidental performan… #1234
Conversation
…ce issues You should fix the unintended implicit queries or use .query explicitly. You can also set the environment variable MODELQL_IMPLICIT_QUERIES_ENABLED=true to re-enable this feature.
57e46ee
to
6ba247c
Compare
…ce issues You should fix the unintended implicit queries or use .query explicitly. You can also set the environment variable MODELQL_IMPLICIT_QUERIES_ENABLED=true to re-enable this feature.
6ba247c
to
b6cd91a
Compare
JVM coverage report
|
|
||
package org.modelix.modelql.client | ||
|
||
actual val implicitQueriesEnabled: Boolean = System.getenv("MODELQL_IMPLICIT_QUERIES_ENABLED")?.toBooleanStrictOrNull() ?: false |
Check warning
Code scanning / detekt
The property implicitQueriesEnabled is missing documentation. Warning
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.
Wouldn't it be a better idea to make the choice if implicit queries are allowed or not a constructor or builder argument of the client? That way, application can decide on a suitable configuration mechanism for them to apply.
Otherwise, the new option would need to be explained in the docs.
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.
The code and idea look good.
But the PR has two commits with the same message.
This would also allow clients to be configured differently in one application. |
I was thinking about removing this feature completely, but didn't want to make switching to a new version unnecessarily difficult. A poor performance is still better than exceptions. Still not sure wether we should support this feature or deprecate it. |
Pull request was closed
No description provided.