-
Notifications
You must be signed in to change notification settings - Fork 59
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
ADAP-761: Add retry logic to flaky MV tests to avoid "cannot open relation with OID" error #569
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…elation with OID" error
colin-rogers-dbt
approved these changes
Aug 9, 2023
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.
nit on function name but otherwise LGTM
@cla-bot check |
The cla-bot has been summoned, and re-checked this pull request! |
abbywh
pushed a commit
to abbywh/dbt-redshift
that referenced
this pull request
Oct 11, 2023
…ation with OID" error (dbt-labs#569) * add retry logic to materialized view tests to avoid "could not open relation with OID" error * changie * update utility method name to be scope specific
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Materialized view tests are sporadically failing due to a "cannot open relation with OID" error. This error can occur when there are multiple objects being created and dropped in parallel, as happens with these integration tests. The appears to be caused by the fact that queries on the metadata tables are not locked like other queries, hence a record may exist on those tables that corresponds to an object that is in the process of being dropped.
Solution
Add retry logic that will retry the
run_dbt_and_capture
command up to ten times, until it returns successfully. If it does not return successfully, then it will returnNone
.This fix will need to be backported to
1.6.latest
as it's affecting CI on bothmain
and1.6.latest
.Checklist