Skip to content

feat: prerequisites check step as Step 1 in start#51

Merged
redpanda-f merged 4 commits intomainfrom
feat/readpanda/pre-binary-check
Feb 2, 2026
Merged

feat: prerequisites check step as Step 1 in start#51
redpanda-f merged 4 commits intomainfrom
feat/readpanda/pre-binary-check

Conversation

@redpanda-f
Copy link
Collaborator

Created a distinct step PrerequisitesCheckStep before start actually does anything meaningful.

Copilot AI review requested due to automatic review settings January 30, 2026 06:28
@FilOzzy FilOzzy added this to FOC Jan 30, 2026
@github-project-automation github-project-automation bot moved this to 📌 Triage in FOC Jan 30, 2026
@redpanda-f redpanda-f linked an issue Jan 30, 2026 that may be closed by this pull request
@redpanda-f redpanda-f requested a review from rvagg January 30, 2026 06:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request introduces a dedicated prerequisites check step to validate that all required binaries and Docker images are available before starting the cluster. This improves the fail-fast behavior and provides clearer error messages to users when components are missing.

Changes:

  • Adds PrerequisitesCheckStep as the first step in the parallel execution startup sequence
  • Centralizes binary and image checks using new constants REQUIRED_BINARIES and REQUIRED_DOCKER_IMAGES
  • Removes duplicate image and binary checking logic from the Lotus step

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/constants.rs Adds REQUIRED_BINARIES and REQUIRED_DOCKER_IMAGES constants to centralize the list of required components for cluster startup
src/commands/status/build_status.rs Updates to use the shared REQUIRED_BINARIES constant instead of maintaining a separate list
src/commands/start/prerequisites_check.rs New module implementing the prerequisites check step with binary and Docker image validation
src/commands/start/mod.rs Adds PrerequisitesCheckStep as Epoch 1 in the parallel execution pipeline and updates epoch documentation
src/commands/start/lotus/prerequisites.rs Removes the now-redundant check_image_and_binary() function
src/commands/start/lotus/lotus_step.rs Removes the call to the deleted check_image_and_binary() function

if !missing_binaries.is_empty() {
let missing_list = missing_binaries.join("', '");
return Err(format!(
"Missing required binaries: '{}'\n\nPlease run 'foc-devnet build ...' to build all binaries, \
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

The error message says "Please run 'foc-devnet build ...' to build all binaries" but this is incorrect syntax. Based on the rest of the message, it should either say "foc-devnet build" (without "...") to build all binaries, or provide the correct command. The ellipsis "..." is confusing as it's not a valid shell command.

Suggested change
"Missing required binaries: '{}'\n\nPlease run 'foc-devnet build ...' to build all binaries, \
"Missing required binaries: '{}'\n\nPlease run 'foc-devnet build' to build all binaries, \

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

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

@redpanda-f why was this closed? An all would be great but I don't think we have that, and ... isn't a thing as far as I can tell. Or maybe this error msg could be rephrased? I read it as "run this to build all together, or run this to build them individually".

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Issue is I don't want this to be confused with "foc-devnet build" being a command itself.

@redpanda-f redpanda-f added this to the M4.0: mainnet staged milestone Jan 30, 2026
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

@rvagg rvagg left a comment

Choose a reason for hiding this comment

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

approving but assuming that the confusing message will be fixed before merge

@github-project-automation github-project-automation bot moved this from 📌 Triage to ✔️ Approved by reviewer in FOC Jan 30, 2026
Copy link
Contributor

@BigLep BigLep left a comment

Choose a reason for hiding this comment

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

I'm wondering if:

  1. Any README_ADVANCED.md updates required?
  2. Can we also address #29 as part of this work

pub const PORTAINER_DOCKER_IMAGE: &str = "foc-portainer";

/// Required binaries for cluster startup
pub const REQUIRED_BINARIES: &[&str] = &[
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 also check for Docker as part of #29 ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not necessary. Docker sock failure is pretty evident in later part of the program anyways.

/// - Epoch 4: MockUSDFC Deploy + MultiCall3 Deploy + FOC Deploy (can be parallelized)
/// - Epoch 5: MockUSDFC Funding + Curio daemons (can be parallelized, needs FOC Deploy)
/// - Epoch 6: PDP SP Registration (needs Curio daemons started)
/// - Epoch 1: Prerequisites check (binaries & Docker images - must run first)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the README_ADVANCED.md also get updated?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is not necessary, this is an internal check/guardrail, that is optional. It is done for better UX.

Co-authored-by: Rod Vagg <rod@vagg.org>
@redpanda-f redpanda-f merged commit 6ec0933 into main Feb 2, 2026
2 checks passed
@github-project-automation github-project-automation bot moved this from ✔️ Approved by reviewer to 🎉 Done in FOC Feb 2, 2026
@redpanda-f redpanda-f deleted the feat/readpanda/pre-binary-check branch February 2, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

Check for required binaries before allowing start

3 participants