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

InvocationContext Extensibility #128

Open
peterallenwebb opened this issue May 8, 2024 · 0 comments
Open

InvocationContext Extensibility #128

peterallenwebb opened this issue May 8, 2024 · 0 comments

Comments

@peterallenwebb
Copy link
Contributor

peterallenwebb commented May 8, 2024

Short description

A couple of months ago, we added InvocationContext, a cross-thread context manager supporting isolation between dbt invocations. Now we want to support extensions and modifications of its runtime behavior without requiring changes in dbt-common. This will mean designing and implementing a general mechanism for registering and using context objects. Uses cases include:

  • Environment variable cache (originally added for performance reasons)
  • Flags object
  • Relation cache
  • invocation_id
  • EventManager
  • Adapter manager
  • Record/Replay manager
  • Most other objects currently implemented as global variables in dbt

The key will be to provide a way to register and manage the lifetimes of these objects with the InvocationContext, while allowing them to be defined and implemented in the libraries that depend on dbt-common.

Acceptance criteria

TBD

Suggested Tests

TBD

Impact to Other Teams

None

Will backports be required?

No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant