Skip to content
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

feat: add entry point to request node to get monitoring information #191

Merged
merged 24 commits into from
Apr 8, 2020

Conversation

vrolland
Copy link
Contributor

@vrolland vrolland commented Apr 6, 2020

Description of the changes

Add entry point "/status" to get information from the node.

@vrolland vrolland changed the title feature: add entry point to request node to get monitoring information feat: add entry point to request node to get monitoring information Apr 6, 2020
@vrolland vrolland changed the title feat: add entry point to request node to get monitoring information WIP: feat: add entry point to request node to get monitoring information Apr 6, 2020
@coveralls
Copy link

coveralls commented Apr 6, 2020

Coverage Status

Coverage increased (+0.8%) to 90.422% when pulling b4fa864 on monitoring-features into 2927625 on master.

@vrolland vrolland changed the title WIP: feat: add entry point to request node to get monitoring information feat: add entry point to request node to get monitoring information Apr 6, 2020
@vrolland vrolland requested review from lumtis, rittme, benjlevesque, AdamREQ and yomarion and removed request for lumtis and rittme April 6, 2020 15:05
Copy link
Contributor

@rittme rittme left a comment

Choose a reason for hiding this comment

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

I overall feel like information should be renamed to something else, because it can mean anything.

packages/data-access/src/data-access.ts Outdated Show resolved Hide resolved
packages/data-access/src/data-access.ts Outdated Show resolved Hide resolved
packages/data-access/src/ignored-location.ts Outdated Show resolved Hide resolved
packages/data-access/src/ignored-location.ts Show resolved Hide resolved
packages/ethereum-storage/src/dataIds-ignored.ts Outdated Show resolved Hide resolved
packages/ethereum-storage/src/ethereum-metadata-cache.ts Outdated Show resolved Hide resolved
packages/ethereum-storage/src/ethereum-metadata-cache.ts Outdated Show resolved Hide resolved
packages/request-client.js/src/http-data-access.ts Outdated Show resolved Hide resolved
packages/request-node/src/requestNode.ts Outdated Show resolved Hide resolved
@vrolland vrolland requested a review from rittme April 7, 2020 15:25
packages/request-node/src/requestNode.ts Outdated Show resolved Hide resolved
packages/data-access/src/data-access.ts Outdated Show resolved Hide resolved
import getTransactionsByChannelId from './request/getTransactionsByChannelId';
import ipfsAdd from './request/ipfsAdd';
import PersistTransaction from './request/persistTransaction';
import { getEthereumStorage } from './storageUtils';

const NOT_FOUND_MESSAGE =
'Not found\nAvailable endpoints:\n/POST persistTransaction\n/GET getTransactionsByChannelId\n/GET getChannelsByTopic\n/POST /ipfsAdd\nGET getConfirmedTransaction';
'Not found\nAvailable endpoints:\n/POST persistTransaction\n/GET getTransactionsByChannelId\n/GET getChannelsByTopic\n/POST /ipfsAdd\nGET getConfirmedTransaction\nGET status';
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
'Not found\nAvailable endpoints:\n/POST persistTransaction\n/GET getTransactionsByChannelId\n/GET getChannelsByTopic\n/POST /ipfsAdd\nGET getConfirmedTransaction\nGET status';
'Not found\nAvailable endpoints:\nPOST /persistTransaction\nGET /getTransactionsByChannelId\nGET /getChannelsByTopic\nPOST /ipfsAdd\nGET /getConfirmedTransaction\nGET /status';

const { data } = await Utils.retry(
async () =>
axios.get(
'/information',
Copy link
Contributor

Choose a reason for hiding this comment

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

didn't you rename this to /status?

public getConfig(): any {
return {
creationBlockNumberHashStorage: this.creationBlockNumberHashStorage,
currentProvider: this.eth.currentProvider.host,
Copy link
Contributor

Choose a reason for hiding this comment

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

have you tested if this is infura, the token wouldn't be included?

@vrolland vrolland merged commit 1d9c239 into master Apr 8, 2020
@vrolland vrolland deleted the monitoring-features branch April 8, 2020 09:21
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.

None yet

7 participants