Skip to content

improve release workflow#124

Merged
georgi-l95 merged 2 commits intomainfrom
improve-release-workflow
Oct 14, 2025
Merged

improve release workflow#124
georgi-l95 merged 2 commits intomainfrom
improve-release-workflow

Conversation

@georgi-l95
Copy link
Contributor

@georgi-l95 georgi-l95 commented Oct 14, 2025

Description

This PR improves the release workflow.

Reviewer Checklist

  • The code follows the project's coding standards.
  • New and existing unit tests pass locally with my changes.
  • I have added necessary documentation (if applicable).
  • I have confirmed that this change does not introduce any new security vulnerabilities.

Summary by CodeRabbit

  • New Features

    • Added a readiness probe endpoint (/readyz) for health checks (returns 200 when ready, 503 when not).
    • Metrics endpoint now reads metrics from the shared application context so health/metrics reflect runtime state.
  • Chores

    • Release process now extracts binaries from Docker images instead of local builds.
    • Publishes Linux x86_64 and arm64 tarballs with checksums and updates release asset uploads to the new artifacts.

Signed-off-by: georgi-l95 <glazarov95@gmail.com>
@georgi-l95 georgi-l95 self-assigned this Oct 14, 2025
@coderabbitai
Copy link

coderabbitai bot commented Oct 14, 2025

Walkthrough

Updates release workflow to extract binaries from Docker images instead of local builds, repackaging them and uploading checksums. In the observability plugin, adds a readiness endpoint, switches handler state to AppContext, updates metrics handler signature, and wires Router state accordingly.

Changes

Cohort / File(s) Summary
Release workflow: image-based binary extraction
.github/workflows/release.yml
Replaces local build/packaging with per-arch container extraction of rock-node binaries from Docker images; creates tarballs for x86_64 and arm64; generates checksums; updates release asset upload to new artifacts; removes semver major metadata entry.
Observability plugin: readiness + AppContext state
crates/rock-node-observability-plugin/src/lib.rs
Adds /readyz readiness handler that validates ProvidesBlockReader via AppContext; changes get_metrics to accept State<AppContext> and read from ctx.metrics; router now uses with_state(context.clone()); updates tests to initialize and pass AppContext.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Client
  participant HTTP_Server as "HTTP Server"
  participant Router
  participant Plugin as "ObservabilityPlugin"
  participant AppContext

  Note over HTTP_Server,Router: Startup — Router state = AppContext

  Client->>HTTP_Server: GET /metrics
  HTTP_Server->>Router: Route request
  Router->>Plugin: get_metrics(State<AppContext>)
  Plugin->>AppContext: read metrics registry
  Plugin-->>Client: 200 OK (metrics)

  Client->>HTTP_Server: GET /readyz
  HTTP_Server->>Router: Route request
  Router->>Plugin: readiness_check(State<AppContext>)
  Plugin->>AppContext: validate ProvidesBlockReader
  alt Ready
    Plugin-->>Client: 200 OK
  else Not ready
    Plugin-->>Client: 503 Service Unavailable
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

A rabbit checks the endpoint gate,
"Readyz" it hums — I will not wait.
From Docker burrows binaries spring,
Tarballs roll out with a cheerful ping.
Metrics wink, the checksums gleam, hooray!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description includes the Description and Reviewer Checklist sections but omits the required Related Issues and Changes sections specified by the repository template, leaving out key context such as linked issue references and a summary of modifications per file. Please update the description to include a Related Issues section with any linked issue numbers and a Changes section that provides a detailed summary of modifications for each file following the repository’s template.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title “improve release workflow” accurately captures the changes to the release workflow but does not reflect the updates made to the observability plugin, making it only a partial summary of the full scope of this changeset.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch improve-release-workflow

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cdf2fd2 and 9325cac.

📒 Files selected for processing (2)
  • .github/workflows/release.yml (1 hunks)
  • crates/rock-node-observability-plugin/src/lib.rs (5 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
crates/rock-node-observability-plugin/src/lib.rs (4)
crates/rock-node-backfill-plugin/src/worker.rs (1)
  • create_test_context (759-814)
crates/rock-node-subscriber-plugin/src/session.rs (1)
  • create_test_context (551-628)
crates/rock-node-backfill-plugin/src/lib.rs (1)
  • create_test_context (166-224)
tests/integration/src/fixtures/mock_plugins.rs (1)
  • create_test_context (103-120)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build and Basic Quality Checks
  • GitHub Check: Security Audit
🔇 Additional comments (5)
crates/rock-node-observability-plugin/src/lib.rs (5)

10-10: LGTM!

The import addition is necessary for the updated handler signatures that now consume AppContext.


359-374: LGTM!

The handler correctly extracts metrics from the AppContext state. This change aligns well with the new router state configuration and maintains the same error handling.


427-431: LGTM!

The router configuration correctly:

  • Adds the new /readyz endpoint for readiness probing
  • Updates state to pass the full AppContext (via cheap Arc clones) so both handlers can access their required fields

This change maintains consistency across all endpoints.


250-260: LGTM!

Test correctly updated to reflect the new handler signature. The test validates that the handler executes successfully with the full AppContext.


381-398: Verify completeness of readiness checks.

The readiness probe currently only verifies ProvidesBlockReader, but the Capability enum also includes ProvidesVerifiedBlocks. Confirm whether ProvidesVerifiedBlocks must be registered before marking the service as ready.

Signed-off-by: georgi-l95 <glazarov95@gmail.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
.github/workflows/release.yml (2)

63-71: Avoid fixed container names; use ephemeral IDs to prevent collisions.

Using hardcoded names (rock-node-amd64/arm64) can collide on retries. Prefer capturing the container ID.

Apply this pattern:

- docker create --name rock-node-amd64 --platform linux/amd64 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.event.release.tag_name }}
- docker cp rock-node-amd64:/app/rock-node release-artifacts/rock-node-amd64
- docker rm rock-node-amd64
+ CID_AMD64=$(docker create --platform linux/amd64 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.event.release.tag_name }})
+ docker cp "${CID_AMD64}:/app/rock-node" release-artifacts/rock-node-amd64
+ docker rm "${CID_AMD64}"

- docker create --name rock-node-arm64 --platform linux/arm64 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.event.release.tag_name }}
- docker cp rock-node-arm64:/app/rock-node release-artifacts/rock-node-arm64
- docker rm rock-node-arm64
+ CID_ARM64=$(docker create --platform linux/arm64 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.event.release.tag_name }})
+ docker cp "${CID_ARM64}:/app/rock-node" release-artifacts/rock-node-arm64
+ docker rm "${CID_ARM64}"

61-62: Harden the script with strict shell options.

Fail fast on errors and unset vars to avoid partial releases.

 run: |
-          mkdir -p release-artifacts
+          set -euo pipefail
+          mkdir -p release-artifacts

Also applies to: 73-75, 86-88

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9325cac and 622bcc0.

📒 Files selected for processing (1)
  • .github/workflows/release.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Security Audit
  • GitHub Check: Build and Basic Quality Checks
🔇 Additional comments (1)
.github/workflows/release.yml (1)

73-81: Docs/archive name mismatch resolved.

Copying to rock-node before tarring fixes the previous issue where tarballs contained arch‑suffixed filenames. Matches the release notes’ ./rock-node usage now. Good change.

@georgi-l95 georgi-l95 merged commit 1d6f8ef into main Oct 14, 2025
6 of 7 checks passed
@georgi-l95 georgi-l95 deleted the improve-release-workflow branch October 14, 2025 09:22
@codecov
Copy link

codecov bot commented Oct 14, 2025

Codecov Report

❌ Patch coverage is 37.50000% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.82%. Comparing base (cdf2fd2) to head (622bcc0).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
crates/rock-node-observability-plugin/src/lib.rs 37.50% 10 Missing ⚠️

❌ Your patch status has failed because the patch coverage (37.50%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #124      +/-   ##
==========================================
- Coverage   79.90%   79.82%   -0.08%     
==========================================
  Files          56       56              
  Lines       10493    10504      +11     
==========================================
+ Hits         8384     8385       +1     
- Misses       2109     2119      +10     
Files with missing lines Coverage Δ
crates/rock-node-observability-plugin/src/lib.rs 92.22% <37.50%> (-3.21%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coderabbitai coderabbitai bot mentioned this pull request Nov 4, 2025
4 tasks
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.

1 participant