forked from ZcashFoundation/zebra
-
Notifications
You must be signed in to change notification settings - Fork 1
Add health check endpoint code (jsonrpsee based version) #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
c0df99c
zebra-rpc: add GET /health endpoint and gethealthinfo RPC method
dmidem b399098
Add ci-basic.yml script to run tests on QED-it fork (do not include i…
dmidem cc9aa72
ci: allow clippy mismatched-lifetime-syntaxes lint in workflow
dmidem 58357f7
Fix comment
seniakalma File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| name: Basic checks | ||
|
|
||
| #on: [push, pull_request] | ||
| on: [push] | ||
|
|
||
| jobs: | ||
| test: | ||
| name: Test on ${{ matrix.os }} | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-24.04] | ||
|
|
||
| env: | ||
| # Use system-installed RocksDB library instead of building from scratch | ||
| ROCKSDB_LIB_DIR: /usr/lib | ||
| # Use system-installed Snappy library for compression in RocksDB | ||
| SNAPPY_LIB_DIR: /usr/lib/x86_64-linux-gnu | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Install dependencies on Ubuntu | ||
| #run: sudo apt-get update && sudo apt-get install -y protobuf-compiler build-essential librocksdb-dev | ||
| run: sudo apt-get update && sudo apt-get install -y protobuf-compiler librocksdb-dev | ||
| - name: Install formatting & linting tools | ||
| run: rustup component add rustfmt clippy | ||
| - name: Run tests | ||
| env: | ||
| RUST_BACKTRACE: 1 | ||
| # Skip two tests that intermittently fail on CI (likely a race/ordering issue). | ||
| # FIXME: investigate and fix the underlying flake; remove these skips once resolved. | ||
| run: cargo test --locked --verbose -- --skip v4_with_sapling_spends --skip v5_with_sapling_spends | ||
| # Run the skipped tests separately with constrained parallelism | ||
| - name: Run Sapling spend tests | ||
| run: | | ||
| cargo test -p zebra-consensus v4_with_sapling_spends -- --nocapture | ||
| cargo test -p zebra-consensus v5_with_sapling_spends -- --nocapture | ||
| - name: Verify working directory is clean | ||
| run: git diff --exit-code | ||
| - name: Run doc check | ||
| run: cargo doc --all-features --document-private-items | ||
| - name: Run format check | ||
| run: cargo fmt -- --check | ||
| - name: Run clippy | ||
| run: cargo clippy --workspace --all-features --all-targets -- -D warnings -A mismatched-lifetime-syntaxes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
zebra-rpc/src/methods/tests/snapshots/get_health_info_status@mainnet_10.snap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| source: zebra-rpc/src/methods/tests/snapshot.rs | ||
| assertion_line: 808 | ||
| expression: status_only | ||
| --- | ||
| { | ||
| "status": "healthy" | ||
| } |
8 changes: 8 additions & 0 deletions
8
zebra-rpc/src/methods/tests/snapshots/get_health_info_status@testnet_10.snap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| source: zebra-rpc/src/methods/tests/snapshot.rs | ||
| assertion_line: 808 | ||
| expression: status_only | ||
| --- | ||
| { | ||
| "status": "healthy" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.