pokt-network / pocket

Official implementation of the Pocket Network Protocol v1
https://pokt.network
MIT License
61 stars 33 forks source link

add POCKET_RPC_URL envar #815

Closed okdas closed 1 year ago

okdas commented 1 year ago

Description

This PR adds a POCKET_RPC_URL environment variable. We are going to use it as a fallback in the CLI if the remote_cli_url flag is not specified. Similarly, that environment variable also has a fallback default value, which is http://localhost:50832 — the same default value we've always used.

In addition, I've replaced an existing variable, RPC_HOST, which was previously used in the cluster manager and e2e tests, with this new variable to maintain consistency.

Once this is merged, I'll update the DevNet infrastructure, so it will also use the new configuration.

Summary generated by Reviewpad on 08 Jun 23 23:29 UTC

This pull request adds support for a POCKET_RPC_URL environment variable, replacing the older RPC_HOST variable used in several places across the codebase. It also updates two URLs in the docker-compose and CLI client manifests. Finally, it removes two unused variables and a redundant import.

Issue

Fixes #814

Type of change

Please mark the relevant option(s):

List of changes

Testing

Required Checklist

If Applicable Checklist

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.04 :warning:

Comparison is base (f72e1f0) 31.38% compared to head (2c28cc3) 31.35%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #815 +/- ## ========================================== - Coverage 31.38% 31.35% -0.04% ========================================== Files 107 107 Lines 9080 9074 -6 ========================================== - Hits 2850 2845 -5 + Misses 5889 5888 -1 Partials 341 341 ``` | [Impacted Files](https://app.codecov.io/gh/pokt-network/pocket/pull/815?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pokt-network) | Coverage Δ | | |---|---|---| | [app/client/cli/cmd.go](https://app.codecov.io/gh/pokt-network/pocket/pull/815?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pokt-network#diff-YXBwL2NsaWVudC9jbGkvY21kLmdv) | `38.09% <100.00%> (ø)` | | | [app/client/cli/debug.go](https://app.codecov.io/gh/pokt-network/pocket/pull/815?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pokt-network#diff-YXBwL2NsaWVudC9jbGkvZGVidWcuZ28=) | `7.87% <100.00%> (-2.04%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

bryanchriswhite commented 1 year ago

@okdas I'm just now noticing this, I've been working in the same area, possibly in a slightly different direction. I will take a comprehensive look at this when I have a minute. In the meantime, I wanted to call out #806.

okdas commented 1 year ago

@bryanchriswhite oh, seems like your PR would resolve the issue I've been trying to address here! :) Let's focus on your PR then, since it went through some reviews already.