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

[BIOMAGE-1864] added heartbeat to tasks #224

Merged
merged 10 commits into from
Apr 21, 2022
Merged

[BIOMAGE-1864] added heartbeat to tasks #224

merged 10 commits into from
Apr 21, 2022

Conversation

kafkasl
Copy link
Contributor

@kafkasl kafkasl commented Apr 13, 2022

Description

Added parallel processing to set up a heartbeat function that sends heartbeats to the state machines during the task processing.

Details

URL to issue

https://biomage.atlassian.net/browse/BIOMAGE-1846

Link to staging deployment URL (or set N/A)

https://ui-yes-heartbeat.scp-staging.biomage.net/

Links to any PRs or resources related to this PR

hms-dbmi-cellenics/api#333

Integration test branch

master

Merge checklist

Your changes will be ready for merging after all of the steps below have been completed.

Code updates

Have best practices and ongoing refactors being observed in this PR

  • Migrated any selector / reducer used to the new format.

Manual/unit testing

  • Tested changes using InfraMock locally or no tests required for change, e.g. Kubernetes chart updates.
  • Validated that current unit tests for code work as expected and are sufficient for code coverage or no unit tests required for change, e.g. documentation update.
  • Unit tests written or no unit tests required for change, e.g. documentation update.

Integration testing

You must check the box below to run integration tests on the latest commit on your PR branch.
Integration tests have to pass before the PR can be merged. Without checking the box, your PR
will not pass the required status checks for merging.

  • Started end-to-end tests on the latest commit.

Documentation updates

  • Relevant Github READMEs updated or no GitHub README updates required.
  • Relevant Wiki pages created/updated or no Wiki updates required.

Optional

  • Staging environment is unstaged before merging.
  • Photo of a cute animal attached to this PR.

@codecov
Copy link

codecov bot commented Apr 13, 2022

Codecov Report

Merging #224 (518da40) into master (afdfd94) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #224   +/-   ##
=======================================
  Coverage   70.60%   70.60%           
=======================================
  Files          19       19           
  Lines        1446     1446           
=======================================
  Hits         1021     1021           
  Misses        425      425           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update afdfd94...518da40. Read the comment docs.

pipeline-runner/init.R Outdated Show resolved Hide resolved
#
# Sends a heartbeat to the state machine every 10 seconds
# Once the task is completed the heartbeat will fail accordingly with a
# task timeout and exit the loop and a new heartbeat will be set up by next task.
Copy link
Contributor

@aerlaut aerlaut Apr 18, 2022

Choose a reason for hiding this comment

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

The task timeout is 10800 seconds (3 hours). If the task succeeds, does this mean that this bg process will run for 3 hours before failing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no:

  1. as soon as the task is completed the heartbeat fails and the loop stops
  2. when a pipeline finishes the pod and everything running inside is just killed

pipeline-runner/init.R Outdated Show resolved Hide resolved
pipeline-runner/init.R Outdated Show resolved Hide resolved
pipeline-runner/init.R Outdated Show resolved Hide resolved
Copy link
Contributor

@aerlaut aerlaut left a comment

Choose a reason for hiding this comment

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

With minor feedback to comment

Co-authored-by: Anugerah Erlaut <[email protected]>
@kafkasl kafkasl enabled auto-merge April 21, 2022 09:39
@kafkasl kafkasl disabled auto-merge April 21, 2022 09:40
@kafkasl kafkasl merged commit 270c7c3 into master Apr 21, 2022
@kafkasl kafkasl deleted the heartbeat branch April 21, 2022 13:34
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.

3 participants