-
Notifications
You must be signed in to change notification settings - Fork 54
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
vdk-core: add new managed db_connection_execute_operation hook #805
Conversation
d3d2233
to
2efd82d
Compare
projects/vdk-core/src/vdk/internal/builtin_plugins/connection/managed_cursor.py
Outdated
Show resolved
Hide resolved
projects/vdk-core/src/vdk/internal/builtin_plugins/connection/managed_cursor.py
Outdated
Show resolved
Hide resolved
projects/vdk-core/src/vdk/internal/builtin_plugins/connection/managed_cursor.py
Outdated
Show resolved
Hide resolved
projects/vdk-plugins/vdk-test-utils/src/vdk/plugin/test_utils/util_funcs.py
Outdated
Show resolved
Hide resolved
projects/vdk-core/tests/vdk/internal/builtin_plugins/connection/test_connection_router.py
Outdated
Show resolved
Hide resolved
ea4bd00
to
82cced3
Compare
82cced3
to
44bb447
Compare
projects/vdk-core/tests/vdk/internal/builtin_plugins/connection/test_connection_router.py
Outdated
Show resolved
Hide resolved
projects/vdk-core/src/vdk/internal/builtin_plugins/connection/connection_hooks.py
Show resolved
Hide resolved
projects/vdk-core/src/vdk/internal/builtin_plugins/connection/execution_cursor.py
Show resolved
Hide resolved
projects/vdk-core/src/vdk/internal/builtin_plugins/connection/managed_cursor.py
Outdated
Show resolved
Hide resolved
projects/vdk-core/src/vdk/internal/builtin_plugins/connection/managed_connection_base.py
Show resolved
Hide resolved
52a765e
to
ecc56b4
Compare
79dd795
to
2101a41
Compare
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.
Could be simpler for API usage, yet local context with yielding is possible this way,
we agreed to merge
I don't think we have an idea for simpler API usage than this? The other possible API could be to have two hooks
But in that case, a simple use case of tracking the duration of query becomes very hard to implement
while now with this hook it is:
|
e0a7bb4
to
e9c8de0
Compare
Currently we cannot track the full execution of a query (before and after it) . This is necessary in order to be able to generate proper lineage events (query start and end) or to track its duration (we had to currently had to add this to vdk-core (#804) but that's really better implemented as plugin (think aspect-oriented programming). In the future we should consider adding hook for fetch (fetchMany, fetchAll) as well as it's there where the data is returned (plugins can take stats - count number of rows, validate sensitive columns, do result validation tests, etc.) Testing Done: unit tests, functional test. Signed-off-by: Antoni Ivanov <aivanov@vmware.com>
e9c8de0
to
c161f33
Compare
Currently we cannot track the full execution of a query (before and
after it) . This is necessary in order to be able to generate proper
lineage events (query start and end) or to track its duration (we had to
currently had to add this to vdk-core
(#804) but that's
really better implemented as plugin (think aspect-oriented programming).
In the future we should consider adding hook for fetch (fetchMany,
fetchAll) as well as it's there where the data is returned (plugins can
take stats - count number of rows, validate sensitive columns, do result
validation tests, etc.)
Testing Done: unit tests, functional test.
Signed-off-by: Antoni Ivanov aivanov@vmware.com