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

[CORE-668,CORE-669] - Add health monitor flags #802

Merged

Conversation

clemire
Copy link
Contributor

@clemire clemire commented Nov 23, 2023

Changelist

Add 2 flags:

  • configure # of seconds before unhealthy daemon causes a panic
  • enable panicking behavior or log error when daemon health check fails

Test Plan

  • unit tests for daemonFlags
  • tested both flags with localnet.

Author/Reviewer Checklist

  • If this PR has changes that result in a different app state given the same prior state and transaction list, manually add the state-breaking label.
  • If this PR isn't state-breaking but has changes that modify behavior in PrepareProposal or ProcessProposal, manually add the label proposal-breaking.
  • If this PR is one of many that implement a specific feature, manually label them all feature:[feature-name].
  • If you wish to for mergify-bot to automatically create a PR to backport your change to a release branch, manually add the label backport/[branch-name].
  • Manually add any of the following labels: refactor, chore, bug.

Copy link
Contributor

coderabbitai bot commented Nov 23, 2023

Important

Auto Review Skipped

Auto reviews are disabled on base/target branches other than the default branch. Please add the base/target branch pattern to the list of additional branches to be reviewed in the settings.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository.

To trigger a single review, invoke the @coderabbitai review command.


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

@@ -183,10 +183,6 @@ import (
var (
// DefaultNodeHome default home directories for the application daemon
DefaultNodeHome string

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This constant is now defined within daemon flags, not needed here.

@clemire clemire force-pushed the crystal/CORE-666-monitor-update branch from aa7e502 to db8d8d0 Compare November 23, 2023 01:39
@clemire clemire force-pushed the crystal/CORE-668-health-monitor-flags branch from 96b6c25 to 12fe89e Compare November 23, 2023 01:39
@clemire clemire changed the title [CORE-668] - Add health monitor flags [CORE-668,CORE-669] - Add health monitor flags Nov 23, 2023
@clemire clemire force-pushed the crystal/CORE-666-monitor-update branch from 5fe6028 to bc6fe09 Compare November 28, 2023 00:52
@clemire clemire force-pushed the crystal/CORE-668-health-monitor-flags branch from 12fe89e to a1cc295 Compare November 28, 2023 00:59
protocol/daemons/flags/flags.go Show resolved Hide resolved
protocol/daemons/flags/flags.go Outdated Show resolved Hide resolved
@clemire clemire force-pushed the crystal/CORE-668-health-monitor-flags branch 4 times, most recently from 96af5ff to f0fc022 Compare November 29, 2023 00:53
protocol/daemons/flags/flags.go Outdated Show resolved Hide resolved
protocol/daemons/flags/flags.go Outdated Show resolved Hide resolved
@clemire clemire force-pushed the crystal/CORE-668-health-monitor-flags branch 2 times, most recently from 059b00d to 3281291 Compare November 29, 2023 21:01
protocol/daemons/flags/flags.go Outdated Show resolved Hide resolved
protocol/app/app.go Outdated Show resolved Hide resolved
protocol/daemons/server/types/health_checker.go Outdated Show resolved Hide resolved
// checker is lazily created using the provided function if needed. This method is synchronized. It returns an error if
// the service was already registered.
func (ms *healthMonitorMutableState) RegisterHealthChecker(
checkable types.HealthCheckable,
lazyHealthCheckerCreator func() *healthChecker,
) error {
stopService := false
Copy link
Contributor

Choose a reason for hiding this comment

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

hmm, is this change intended to be part of this PR? thought this PR was strictly adding the flags.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, looks like I mixed up some changes I meant to add to the other health monitoring PR.

@clemire clemire force-pushed the crystal/CORE-668-health-monitor-flags branch 2 times, most recently from d4a3839 to 27b4c4e Compare November 29, 2023 23:49
@clemire clemire changed the base branch from crystal/CORE-666-monitor-update to main November 29, 2023 23:58
@clemire clemire changed the base branch from main to crystal/CORE-666-monitor-update November 29, 2023 23:59
@clemire clemire force-pushed the crystal/CORE-666-monitor-update branch from a71a5b4 to 7b8f83f Compare November 30, 2023 00:01
@clemire clemire force-pushed the crystal/CORE-668-health-monitor-flags branch from 1538cc4 to 6bedc57 Compare November 30, 2023 00:02
@clemire clemire force-pushed the crystal/CORE-666-monitor-update branch from cd77cee to f996947 Compare December 7, 2023 18:30
@clemire clemire force-pushed the crystal/CORE-668-health-monitor-flags branch from 6bedc57 to 21bd7cd Compare December 7, 2023 18:46
Crystal Lemire added 7 commits December 7, 2023 13:29
…PC query.

Update error for a more specific test.

PR comments.

Revert liquidations health reporting to occur only at task loop boundary.

Checkpoint.

checkpoint - implementation, moved methods to app. need to migrate / add testing.

Update test app.

Checkpoint for tests.

Finish test cases.

App unit test + cleanup.

Cleanup, rename.

cleanup.

Move monitoring call to before client start.

Update placement of monitor code for pricefeed client.

Revert ServiceName changes.

Checkpoint.

Revert bridge failure.

Rename flag.

Disable panics for localnet due to bridge daemon flakiness.

Rename again after rebase.

Rename flag.

Fix unaddressed merge lines.
@clemire clemire force-pushed the crystal/CORE-668-health-monitor-flags branch from ed839cf to 3e20131 Compare December 7, 2023 21:29
@clemire clemire merged commit 4336388 into crystal/CORE-666-monitor-update Dec 7, 2023
16 of 17 checks passed
@clemire clemire deleted the crystal/CORE-668-health-monitor-flags branch December 7, 2023 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants