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: correct cache key #54

Merged
merged 1 commit into from
Feb 6, 2024
Merged

Conversation

calleo
Copy link
Contributor

@calleo calleo commented Jan 24, 2024

This package uses a cache to check if a tag exists or if it needs to be created. Once a tag is created it is added to the cache. This did not work properly, since the different keys were used at cache lookup (tag name) and add to cache (fully qualified tag name).

I noticed this in a DBT project where multiple models, in the same schema, are creating table tags independently of each other. If the first model creates the tag, the next model would also try to create it leading to this error:

09:23:58 Tag already exists: GOLD.DBT_CV_DEV_VALIDATIONS.DBT_VALIDATION_KEY

This package uses a cache to check if a tag exists or if it needs
to be created. Once a tag is created it is added to the cache. This
did not work properly, since the different keys were used at cache
lookup (tag name) and add to cache (fully qualified tag name).
@JFrackson JFrackson self-requested a review February 6, 2024 18:38
Copy link
Contributor

@JFrackson JFrackson left a comment

Choose a reason for hiding this comment

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

good catch! Thanks for the fix

@JFrackson JFrackson merged commit 76e76fe into Montreal-Analytics:master Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants