-
Notifications
You must be signed in to change notification settings - Fork 766
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(query): privilege type forward compat #14501
Conversation
a9052d1
to
2f736d1
Compare
@everpcpc Please help to review the .github yaml and test-foreward-compat part in this pr. |
2f736d1
to
c328bbf
Compare
5348d13
to
1d8861a
Compare
cc @lichuang @drmingdrmer Are there any other concerns about considering using bits_from? Through these tests added so far, I think it's safe to guarantee that the current pr will not cause a break. Please review it. cc @BohuTANG Maybe can add a ci-cloud tag, and try to fix your warehouse? |
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.
Reviewed all commit messages.
Reviewable status: 0 of 11 files reviewed, 1 unresolved discussion (waiting on @lichuang, @TCeason, and @Xuanwo)
tests/fuse-forward-compat/util.sh
line 1 at r1 (raw file):
#!/bin/bash
Do not copy, reuse util.sh
. It's a burden maintaining two copies of the same function set.
@TCeason |
I got you. I'm modifing it. But now this can prove that this pr not generate new break change? |
1d8861a
to
6581016
Compare
Done |
1. add ci test forward compat test(now only test rbac) 2. UserPrivilegeType and ShareGrantObjectPrivilege deserialize use from_bits_truncate
6581016
to
8f1a593
Compare
@TCeason |
369a0b8
to
6df2a48
Compare
bcd9bbd
to
7c1a7f3
Compare
7c1a7f3
to
4754a3d
Compare
Docker Image for PR
|
Test on Cloud Prod, user auth has no issue. |
* fix(query): privilege type forward compat 1. add ci test forward compat test(now only test rbac) 2. UserPrivilegeType and ShareGrantObjectPrivilege deserialize use from_bits_truncate * run_test contain forward and backward
* fix(query): privilege type forward compat 1. add ci test forward compat test(now only test rbac) 2. UserPrivilegeType and ShareGrantObjectPrivilege deserialize use from_bits_truncate * run_test contain forward and backward
* fix(query): privilege type forward compat 1. add ci test forward compat test(now only test rbac) 2. UserPrivilegeType and ShareGrantObjectPrivilege deserialize use from_bits_truncate * run_test contain forward and backward
fix(query): privilege type forward compat (databendlabs#14501)
fix(query): privilege type forward compat (databendlabs#14501)
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
Befero we use from_bits, in this pr, use from_bits_truncate
from_bits will cause breaking change. When add new bit, old query can not deserialize the new bit. And then return err.
https://docs.rs/enumflags2/0.7.7/enumflags2/struct.BitFlags.html#method.from_bits
https://docs.rs/enumflags2/0.7.7/enumflags2/struct.BitFlags.html#method.from_bits_truncate
I think we should ignore the new bit. So now call from_bits_truncate to deserialize bitflags.
Tests
Type of change
This change is