Skip to content
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] TIPG_DB_EXCLUDE_TABLES only accepts list of length 1 #130

Closed
jonaraphael opened this issue Oct 17, 2023 · 2 comments · Fixed by #131
Closed

[BUG] TIPG_DB_EXCLUDE_TABLES only accepts list of length 1 #130

jonaraphael opened this issue Oct 17, 2023 · 2 comments · Fixed by #131
Assignees
Labels
bug Something isn't working

Comments

@jonaraphael
Copy link

I have a deployed TiPG instance in GCP Cloud Run, utilizing many environmental variables to control the deployment, like:
"TIPG_TABLE_CONFIG__public_mytable__GEOMCOL" = mygeomcol

The DB Setting TIPG_DB_EXCLUDE_TABLES is described in the documentation as accepting a list of strings, however, it silently fails when provided with a list of length 2.

TIPG_DB_EXCLUDE_TABLES = ["public.mytable1"] <<< This works, and reduces the exposed collections to exclude mytable1
TIPG_DB_EXCLUDE_TABLES = ["public.mytable2"] <<< This works, and reduces the exposed collections to exclude mytable2
TIPG_DB_EXCLUDE_TABLES = ["public.mytable1", "public.mytable2"] <<< This fails, and the exposed collections are NOT reduced.

My version is pinned to tipg~=0.3.0

@vincentsarago vincentsarago added the bug Something isn't working label Oct 17, 2023
@vincentsarago
Copy link
Member

Thanks for the report @jonaraphael I can confirm this and add a failing test

something is not working here

AND (exclude_tables IS NULL OR concat(c.relnamespace::regnamespace::text,'.',c.relname::text) != ANY (exclude_tables))

@vincentsarago
Copy link
Member

@jonaraphael I've started a PR #131 to fix this but adding more tests showed that we also have a bug for the functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants