Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix issue 2304: ux improvements #2317

Merged
merged 7 commits into from
Jul 15, 2020
Merged

Conversation

deaswang
Copy link
Contributor

@deaswang deaswang commented Jul 8, 2020

Fix issue: #2304

@magik6k magik6k changed the base branch from master to next July 8, 2020 12:39
Copy link
Contributor

@magik6k magik6k 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 PR!

Since those are breaking changes, I've changed the base branch to next

Also, given that we will eventually support running distributed PoSt on workers, we could also rename lotus-seal-worker to just lotus-worker here, to keep those changes in one batch.

@@ -36,7 +36,7 @@ import (

var log = logging.Logger("main")

const FlagStorageRepo = "workerrepo"
const FlagWorkerRepo = "workerrepo"
Copy link
Contributor

Choose a reason for hiding this comment

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

Following the pattern from miner-repo, this could be worker-repo

@deaswang deaswang requested a review from magik6k July 9, 2020 03:15
Copy link
Contributor

@magik6k magik6k left a comment

Choose a reason for hiding this comment

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

Thanks!

Probably want @travisperson to have a look at these changes too before we merge

Makefile Outdated Show resolved Hide resolved
Co-authored-by: Anton Evangelatov <anton.evangelatov@gmail.com>
Copy link
Contributor

@travisperson travisperson 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 taking this one!

The only thing I think we need to discuss further is if we should also move the code directories for lotus-storage-miner, lotus-seal-worker.

It will remove some history but that is what git log --follow is for.

This is a big breaking change, and doing it right before the testnet reset is a large risk as a lot of peoples infrastructure and deployments are going to change as a result of this. We should announce it in the community slack, and try to get this in for the next butterfly network reset when the new specs-actors lands.

I think we should also try to support a deprecation period for the flags and environment variables. This is pretty easy to do with our cli tool. The other option is to break fast and break hard during the buttefly networks tests so people are very much aware of the change prior to the testnet reset.

We could run the deprecation period through the testnet reset and do it afterwards. I would very much be interested in hearing from the community. I will post this PR in the slack to get some more eyes on it.

Makefile Outdated Show resolved Hide resolved
Name: FlagStorageRepo,
EnvVars: []string{"WORKER_PATH"},
Name: FlagWorkerRepo,
EnvVars: []string{"LOTUS_WORKER_PATH"},
Copy link
Contributor

Choose a reason for hiding this comment

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

We can support multiple environment variables and add the old flag to the Aliases to allow for a deprecation period. We can then use the urfave.cli BeforeFunc to add a deprecation warning for each environment variable.

We should strive to ensure that nothing breaks outside of the binary names for a short period.

@@ -83,7 +83,7 @@ func envForRepo(t repo.RepoType) string {
case repo.FullNode:
return "FULLNODE_API_INFO"
case repo.StorageMiner:
return "STORAGE_API_INFO"
return "MINER_API_INFO"
Copy link
Contributor

Choose a reason for hiding this comment

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

To fully support deprecation we'd need to figure out how to handle this stuff as well. This only returns the used value (which is fine), but we would need to handle both in the GetAPIInfo function where the os.LookupEnv occurs.

@magik6k might have some ideas where, but an off the cuff solution would be to change both of these flagForRepo and envForRepo to return a slice. We use the first element for when we print the values, but search for both when we consume them (GetAPIInfo).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

how about add flagForRepoDeprecation and envForRepoDeprecation func? And delete them after deprecation period. Then it won't change exist function.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh yes, that sound like a better idea

@travisperson
Copy link
Contributor

@deaswang there some more find and replace I think that needs to occur:

Terms: Lotus Seal Worker and Lotus Storage Miner.

These appear in the documentation site

@magik6k magik6k mentioned this pull request Jul 13, 2020
1 task
Copy link
Contributor

@magik6k magik6k left a comment

Choose a reason for hiding this comment

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

Thanks!


install-chainwatch-service: chainwatch
install -C ./chainwatch /usr/local/bin/chainwatch
install -C -m 0644 ./scripts/chainwatch.service /usr/local/lib/systemd/system/chainwatch.service
mkdir -p /etc/lotus
Copy link
Member

Choose a reason for hiding this comment

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

whats this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

for EnvironmentFile=-/etc/lotus/chainwatch.env in lotus-chainwatch.service.

api/api_storage.go Outdated Show resolved Hide resolved
@magik6k magik6k merged commit 0f2043d into filecoin-project:next Jul 15, 2020
@deaswang deaswang deleted the issue-2304 branch December 16, 2020 03:24
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants