-
Notifications
You must be signed in to change notification settings - Fork 1.8k
skip failing tests default to false #3890
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
Conversation
|
@andygrove please check this PR. I have commented out 1 test as it fails, will create another PR to fix the test |
# Conflicts: # datafusion/core/src/config.rs
alamb
left a comment
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.
Thank you @AssHero
My only concern about this approach is that now we are not testing the same thing that users are.
What would we feel about changing the default value of OPT_OPTIMIZER_SKIP_FAILED_RULES to always be true and downstream projects could turn it to true if they wanted.
What do you think @avantgardnerio ?
datafusion/core/src/config.rs
Outdated
| false, | ||
| ), | ||
| #[cfg(test)] | ||
| ConfigDefinition::new_bool( |
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.
| ConfigDefinition::new_bool( | |
| // skip_failing_rules default to true in tests so that regressions are caught much sooner | |
| ConfigDefinition::new_bool( |
datafusion/core/src/config.rs
Outdated
| "When set to true, the logical plan optimizer will produce warning \ | ||
| messages if any optimization rules produce errors and then proceed to the next \ | ||
| rule. When set to false, any rules that produce errors will cause the query to fail.", |
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.
| "When set to true, the logical plan optimizer will produce warning \ | |
| messages if any optimization rules produce errors and then proceed to the next \ | |
| rule. When set to false, any rules that produce errors will cause the query to fail.", | |
| "OVERRIDDEN FOR TEST", |
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.
I think this could be very confusing to people (that tests and defaults are different) so I suggest some more comments to make it clearer
| Ok(()) | ||
| } | ||
|
|
||
| #[ignore] |
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.
We should have a ticket to track this failure. How does it fail with the change in default?
did not mean to approve -- I think we should default to true always
datafusion/core/src/config.rs
Outdated
| to reduce the number of rows decoded.", | ||
| false, | ||
| ), | ||
| #[cfg(test)] |
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.
I think this #[cfg(test)] will effectively only apply to tests in the datafusion/core crate -- this option will be false for other tests (like sql_integration for example)
|
Thanks @alamb for the feedback. |
I think that would be problematic given the current maturity of the optimization rules. It would result in many queries failing rather than just skipping some optimizations. |
🤦 I apologize to both of you |
andygrove
left a comment
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.
I think tests should be explicit about the configs they are testing. I don't think we should have different default values for configs between test and production code.
|
I'm wondering what is the point of test that works with enabled |
Sorry @andygrove, I lost a bit. So you also support disabling failing rules check, ignore tests, and create a new PR to fix them? |
|
Currently, if any rule fails with an I would like to have regression tests to that we don't introduce any new bugs that cause rules to fail. One approach would be to set Long term I would like the setting to default to false, but we need to fix the bugs first. |
|
@andygrove got your point thanks. Please check renewed PR So idea is by default tests run with enabled |
1 similar comment
|
@andygrove got your point thanks. Please check renewed PR So idea is by default tests run with enabled |
|
@andygrove please check until the code rots |
|
Marking as a draft as it is waiting on review from @andygrove |
Hi @comphead. Apologies for the delay in reviewing. I'm not sure that we want to introduce feature flags for this. I was thinking that we could explicitly set |
Thanks @andygrove for feedback. Please correct me if I'm wrong.
If thats correct, I will rework the PR |
|
Now that #4208 is implemented, I suggest that we:
|
Thanks for letting me know, checking this. |
Which issue does this PR close?
Closes #3695.
Rationale for this change
skip_failing_rules defaultto true in tests so that regressions are caught much soonerWhat changes are included in this PR?
Are there any user-facing changes?