Skip to content

op-conductor: add JSON-based rollup-boost healthcheck with -next suffix#18453

Merged
teddyknox merged 1 commit intodevelopfrom
teddyknox/add-kona-healthcheck-to-conductor
Dec 5, 2025
Merged

op-conductor: add JSON-based rollup-boost healthcheck with -next suffix#18453
teddyknox merged 1 commit intodevelopfrom
teddyknox/add-kona-healthcheck-to-conductor

Conversation

@teddyknox
Copy link
Copy Markdown
Contributor

@teddyknox teddyknox commented Dec 1, 2025

Adds a new JSON-based rollup-boost healthcheck alongside the existing HTTP status code-based implementation.

Standard healthcheck (--rollup-boost.enabled):

  • Interprets HTTP status codes (200=healthy, 206=partial, 503=unhealthy)
  • URL derived from execution.rpc with /healthz appended automatically

Next healthcheck (--rollup-boost.next-enabled):

  • Parses JSON response body for health status
  • Requires explicit full URL via --rollup-boost.next-healthcheck-url

The two modes are mutually exclusive. Both use the same --rollup-boost.healthcheck-timeout setting.

CLI/ENV Changes

Existing (unchanged) New
--rollup-boost.enabled --rollup-boost.next-enabled
--rollup-boost.healthcheck-timeout (shared) --rollup-boost.next-healthcheck-url
OP_CONDUCTOR_ROLLUP_BOOST_ENABLED OP_CONDUCTOR_ROLLUP_BOOST_NEXT_ENABLED
OP_CONDUCTOR_ROLLUP_BOOST_HEALTHCHECK_TIMEOUT (shared) OP_CONDUCTOR_ROLLUP_BOOST_NEXT_HEALTHCHECK_URL

Breaking Changes

None. Existing users of --rollup-boost.enabled are unaffected.

@teddyknox teddyknox requested review from a team, 0x00101010, jelias2 and theochap December 1, 2025 18:49
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.21%. Comparing base (c2ffd4f) to head (a82c82e).
⚠️ Report is 20 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #18453      +/-   ##
===========================================
+ Coverage    75.31%   80.21%   +4.90%     
===========================================
  Files          187      132      -55     
  Lines        11199     7168    -4031     
===========================================
- Hits          8434     5750    -2684     
+ Misses        2621     1418    -1203     
+ Partials       144        0     -144     
Flag Coverage Δ
cannon-go-tests-64 ?
contracts-bedrock-tests 80.21% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 55 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jelias2
Copy link
Copy Markdown
Contributor

jelias2 commented Dec 2, 2025

So this is only for health checking a kona rollup-boost, not for healthchecking kona as pure CL?

If its pure CL it should fit into the existing heathchecks, since kona and op-node should have 1:1 API specs.

Can the kona /healthz be modified to exclude the version?

We could also modify conductor to not append /healthz automatically to the rollup-boost endpoint. I think that would help in this case and reduce alot of duplicated code, that way we could configure conductor to point anywhere. Ex. /healthz/kona-boost

I would rather lean the endpoint modifiable, and modify kona to to respond with rollup-boost health somewhere else than implement a whole new client

@teddyknox
Copy link
Copy Markdown
Contributor Author

Closing in favor of op-rs/kona#3130

@teddyknox teddyknox closed this Dec 3, 2025
@teddyknox
Copy link
Copy Markdown
Contributor Author

Reopening in combination with op-rs/kona#3131

@teddyknox teddyknox reopened this Dec 3, 2025
@teddyknox teddyknox force-pushed the teddyknox/add-kona-healthcheck-to-conductor branch from a82c82e to 9c2643c Compare December 3, 2025 21:47
@teddyknox teddyknox changed the title Add kona-healthcheck support to conductor op-conductor: add JSON-based rollup-boost healthcheck, rename existing to legacy Dec 3, 2025
@teddyknox teddyknox force-pushed the teddyknox/add-kona-healthcheck-to-conductor branch 2 times, most recently from b2e2f10 to a22e8a5 Compare December 3, 2025 22:17
Comment thread op-conductor/client/rollupboost.go Outdated
@teddyknox teddyknox force-pushed the teddyknox/add-kona-healthcheck-to-conductor branch 2 times, most recently from e3ca48d to 3d5cd48 Compare December 4, 2025 21:16
@teddyknox teddyknox changed the title op-conductor: add JSON-based rollup-boost healthcheck, rename existing to legacy op-conductor: add JSON-based rollup-boost healthcheck with -next suffix Dec 4, 2025
Comment thread op-conductor/client/rollupboost.go
@teddyknox teddyknox force-pushed the teddyknox/add-kona-healthcheck-to-conductor branch from 3d5cd48 to 04a6966 Compare December 4, 2025 21:50
Comment thread op-conductor/flags/flags.go Outdated
Comment thread op-conductor/client/rollupboost_legacy.go Outdated
Comment thread op-conductor/client/rollupboost_legacy.go Outdated
Copy link
Copy Markdown
Contributor

@jelias2 jelias2 left a comment

Choose a reason for hiding this comment

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


func (c *RollupBoostClient) Healthcheck(ctx context.Context) (HealthStatus, error) {
    req, err := http.NewRequestWithContext(ctx, http.MethodGet, c.url, nil)
    if err != nil {
        return "", fmt.Errorf("failed to create request: %w", err)
    }

    resp, err := c.httpClient.Do(req)
    if err != nil {
        return "", fmt.Errorf("failed to make request: %w", err)
    }
    defer resp.Body.Close()

    // Toggle behavior here
    if c.useJSON {
        return c.parseJSONResponse(resp)
    } else {
        return c.parseStatusCodeResponse(resp)
    }
}
```

I'm curious can this PR just be boiled down to something like above?

@teddyknox teddyknox force-pushed the teddyknox/add-kona-healthcheck-to-conductor branch 2 times, most recently from 4ad33eb to 48400ea Compare December 5, 2025 17:04
@teddyknox
Copy link
Copy Markdown
Contributor Author

I'm curious can this PR just be boiled down to something like above?

I can see how that's DRYer but I think it's outweighed by sticking the idiom of keeping clients and protocols 1:1. Happy to discuss however.

@teddyknox teddyknox force-pushed the teddyknox/add-kona-healthcheck-to-conductor branch from 48400ea to 2ddf42b Compare December 5, 2025 17:57
@teddyknox teddyknox force-pushed the teddyknox/add-kona-healthcheck-to-conductor branch from 2ddf42b to 499e77e Compare December 5, 2025 18:09
@teddyknox teddyknox enabled auto-merge December 5, 2025 18:09
…g to legacy

Introduce a new rollup-boost healthcheck that parses JSON responses from
the /healthz endpoint. The existing HTTP status code-based healthcheck
is renamed to "legacy" and remains available for backward compatibility.

The two healthcheck modes are mutually exclusive.
@teddyknox teddyknox force-pushed the teddyknox/add-kona-healthcheck-to-conductor branch from 499e77e to 85c3428 Compare December 5, 2025 18:42
@teddyknox teddyknox added this pull request to the merge queue Dec 5, 2025
Merged via the queue into develop with commit 1c11d07 Dec 5, 2025
82 checks passed
@teddyknox teddyknox deleted the teddyknox/add-kona-healthcheck-to-conductor branch December 5, 2025 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants