fix: Reduce Sentry noise from dbt workspace not setup errors#1401
Draft
sentry[bot] wants to merge 1 commit into
Draft
fix: Reduce Sentry noise from dbt workspace not setup errors#1401sentry[bot] wants to merge 1 commit into
sentry[bot] wants to merge 1 commit into
Conversation
Author
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1401 +/- ##
==========================================
- Coverage 59.59% 59.59% -0.01%
==========================================
Files 138 138
Lines 16561 16565 +4
==========================================
+ Hits 9870 9872 +2
- Misses 6691 6693 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or 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
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.
This PR addresses the issue where
HttpError: dbt workspace not setupwas being logged as an error in Sentry, causing unnecessary noise. This error occurs when an organization does not have a dbt workspace configured, which is an expected condition, not an actual error.Changes made:
if not org.dbt: return "Not available"guard to bothget_dbt_version()andget_edr_version()functions inddpui/ddpdbt/elementary_service.py. This preventsDbtProjectManager.gather_dbt_project_params()from being called with aNoneorg.dbtand thus avoids theHttpErrorentirely for unconfigured dbt workspaces.logger.errortologger.infoin the exception handling blocks of bothget_dbt_version()andget_edr_version(). This ensures that any other unexpected exceptions in these functions are logged at a less critical level, further reducing Sentry noise for non-critical issues.Fixes DALGO-BACKEND-2HJ