Skip to content

Conversation

@Blazer-007
Copy link
Member

@Blazer-007 Blazer-007 commented Jul 3, 2025

Dear Gobblin maintainers,

Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!

JIRA

Description

  • Here are some details about my PR, including screenshots (if applicable):
    Temporal heartbeat is sent periodically using ScheduledExecutorService but in case any exception is thrown while sending heartbeat from temporal it will kill the heartbeat runnable task and even though activity might be still running it will be killed after sometime when server doesn't receive any heartbeat from activity, to avoid this we can wrap the runnable to print exception instead so that next heartbeat events can be sent properly
    • Added safeRunnable in ExecutorsUtils
    • Refactored Activity codes to use safeRunnable

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:
    testSafeRunnableRunsSuccessfully,testSafeRunnableHandlesException

Commits

  • My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

@Blazer-007 Blazer-007 changed the title Wrap temporal heartbeat runnable [GOBBLIN-2210] Wrap temporal heartbeat runnable Jul 3, 2025
@Blazer-007 Blazer-007 force-pushed the virai_wrap_heartbeat_runnable branch from b013117 to 523a382 Compare July 28, 2025 03:12
} catch (Exception exception) {
// Catch all exceptions to prevent the thread from dying
// and log the exception
log.error("Caught exception in runnable {}", exception.getMessage());
Copy link
Contributor

Choose a reason for hiding this comment

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

should we log stacktrace?

Copy link
Member Author

Choose a reason for hiding this comment

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

Logging stacktrace will bloat the log messages, only motivation to wrap the thread is to avoid killing of thread.
Added a log line in debug mode

@codecov-commenter
Copy link

codecov-commenter commented Jul 28, 2025

Codecov Report

❌ Patch coverage is 72.72727% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 42.82%. Comparing base (adef734) to head (f914aa5).
⚠️ Report is 34 commits behind head on master.

Files with missing lines Patch % Lines
...temporal/ddm/activity/impl/CommitActivityImpl.java 0.00% 1 Missing ⚠️
...poral/ddm/activity/impl/GenerateWorkUnitsImpl.java 0.00% 1 Missing ⚠️
...emporal/ddm/activity/impl/ProcessWorkUnitImpl.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #4119      +/-   ##
============================================
- Coverage     45.38%   42.82%   -2.56%     
+ Complexity     3192     2482     -710     
============================================
  Files           696      513     -183     
  Lines         26628    21748    -4880     
  Branches       2655     2478     -177     
============================================
- Hits          12085     9314    -2771     
+ Misses        13542    11479    -2063     
+ Partials       1001      955      -46     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

4 participants