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

bidbot version tries to read config and connect over http #82

Open
f8-ptrk opened this issue Jan 11, 2022 · 6 comments
Open

bidbot version tries to read config and connect over http #82

f8-ptrk opened this issue Jan 11, 2022 · 6 comments

Comments

@f8-ptrk
Copy link

f8-ptrk commented Jan 11, 2022

./bidbot version
2022-01-11T10:34:46.264Z        ERROR   bidbot  bidbot/main.go:222      loading config from : Config File "config" Not Found in "[/home/filecoin/.bidbot]"
local   version:        git
        build date:     2022-01-11T10:32:46Z
        git summary:    v0.1.6-4-g8dff41e
        git branch:     main
        git commit:     8dff41e
        git state:      clean
2022-01-11T10:34:46.265Z        FATAL   bidbot  bidbot/main.go:466      Get "http://127.0.0.1:9999/version": dial tcp 127.0.0.1:9999: connect: connection refused

it should just print the version. urfav/cli has a dedicated mechanism for printing versions - that might be worth a look

@jsign
Copy link
Contributor

jsign commented Jan 11, 2022

We don't use the urfav/cli library for CLI, but cobra.
The http is the endpoint of your Lotus node, there's no https endpoint.
The versioning tags and information about git that is shown there is intentional with that level of detail, since only the version is missing the hash and dirtiness which is useful if somebody is running an experimental branch.

@f8-ptrk
Copy link
Author

f8-ptrk commented Jan 11, 2022

but why does it even try to read a config file and connect to a node for a print only command?

it throws two ERROR in bright red while the command itself runs perfectly fine

@jsign
Copy link
Contributor

jsign commented Jan 11, 2022

Ah, if you refer to that is because bidbot version checks the local version of the bidbot you are running, plus the bidbot daemon you're running.

Saying it differently, you're running bidbot daemon which is a daemon. Then you can use bidbot version to know the bidbot version you're running for the CLI tools, and also the version that daemon running. 127.0.0.1:9999 is the endpoint of the bidbot daemon is trying to query its version. Usually a mismatch of both version means that you updated bidbot binary, but you didn't restart the daemon (that's why we do this strict checking).

@f8-ptrk
Copy link
Author

f8-ptrk commented Jan 11, 2022

we didn't do anything :D just checked the version after build - but makes sense. maybe adjust the help text to hint at what to expect

@jsign
Copy link
Contributor

jsign commented Jan 11, 2022

Sure, I can add some extra text that signals that it's trying to also check the version of the running daemon too.

@f8-ptrk
Copy link
Author

f8-ptrk commented Jan 11, 2022

it's just so red without explanation

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

No branches or pull requests

2 participants