Compare commits

...

8 Commits

Author SHA1 Message Date
Zamil Majdy
1b7829f471 Merge remote-tracking branch 'origin/dev' into fix/sentry-error-cleanup 2026-03-17 06:17:04 +07:00
Zamil Majdy
8f1bf1d6f3 fix: use is_alive() instead of TimeoutError for thread.join timeout
thread.join(timeout=N) never raises TimeoutError in Python — it always
returns None. Use thread.is_alive() after join to detect timeout.
2026-03-16 16:08:46 +07:00
Zamil Majdy
ce68d97646 fix: refine ValueError suppression to cover plain ValueError paths
execute_node raises plain ValueError for disabled blocks and expired/missing
auth. Use isinstance(ex, ValueError) but exclude NotFoundError and
GraphNotFoundError which could indicate real platform issues.
2026-03-16 15:56:25 +07:00
Zamil Majdy
44aa4db405 fix: use logentry instead of message for Sentry log event filtering
Sentry's LoggingIntegration stores log messages under event["logentry"],
not event["message"]. The previous check was dead code that never matched.
2026-03-16 15:51:39 +07:00
Zamil Majdy
0b0fa35509 fix: update notification tests to match downgraded log levels
Tests were checking mock_logger.error but the log calls were changed to
logger.warning. Update assertions to check mock_logger.warning instead.
2026-03-16 15:40:46 +07:00
Zamil Majdy
77f9cf616d fix: address second round of PR review comments
- Use explicit exception types instead of broad isinstance(ValueError) in
  execute_node to avoid suppressing platform errors like NotFoundError
- Make metadata.google.internal filter GCP-aware (only filter in non-cloud envs)
- Scope log-side "connection refused" filter to AMQP-related messages only
2026-03-16 15:38:20 +07:00
Zamil Majdy
4a6fa5b9ca fix: address PR review comments on Sentry error cleanup
- Make "connection refused" filter AMQP-specific by checking exception
  module/type instead of broadly matching all ConnectionRefusedError
- Add "no credits left" as alternate insufficient balance pattern
- Broaden inactive email filter (OR instead of AND)
- Remove duplicate final-failure log in conn_retry on_retry callback
- Preserve traceback with exc_info=True in notification queue consumer
2026-03-16 15:26:23 +07:00
Zamil Majdy
2166bd8c69 fix(platform): reduce Sentry noise by filtering expected errors and downgrading log levels
- Add `before_send` hook to Sentry to filter known expected errors:
  AMQP/RabbitMQ connection errors, user credential errors (invalid API keys),
  insufficient balance, blocked IP access, Discord token errors,
  Google metadata DNS errors, inactive email recipients
- Downgrade connection retry failures from error to warning in conn_retry
- Stop sending user-caused ValueError exceptions to Sentry in block execution
- Downgrade scheduler job failures and graph validation errors to warning
- Wrap discord_system_alert to catch and warn instead of raising
- Downgrade all notification system errors to warning (batch processing,
  email sending, user lookup, preference handling)
- Downgrade cloud storage cleanup errors to warning
- Downgrade executor shutdown/disconnect errors to warning
2026-03-16 15:10:57 +07:00

Diff Content Not Available