Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

change errors.Errorf to *.Wrapf and *.Wrap #286

Merged
merged 9 commits into from Nov 21, 2020

Conversation

developerfred
Copy link
Contributor

@developerfred developerfred commented Nov 19, 2020

fixes: #236

Fix
#236 (comment)

Copy link
Collaborator

@krasi-georgiev krasi-georgiev left a comment

Choose a reason for hiding this comment

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

Thanks for the update, left few comments, please have a look at all other occurrences and continue in the same direction.

cmd/tellor/argTypes.go Outdated Show resolved Hide resolved
pkg/apiOracle/valueOracle.go Outdated Show resolved Hide resolved
pkg/config/config.go Outdated Show resolved Hide resolved
pkg/config/config.go Outdated Show resolved Hide resolved
pkg/config/config.go Outdated Show resolved Hide resolved
pkg/config/config.go Outdated Show resolved Hide resolved
@developerfred
Copy link
Contributor Author

@krasi-georgiev thanks for review! I make changes.

@krasi-georgiev
Copy link
Collaborator

krasi-georgiev commented Nov 19, 2020

please change the rest of the PR according to my comments as these changes apply in many different places not just the ones I pointed.

To save time please review our errors format guidlines

@krasi-georgiev
Copy link
Collaborator

ping when ready for another review or if you get stuck making all tests pass.

@coveralls
Copy link

coveralls commented Nov 19, 2020

Pull Request Test Coverage Report for Build 374531539

  • 2 of 123 (1.63%) changed or added relevant lines in 25 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 36.771%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/ops/miningManager.go 0 1 0.0%
pkg/ops/requestDataWorker.go 1 2 50.0%
pkg/pow/miningSetup.go 0 1 0.0%
pkg/tracker/currentVariables.go 0 1 0.0%
pkg/tracker/retryFetcher.go 1 2 50.0%
pkg/tracker/valueGenerators.go 0 1 0.0%
pkg/util/httpRetriever.go 0 1 0.0%
pkg/tracker/runner.go 0 2 0.0%
pkg/dataServer/dataServer.go 0 3 0.0%
pkg/db/localDataProxy.go 0 3 0.0%
Totals Coverage Status
Change from base Build 374497508: 0.05%
Covered Lines: 1601
Relevant Lines: 4354

💛 - Coveralls

@developerfred
Copy link
Contributor Author

@krasi-georgiev double check in files and test pass done.

Copy link
Collaborator

@krasi-georgiev krasi-georgiev left a comment

Choose a reason for hiding this comment

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

We are going in a good direction, thanks.
Please review my comments and check the rest of the pr to make sure you apply the same principles everywhere.

cmd/tellor/argTypes.go Outdated Show resolved Hide resolved
pkg/db/remoteRequest.go Outdated Show resolved Hide resolved
pkg/db/remoteRequest.go Outdated Show resolved Hide resolved
pkg/ops/stakeOps.go Outdated Show resolved Hide resolved
@krasi-georgiev
Copy link
Collaborator

krasi-georgiev commented Nov 20, 2020

for the CI error you can run make lint locally to find out why it happens

@krasi-georgiev
Copy link
Collaborator

btw in few minutes will merge another big PR that does some other global refactorings so there will be some conflict to be resolved and unfortunately we can't avoid it, but shouldn't be too difficult to resolve.

scripts/opencl/opencl.go Outdated Show resolved Hide resolved
pkg/util/logConfig.go Outdated Show resolved Hide resolved
* add errors.Wrap() on `pkg/pow/pool.go`
* add errors.Wrap() on `pkg/db/remoteRequest.go`
@coveralls
Copy link

coveralls commented Nov 20, 2020

Pull Request Test Coverage Report for Build 375517800

  • 3 of 117 (2.56%) changed or added relevant lines in 24 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 36.72%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/ops/miningManager.go 0 1 0.0%
pkg/ops/requestDataWorker.go 1 2 50.0%
pkg/pow/miningSetup.go 0 1 0.0%
pkg/tracker/currentVariables.go 0 1 0.0%
pkg/tracker/retryFetcher.go 1 2 50.0%
pkg/tracker/valueGenerators.go 0 1 0.0%
pkg/util/httpRetriever.go 0 1 0.0%
pkg/tracker/runner.go 0 2 0.0%
pkg/util/logConfig.go 0 2 0.0%
pkg/dataServer/dataServer.go 0 3 0.0%
Totals Coverage Status
Change from base Build 374842204: 0.0%
Covered Lines: 1601
Relevant Lines: 4360

💛 - Coveralls

@krasi-georgiev krasi-georgiev merged commit f9a094c into tellor-io:master Nov 21, 2020
@krasi-georgiev
Copy link
Collaborator

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace all fmt.Errorf with errors.Wrap and errors.Errorf
3 participants