Repository navigation
fix: rename checkpoint interval field - #409
Conversation
|
Warning Review limit reached
More reviews will be available in 49 minutes and 30 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (20)
📝 WalkthroughWalkthroughAdds structured monitor commands and Alertmanager/webhook adapter support, renames checkpoint_interval to checkpointer_interval across code/config/docs, enhances downloads and local extraction (zip), introduces TLS-aware Redis probes, adds a replica-readiness upgrade step, and overhauls E2E/dev scripts and workflow for orchestrated stress and monitor updates. ChangesStructured monitor control + checkpointer rename + E2E updates
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant GH as GitHub Actions
participant DevCtl as devctl.sh
participant Control as Control Node
participant Eloq as eloqctl
Dev->>GH: workflow_dispatch (stress params)
GH->>DevCtl: run stress steps (monitor-update, eloqctl-mutate,...)
DevCtl->>Control: SSH install/render/topology
DevCtl->>Eloq: monitor update --component grafana --url ...
Eloq->>Control: build & execute monitor tasks
Control-->>DevCtl: statuses/logs
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
|
There was a problem hiding this comment.
Pull request overview
This PR updates the cluster manager and E2E tooling around configuration and monitoring, including a rename of the EloqKV checkpoint interval field while preserving backward-compatible parsing, plus broader monitor/upgrade/E2E enhancements.
Changes:
- Rename
checkpoint_intervaltocheckpointer_interval(with serde aliasing for old configs) and update templates/examples accordingly. - Expand monitor support (Grafana config templating, Alertmanager + webhook adapter wiring) and evolve
eloqctl monitorinto structured subcommands/components. - Improve operational workflows: E2E dev control script + workflow updates, resumable downloads, additional extraction formats, and rolling-upgrade replica readiness gating.
Reviewed changes
Copilot reviewed 70 out of 72 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/README.md | Rewrites E2E usage documentation and introduces devctl.sh-based workflows. |
| tests/install_control_eloqctl.sh | Ensures control-node eloqctl runtime directories exist before install. |
| tests/e2e/topology.yaml | Switches to checkpointer_interval and adds monitor configuration to the E2E topology template. |
| tests/e2e/devctl.sh | Adds a new dev control script to orchestrate E2E env lifecycle, install, render, launch, status, export, and stress steps. |
| tests/e2e/cmd_stress_ts/main.ts | Refactors TS stress client creation and ensures clients are properly disconnected. |
| tests/e2e/cmd_stress_test.sh | Adds monitor-update validation step, improves control-node execution, adds configurable timeouts, and updates container naming. |
| tests/e2e/cmd_stress_go/main.go | Minor formatting cleanup. |
| tests/docker_ha/Dockerfile | Adds curl to support health checks inside node containers. |
| tests/docker_ha/docker-compose.yaml | Renames services (tx/standby/voter/control) and updates exposed ports for monitor services; simplifies stress container set. |
| tests/docker_env.sh | Adds image reuse/build logic, control-node runtime reset, SSH-based control commands, and new render substitutions. |
| src/rest_api/src/handler.rs | Updates REST API command construction for the new typed monitor subcommands. |
| src/cluster_mgr/src/state/topology_tx_operation.rs | Adds serde rename/alias support for checkpointer_interval while keeping internal field name. |
| src/cluster_mgr/src/state/state_mgr.rs | Improves test isolation via unique temp HOME + mutex to avoid cross-test state collisions. |
| src/cluster_mgr/src/config/monitor.rs | Adds Alertmanager + webhook adapter config generation, Grafana v9/v13 templating, and alert rule templating enhancements (plus unit tests). |
| src/cluster_mgr/src/config/mod.rs | Adds new monitor templates/files and deployment package variants. |
| src/cluster_mgr/src/config/deployment.rs | Adds serde alias for checkpoint interval rename and wires monitor packages into host/port/topology population. |
| src/cluster_mgr/src/config/config_base.rs | Adds new monitor file keys and includes monitor packages in host mapping. |
| src/cluster_mgr/src/cli/task/wait_replica_ready_task.rs | New task to wait for a specific master/replica pair to become connected in cluster topology. |
| src/cluster_mgr/src/cli/task/upload/monitor_upload_builder.rs | Stages monitor config directories locally (dashboards/templates) and supports additional monitor components. |
| src/cluster_mgr/src/cli/task/upload/mod.rs | Exposes monitor_upload_builder publicly. |
| src/cluster_mgr/src/cli/task/upload/eloq_upload_builder.rs | Extends upload routing for new monitor artifacts. |
| src/cluster_mgr/src/cli/task/unpack_file_task.rs | Recognizes additional unpacked names for new monitor artifacts. |
| src/cluster_mgr/src/cli/task/topology_update_task.rs | Accepts both interval field names and writes checkpointer_interval back out. |
| src/cluster_mgr/src/cli/task/task_utils.rs | Ensures “no pid found” is treated as success in one code path; adjusts Redis topology retries for stop paths. |
| src/cluster_mgr/src/cli/task/task_controller.rs | Improves user-facing operation labeling and error summarization. |
| src/cluster_mgr/src/cli/task/task_base.rs | Adds duplicate task-id warning and enriches error report formatting by parsing task-id strings. |
| src/cluster_mgr/src/cli/task/rolling_upgrade/steps.rs | Adds a wait step to ensure restarted tx nodes rejoin as replicas before failing back. |
| src/cluster_mgr/src/cli/task/rolling_upgrade/mod.rs | Adds friendly name for the new wait step. |
| src/cluster_mgr/src/cli/task/redis_op_task.rs | Adds connected state to topology nodes and makes retry count configurable. |
| src/cluster_mgr/src/cli/task/monitor_ctl_task.rs | Adds Alertmanager + webhook adapter process control and improves start/stop robustness and diagnostics. |
| src/cluster_mgr/src/cli/task/mod.rs | Exports the new wait_replica_ready_task module. |
| src/cluster_mgr/src/cli/task/local_extract_task.rs | Adds zip/raw-binary extraction paths, progress bars, and post-extract permission fixes with tests. |
| src/cluster_mgr/src/cli/task/group/remove_group.rs | Uses rm -rf instead of rm -r for cleanup robustness. |
| src/cluster_mgr/src/cli/task/group/monitor_ctl_group.rs | Refactors monitor control flow for typed monitor subcommands and component selection; re-uploads config on start/restart. |
| src/cluster_mgr/src/cli/task/group/launch_group.rs | Updates launch to start monitor via typed MonitorCommand. |
| src/cluster_mgr/src/cli/task/group/db_cluster_ctrl_group.rs | Updates monitor stop/status command wiring; adjusts stop behavior and status wait handling. |
| src/cluster_mgr/src/cli/task/group/check_group.rs | Adds check tasks for Alertmanager and webhook adapter ports. |
| src/cluster_mgr/src/cli/task/group/backup_group.rs | Improves backup cleanup message. |
| src/cluster_mgr/src/cli/task/eloq_tx_ctl_task.rs | Adds TLS-aware Redis probing and improves failure handling/reporting for status. |
| src/cluster_mgr/src/cli/task/download_task.rs | Adds resumable downloads with retries and range support; improves cache logic. |
| src/cluster_mgr/src/cli/task/config_fields.rs | Renames exposed config field key to checkpointer_interval. |
| src/cluster_mgr/src/cli/task/check_task.rs | Adds port-in-use validation for new monitor services. |
| src/cluster_mgr/src/cli/reconcile.rs | Recognizes new monitor status task prefixes. |
| src/cluster_mgr/src/cli/mod.rs | Introduces typed `eloqctl monitor <start |
| src/cluster_mgr/config/runtime_deps_ubuntu | Adds musl to runtime dependencies. |
| src/cluster_mgr/config/mono_alertmanager.yaml | Adds Alertmanager config template. |
| src/cluster_mgr/config/grafana_config_v13.ini | Adds Grafana v13 config template. |
| src/cluster_mgr/config/feishu.zh.tmpl | Adds Feishu Chinese notification template for webhook adapter. |
| src/cluster_mgr/config/examples/eloqkv_rocksdb.yaml | Updates example to emit checkpointer_interval. |
| src/cluster_mgr/config/examples/eloqkv_rocksdb_standby.yaml | Updates example to emit checkpointer_interval (and formatting touchups). |
| src/cluster_mgr/config/examples/eloqkv_rocksdb_standby_with_voter.yaml | Updates example to emit checkpointer_interval (and formatting touchups). |
| src/cluster_mgr/config/examples/eloqkv_rocksdb_standby_with_voter_with_log.yaml | Updates example to emit checkpointer_interval (and formatting touchups). |
| src/cluster_mgr/config/examples/eloqkv_rocksdb_standby_with_log.yaml | Updates example to emit checkpointer_interval (and formatting touchups). |
| src/cluster_mgr/config/examples/eloqkv_rocksdb_multiple_ng.yaml | Updates example to emit checkpointer_interval. |
| src/cluster_mgr/config/examples/eloqkv_rocks_s3.yaml | Updates example to emit checkpointer_interval. |
| src/cluster_mgr/config/examples/eloqkv_rocks_s3_standby_withvoter_with_log.yaml | Updates example to emit checkpointer_interval (and formatting touchups). |
| src/cluster_mgr/config/examples/eloqkv_rocks_minio.yaml | Updates example to emit checkpointer_interval. |
| src/cluster_mgr/config/examples/eloqkv_rocks_gcp.yaml | Updates example to emit checkpointer_interval. |
| src/cluster_mgr/config/examples/eloqkv_rocks_eloqdss_rocksdb.yaml | Updates example to emit checkpointer_interval. |
| src/cluster_mgr/config/examples/eloqkv_memory_with_standby.yaml | Updates example to emit checkpointer_interval. |
| src/cluster_mgr/config/examples/eloqkv_memory_multi_ng.yaml | Updates example to emit checkpointer_interval. |
| src/cluster_mgr/config/EloqKv.ini | Updates ini template key to checkpointer_interval. |
| src/cluster_mgr/config/alert.rules | Adjusts ops alert rule to cluster-wide and injects ${CLUSTER_NAME}. |
| src/cluster_mgr/Cargo.toml | Adds zip dependency and switches redis feature set to native-tls. |
| README.md | Updates installer URLs and documents automatic local state upgrade after install. |
| install.sh | Runs eloqctl upgrade automatically when an existing state install is detected. |
| doc/upgrade.md | Updates upgrade instructions to the new repo URL and eloqctl monitor update flow. |
| doc/cluster_mgr.md | Updates command table to reflect new monitor command structure. |
| Cargo.lock | Updates dependency graph for new crates/features and bumps crate versions. |
| .github/workflows/test.yml | Updates E2E defaults, uses devctl.sh, and adds new E2E steps including monitor-update. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| let receiver_name = if self | ||
| .alertmanager | ||
| .as_ref() | ||
| .and_then(|alertmanager| alertmanager.feishu_robot_urls.as_ref()) | ||
| .is_some_and(|urls| !urls.is_empty()) | ||
| { | ||
| "alertmanager_webhook_adapter" | ||
| } else { | ||
| "null" | ||
| }; |
| pub(crate) fn user_friendly_task_summary(task_id: &TaskId) -> String { | ||
| let action = task_action_summary(&task_id.cmd, &task_id.task); | ||
| if task_id.host.is_empty() || task_id.host == "local" || task_id.host == "127.0.0.1" { | ||
| action | ||
| } else { | ||
| format!("{action} on {}", task_id.host) | ||
| } |
| 先构建本地 `eloqctl`: | ||
|
|
||
| ```sh | ||
| cd /home/starrysky/workspace/eloqdata-kernel/eloq_waiter |
| #[serde_with::skip_serializing_none] | ||
| #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)] | ||
| pub struct Alertmanager { | ||
| pub download_url: String, | ||
| pub port: u16, | ||
| pub host: String, | ||
| #[serde(default)] | ||
| pub feishu_robot_urls: Option<Vec<String>>, | ||
| #[serde(default = "default_alertmanager_webhook_adapter_download_url")] | ||
| pub webhook_adapter_download_url: String, | ||
| #[serde(default = "default_alertmanager_webhook_adapter_port")] | ||
| pub webhook_adapter_port: u16, | ||
| } | ||
|
|
| if !(status.is_success() || status == StatusCode::PARTIAL_CONTENT) { | ||
| error!("Download falied http status_code = {:?}", status.as_str()); | ||
| return Err(anyhow!(DownloadErr(self.url.clone(), status.to_string()))); | ||
| } |
2d0d78f to
f9dfc2e
Compare
Summary
checkpoint_intervaltocheckpointer_intervalcheckpoint_intervalcheckpointer_intervalVerification
Summary by CodeRabbit
New Features
Improvements
Documentation
Chores
checkpoint_intervaltocheckpointer_intervalacross examples.