⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

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

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
Comment on lines +47 to +48
"Missing required binaries: '{}'\n\nPlease run 'foc-devnet build ...' to build all binaries, \
or build specific binaries with 'foc-devnet build <name>' (e.g., 'foc-devnet build lotus' or 'foc-devnet build curio')",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"Missing required binaries: '{}'\n\nPlease run 'foc-devnet build ...' to build all binaries, \
or build specific binaries with 'foc-devnet build <name>' (e.g., 'foc-devnet build lotus' or 'foc-devnet build curio')",
"Missing required binaries: '{}'\n\nPlease build them with 'foc-devnet build <name>' \
(e.g., 'foc-devnet build lotus' or 'foc-devnet build curio')",

let's make it clearer then, I still want there to be a build all, and the lack of something like that makes this message confusing otherwise.

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 ?

/// - 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✔️ Approved by reviewer

Development

Successfully merging this pull request may close these issues.

Check for required binaries before allowing start

4 participants