Skip to content

feat: support health-check endpoints on hathor-core and tx-mining-service#579

Merged
luislhl merged 5 commits intodevfrom
feat/health-check-support
Nov 9, 2023
Merged

feat: support health-check endpoints on hathor-core and tx-mining-service#579
luislhl merged 5 commits intodevfrom
feat/health-check-support

Conversation

@luislhl
Copy link
Contributor

@luislhl luislhl commented Oct 9, 2023

Acceptance Criteria

  • Include methods to get health information on tx-mining-service and hathor-core

Note: The health endpoint in hathor-core is still being developed in HathorNetwork/hathor-core#807. When it's released and available on most fullnodes, we will create a new PR to use it in the wallet-lib.

Security Checklist

  • Make sure you do not include new dependencies in the project unless strictly necessary and do not include dev-dependencies as production ones. More dependencies increase the possibility of one of them being hijacked and affecting us.

@luislhl luislhl self-assigned this Oct 9, 2023
@codecov
Copy link

codecov bot commented Oct 9, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c2fb301) 64.82% compared to head (ea5e749) 78.51%.

Additional details and impacted files
@@             Coverage Diff             @@
##              dev     #579       +/-   ##
===========================================
+ Coverage   64.82%   78.51%   +13.69%     
===========================================
  Files          67       68        +1     
  Lines        5257     5270       +13     
  Branches     1108     1108               
===========================================
+ Hits         3408     4138      +730     
+ Misses       1769     1117      -652     
+ Partials       80       15       -65     
Files Coverage Δ
src/api/health.js 100.00% <100.00%> (ø)
src/api/txApi.js 45.16% <ø> (+41.93%) ⬆️
src/api/txMining.js 100.00% <100.00%> (+66.66%) ⬆️
src/api/version.js 100.00% <100.00%> (+75.00%) ⬆️

... and 21 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

*/
async getHealth() {
return new Promise((resolve, reject) => {
// TODO: We should chage this to get `health` instead of `version`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

This was merged a week ago. Has it been released already?

@luislhl luislhl changed the title feat: support health-check endpoints on hathor-core and tx-mining-ser… feat: support health-check endpoints on hathor-core and tx-mining-service Oct 11, 2023
@luislhl luislhl marked this pull request as ready for review October 19, 2023 15:27
@luislhl luislhl requested a review from tuliomir October 20, 2023 14:18
Copy link
Contributor

@tuliomir tuliomir left a comment

Choose a reason for hiding this comment

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

The code looks good to me, but it will be necessary to implement unit tests on those new methods for the CI to pass.

@luislhl luislhl force-pushed the feat/health-check-support branch from ddd34cf to eaf26e5 Compare October 25, 2023 20:57
Copy link
Contributor

@tuliomir tuliomir left a comment

Choose a reason for hiding this comment

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

🌟 Great organization for the unit tests.
Also, the async wrapper for getVersion will be quite useful for improving the wallet clients too.

*/
async getHealth() {
return new Promise((resolve, reject) => {
// TODO: We should chage this to get `health` instead of `version`
Copy link
Member

Choose a reason for hiding this comment

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

This was merged a week ago. Has it been released already?

@luislhl luislhl force-pushed the feat/health-check-support branch from ea88727 to ea5e749 Compare November 9, 2023 14:06
@luislhl luislhl merged commit d0ae325 into dev Nov 9, 2023
@luislhl luislhl deleted the feat/health-check-support branch November 9, 2023 14:36
@alexruzenhack alexruzenhack mentioned this pull request Nov 9, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants