Skip to content

Conversation

@tuler
Copy link
Member

@tuler tuler commented Mar 14, 2025

While working on the startup feedback, I ended up redoing a lot of the work that was done at PRs #177 and #153
So this PR includes some of those changes, but also the new startup feedback.
Please check my individual commits on this PR, and compare them to the ones at #177

The startup feedback works by creating a listr2 of tasks where each task is a polling of docker compose ps <service> for the healthy status of a service. For each service there is a service name, but also a healthySemaphore which is the name of the service that indicates healthy status.

For example, the graphql is a service, but we need to wait for the proxy service to be healthy to report access to graphql, as it is proxied through it.

I only implemented healthy status checks, which means that every service that is part of the startup feedback will now require a health check configuration. We are still missing health check config for the following services:

  • health check for espresso
  • health check for explorer
  • health check for bundler
  • health check for paymaster

@tuler tuler requested a review from endersonmaia March 14, 2025 04:22
@changeset-bot
Copy link

changeset-bot bot commented Mar 14, 2025

🦋 Changeset detected

Latest commit: e778033

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cartesi/cli Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Mar 14, 2025

Coverage Report for ./apps/cli

Status Category Percentage Covered / Total
🔵 Lines 27.77% 293 / 1055
🔵 Statements 27.85% 298 / 1070
🔵 Functions 27.56% 51 / 185
🔵 Branches 26.19% 121 / 462
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
apps/cli/src/base.ts 0% 0% 0% 0% 24-140
apps/cli/src/commands/rollups/start.ts 0% 0% 0% 0% 11-286
apps/cli/src/commands/rollups/status.ts 0% 0% 0% 0% 8-49
Generated in workflow #363 for commit e778033 by the Vitest Coverage Report Action

@tuler
Copy link
Member Author

tuler commented Mar 14, 2025

Total startup time in my machine with --services graphql is taking from 5 to 6 seconds.

Copy link
Contributor

@endersonmaia endersonmaia left a comment

Choose a reason for hiding this comment

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

Missing healthchecks for services you described and defined the dependency.

@tuler tuler force-pushed the feature/cli-run-v2 branch 2 times, most recently from b295744 to 48ddef2 Compare March 14, 2025 20:31
Copy link
Contributor

@endersonmaia endersonmaia left a comment

Choose a reason for hiding this comment

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

I suggest normalizing healthcheck parameters between services (interval, start_time, etc.)

@tuler
Copy link
Member Author

tuler commented Mar 14, 2025

I suggest normalizing healthcheck parameters between services (interval, start_time, etc.)

Done.
Is timeout 1a good enough for pg_isready?

@tuler tuler force-pushed the feature/prompt branch 2 times, most recently from 8559406 to 294dd4e Compare March 15, 2025 02:47
@tuler tuler force-pushed the feature/cli-run-v2 branch from 4439190 to caf7a2f Compare March 15, 2025 16:02
@tuler tuler force-pushed the feature/cli-run-v2 branch from caf7a2f to c2a395d Compare March 15, 2025 16:05
@endersonmaia endersonmaia mentioned this pull request Mar 17, 2025
4 tasks
Copy link
Contributor

@endersonmaia endersonmaia left a comment

Choose a reason for hiding this comment

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

--verbose is not working, but I'll consider this PR approved, and we can tackle this --verbose behavior on another PR

@tuler tuler force-pushed the feature/cli-run-v2 branch from b999336 to 24ad87e Compare March 17, 2025 14:09
Base automatically changed from feature/cli-run-v2 to prerelease/v2-alpha March 17, 2025 14:23
@tuler tuler requested a review from endersonmaia March 17, 2025 14:29
@tuler tuler merged commit d8798d4 into prerelease/v2-alpha Mar 17, 2025
2 checks passed
@tuler tuler deleted the feature/prompt branch March 17, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants