-
Notifications
You must be signed in to change notification settings - Fork 3
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
[bug/spec fix] fix the error on NOT #65
Conversation
Codecov Report
@@ Coverage Diff @@
## main #65 +/- ##
==========================================
+ Coverage 97.34% 97.37% +0.02%
==========================================
Files 34 34
Lines 2186 2209 +23
==========================================
+ Hits 2128 2151 +23
Misses 58 58
Continue to review full report at Codecov.
|
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.
Actually, can you help me better understand how this fixes the issue?
Looks like the build somehow passed in rails 6.1 and HEAD
https://github.com/chanzuckerberg/redis-memo/runs/2169583715
Should we expect that?
re Donald's question, I think I know what is going on:
this is expected
I think this will not influence our features as we don't cache the chained NOT in either case, but might affect us in writing the specs. I have a couple of solutions in mind:
do you guys have any thoughts about supporting different rails versions? |
Ah makes sense. Thanks for looking into this. To me, I have a slight preference over the 3rd approach since they are still valid rails usage in the earlier versions. We can check |
98868a7
to
6613a41
Compare
spec/memoize_query_spec.rb
Outdated
let!(:relation3_with_only_not) { Site.where.not(a: 2).where.not(b: 1) } | ||
let!(:relation_with_not_and_other) { Site.where.not(a: 2).where(b: 1) } | ||
# where.not(a: ..., b:...) relation is treated differently in Rails 6.0, Rails 6.1 and before Rails 6 |
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.
This comment is slightly confusing. The ones after L471 seem to be clearer to me.
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.
changed a bit, let me know if that is clear enough
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.
🎉
Summary
This will fix the build error introduced in #62. The build has passed.