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

rex.mart: submit mart build exceptions to sentry #46

Open
wants to merge 1 commit into
base: baseline/master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/rex.mart/src/rex/mart/ctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from htsql.ctl import HTSQL_CTL
from htsql.ctl.error import ScriptError
from rex.db.ctl import RexShellRoutine
from rex.core import Error, get_packages
from rex.core import Error, get_packages, get_sentry
from rex.ctl import RexTask, argument, option, log
from rex.ctl.common import pair

Expand Down Expand Up @@ -127,6 +127,8 @@ def __call__(self):
)
)

get_sentry().captureException(sync=True)
Copy link
Member

Choose a reason for hiding this comment

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

I'd move this below to the else: branch (to be created) of the if entry.halt_on_failure:. Otherwise, I think, the exception will be reported twice if entry.halt_on_failure is True.

Copy link
Author

Choose a reason for hiding this comment

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

I agree that's how it looks like it would work, but we tried using halt_on_failure at one point and we still didn't see mart errors reported in Sentry...

https://github.com/prometheusresearch/lfa-system/commit/67adc5a723b39b099b9c384deae967e969d79864#diff-76a52879af8738f7286ad8218203ffd074244ac6a198c1b8db18609e75f9f807


# Do what we can to force a cleanup of broken HTSQL
# instances that may be stuck in tracebacks, etc.
gc.collect()
Expand Down