You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Configuration values (redact info where appropriate):
clustering: null
Describe the problem
The tableRequiresUpdate function appears to be bugged in a couple different ways depending on your config. This results in the update check always returning true and the table config being repeatedly updated unnecessarily.
Issue 1
If clustering config is null then the table will always require updates due to this faulty check:
const configCluster = JSON.stringify(config.clustering); // Evaluates to 'null'
const tableCluster = JSON.stringify(metadata.clustering?.fields || []); // Evaluates to '[]'
if (configCluster !== tableCluster) return true; // Always true
Issue 2
Within initializeRawChangeLogTable the pathParamsColExists is allowed to be undefined
const pathParamsColExists = fields.find(
(column) => column.name === "path_params"
); // Evaluates to undefined if not present, rather than boolean
This is then passed into tableRequiresUpdate, and will always fail the strict equality check:
if (!!config.wildcardIds !== pathParamsColExists) return true; // Evaluates to boolean !== undefined -> always true
Steps to reproduce:
What happened? How can we make the problem occur?
Supply either clustering:nullor don't have path_params column.
Expected result
The table shouldn't need updating.
Actual result
The table always updates on every run.
The text was updated successfully, but these errors were encountered:
Describe your configuration
Describe the problem
The
tableRequiresUpdate
function appears to be bugged in a couple different ways depending on your config. This results in the update check always returning true and the table config being repeatedly updated unnecessarily.Issue 1
If
clustering
config isnull
then the table will always require updates due to this faulty check:Issue 2
Within
initializeRawChangeLogTable
thepathParamsColExists
is allowed to beundefined
This is then passed into
tableRequiresUpdate
, and will always fail the strict equality check:Steps to reproduce:
What happened? How can we make the problem occur?
Supply either
clustering:null
or don't havepath_params
column.Expected result
The table shouldn't need updating.
Actual result
The table always updates on every run.
The text was updated successfully, but these errors were encountered: