graphjin
graphjin copied to clipboard
Wrongly detect schema change when using TimeScaleDB instead of Postgres
There is no priority in this issue, think is enough to know that this happens.
What version of GraphJin are you using?
v0.17.6
Steps to reproduce the issue (config used to run GraphJin).
Instead of Postgres, use TimeScaleDB (for example with the docker image timescale/timescaledb-postgis:1.7.4-pg11)
Expected behaviour and actual result.
It keeps detecting schema change, but in reality there was no schema change.
It's probable that the dbinfo hash computed in core/internal/sdata/tables.go is peeking some internal TimeScaleDB tables so it wrongly thinks that there was an schema change.
I'll do some tests to see what the bug here could be. As in what changes with timescale db.
many thanks, no priority
FYI The same is happening with postgres which uses postgis. Another issue is that the introspection schema has 10 times more fields than in reality. I am planning on fixing it somehow soon, might submit PR.
FYI The same is happening with postgres which uses postgis. Another issue is that the introspection schema has 10 times more fields than in reality. I am planning on fixing it somehow soon, might submit PR.
Happy to help merge any PR that you might have for this, looks like valuable fix.
feel free to reopen if this issue still exists.
@dosco is timescale db suppported ?
thos is the only reference to it I could find in the project.
Its not in my official integrstion testing list but from this thread it seems its supported. @diegosz do you know what internal timescale db tables i can exclude from the discovery query to fix this?
@pbrazdil your issue with the introspection should we fixed we re-wrote the whole subsystem.
@dosco I'm getting this introspection error with the latest graphjin docker image and timescaledb:
{
"errors": [
{
"message": "Introspection result missing inputFields: { kind: \"INPUT_OBJECT\", name: \"get_git_commitget_git_commitArgsInput\", description: \"\", fields: null, inputFields: null, enumValues: null, interfaces: null, possibleTypes: null }.",
"stack": "6998/O/r</<@http://localhost:8080/static/js/main.cc6d88da.js:2:2684\n6998/O/r</<@http://localhost:8080/static/js/main.cc6d88da.js:2:2854\n6998/O/r<@http://localhost:8080/static/js/main.cc6d88da.js:2:3053\ni@http://localhost:8080/static/js/main.cc6d88da.js:2:575297\n... ..."
}
]
}
In the schema output the referenced type looks like this:
type get_git_commit @schema(name: _timescaledb_internal) {
commit_tag: Text
commit_hash: Text
commit_time: TimestampWithTimeZone
}
type get_git_commit @schema(name: _timescaledb_internal) @function(return_type: record) {
commit_tag: Text @output
commit_hash: Text @output
commit_time: TimestampWithTimeZone @output
}
On a somewhat related note functions without named arguments cause schema parsing to fail:
type gtrgm_out @function(return_type: cstring) {
: USER @input
}
Would it be possible to specify entire schemas in the blocklist configuration to ignore? I think it would help with timescale at least, since the internals are all under schemas prefixed with _timescale and the user functions are in public.