extensions icon indicating copy to clipboard operation
extensions copied to clipboard

fix(firestore-bigquery-export): Remove broken partition table check

Open adamkeys opened this issue 3 years ago • 5 comments

This commit removes a misplaced guard found in the isTablePartitioned method of the Partitioning class. The removed conditional was erroneously checking the truthfulness of a result of a method which returns a promise, thereby always evaluating to being true. Additionally, the removed logging operation is unrelated to the purpose of the method. This errant code likely ended up here as a result of a failed merge. This addresses an issue where firestore-bigquery-export needlessly fills the logs with errors about not being able to partition an existing table even when partitioning is disabled.

The log message called upon by the removed guard is also removed as it is no longer used. It may want to be reintroduced as part of the partitioning table creation phase in a future update, but that is outside of the scope of this update.

Additional discussion found in #1368

adamkeys avatar Feb 13 '23 15:02 adamkeys

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Feb 13 '23 15:02 google-cla[bot]

Hi there @adamkeys , thanks for your contribution! Could you sign the CLA, so I can run some CI checks?

cabljac avatar Feb 14 '23 10:02 cabljac

All set @cabljac

adamkeys avatar Feb 15 '23 04:02 adamkeys

Hi @adamkeys

Are we certain this not needed. Table is optional in the partition constructor.

Is this guard not necessary to ensure that we do not attempt to partition an existing table?

dackers86 avatar Oct 16 '23 12:10 dackers86

I think (if it is necessary and stays) it also requires an await in the check, as discussed in the linked issue

cabljac avatar Nov 14 '23 14:11 cabljac