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

Fix: Update update_dependencies_yml to return a ResourceChange and not a FileChange #132

Merged

Conversation

nicholasyager
Copy link
Collaborator

Description and motivations

In issue #127, @graciegoheen found that a dependencies.yml file could be created during connection operations with duplicate projects listed. I was able to determine that this was happening due to the update_dependencies_yml file performing a bunch of file-level operations and thereby bypassing all of our handy serialization code. Instead, we can avoid this by using the Project EntityType, which allows us to instead return a ResourceChange with just the new project listing. No more will this method need to read the file's current state and attempt to update it manually. A much better approach IMHO. Along the way, I added an integration test to keep an eye on this in the future.

…ng a new project to the `dependencies.yml` file
@nicholasyager nicholasyager added the bug Something isn't working label Aug 20, 2023
@nicholasyager nicholasyager self-assigned this Aug 20, 2023
@nicholasyager nicholasyager marked this pull request as ready for review August 20, 2023 20:35
Copy link
Collaborator

@dave-connors-3 dave-connors-3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look how easy that was! we love ChangeSets!

@nicholasyager nicholasyager merged commit 2a01615 into dbt-labs:main Aug 21, 2023
@nicholasyager nicholasyager deleted the nicholasyager-fix/dupe_dependencies branch August 21, 2023 14:35
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 this pull request may close these issues.

2 participants