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

[CT-2652] Remove "Replaceable" class usage as much as possible #7802

Closed
Tracked by #9099
gshank opened this issue Jun 6, 2023 · 4 comments · Fixed by #9589
Closed
Tracked by #9099

[CT-2652] Remove "Replaceable" class usage as much as possible #7802

gshank opened this issue Jun 6, 2023 · 4 comments · Fixed by #9589
Assignees
Labels
tech_debt Behind-the-scenes changes, with little direct impact on end-user functionality

Comments

@gshank
Copy link
Contributor

gshank commented Jun 6, 2023

We pull in a Replaceable class which contains a "replace" method in a lot of our classes. This method is designed to replace the current object with a newly constructed one based on kwargs, and is in general not a very good idea. If we want to replace a current object it would be better to be a lot more explicit and intentional about what's happening.

Remove the usage Replaceable class where it's found in dbt-core, look for breakage, and determine if we really need to do this or could just update the current object.

@gshank gshank added the tech_debt Behind-the-scenes changes, with little direct impact on end-user functionality label Jun 6, 2023
@github-actions github-actions bot changed the title Remove "Replaceable" class as much as possible [CT-2652] Remove "Replaceable" class as much as possible Jun 6, 2023
@gshank gshank mentioned this issue Jun 6, 2023
6 tasks
@emmyoop
Copy link
Member

emmyoop commented Jun 12, 2023

Need to check that this isn't used in adapters as well. Might be easier/better to move it to the dbtMixin class.

@MichelleArk
Copy link
Contributor

MichelleArk commented Jan 29, 2024

Added this issue to the 'Stabilize External Interfaces' Epic under Artifacts since it plays nicely with our efforts to make the base artifact dataclasses 'plain old data objects'

@MichelleArk MichelleArk changed the title [CT-2652] Remove "Replaceable" class as much as possible [CT-2652] Remove "Replaceable" class usage as much as possible Feb 13, 2024
@MichelleArk
Copy link
Contributor

Updated this issue to be scoped to the usage of Replaceable in dbt-core, since it is now defined in dbt-common. Its full deletion can be done as a separate issue in dbt-common, once dbt-adapters has gone through the same exercise.

@MichelleArk
Copy link
Contributor

MichelleArk commented Feb 13, 2024

An initial pass was taken here: #7844 but will likely need to start from scratch given the artifact + dbt-common refactors since it was initially spiked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech_debt Behind-the-scenes changes, with little direct impact on end-user functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants