-
Notifications
You must be signed in to change notification settings - Fork 193
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
bigquery table require_partition_filter.patch #1733
base: master
Are you sure you want to change the base?
bigquery table require_partition_filter.patch #1733
Conversation
/lgtm Thanks for the contribution, @600lyy PR looks good 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.
Hi @600lyy , thank you for supporting the new field! It looks like a slightly tricky deprecation use case. I verified that the two requirePartitionFilter
field can both be configured at the same time with different values, and the POST API calls captures the values properly - is it the expected behavior? If not, additional logic might be needed to do the check.
Thanks @maqiuyujoyce for your comment. |
This is the test yaml I used (you'll want to replace
|
Those two fields with the same name are treated as conflicting fields in terraform
But KCC currently seems to allow for conflicting fields to exist in the same object so I'm not sure where to add that additional check? |
The conflicting fields are at TF-level but not KCC-level. KCC will respect the CRD instead of TF schema.
Unfortunately, no. BigQueryTable is a v1beta1 CRD that we need to ensure backwards compatibility of. Removing a field (ignoring the field will remove it from the CRD) is a breaking change that we don't allow within the same version. |
Make require_partition_filter a top level field. This will replace the same field in the time_partitioning
eece362
to
39708c9
Compare
New changes are detected. LGTM label has been removed. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @maqiuyujoyce ,
During testing, I noted that raw["require_partition_filter"] always gets a default value (false) when creating a new table even if the field is omitted in the KCC YAML. Do you know whether it is a KCC behaviour of adding zero value to fields in a list object? ( e.g. expiration_ms also got assigned a value of 0 if not specified). With this limitation, it is very hard to resolve the conflict since we don't know if the false value is set by users or by KCC. |
I believe not. I verified by printing out the config (desired state) and diff with the following YAML:
And neither of them has the commented-out, top-level Config:
Diff:
Same thing happens when I commented out
Just to double check, have you verified that the |
require_partition_filter.patch
Make require_partition_filter a top level field.
This will replace the same field in the time_partitioning.
Fixes 1654
make ready-pr
to ensure this PR is ready for review.