-
Notifications
You must be signed in to change notification settings - Fork 93
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
refactor: add deprecation message to libp2p & ipfs flags #3966
Conversation
frrist
commented
May 1, 2024
- closes Add deprecation notice to Libp2p flags and embedded IPFS Node Flags #3962
Important Auto Review SkippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some thoughts
@@ -10,11 +10,17 @@ var Libp2pFlags = []Definition{ | |||
Description: `A comma-separated list of libp2p multiaddress to connect to. ` + | |||
`Use "none" to avoid connecting to any peer, ` + | |||
`"env" to connect to the default peer list of your active environment (see BACALHAU_ENVIRONMENT env var).`, | |||
Deprecated: true, | |||
DeprecatedMessage: "The libp2p transport will be deprecated in a future version in favour of using " + | |||
"--orchestrators to specify a requester node to connect to.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"... Unless you specifically use the features of libp2p (which ones?), you should not have to change anything."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there are any features we are losing due to deprecation of libp2p. In general users will need to change very little, and I'd prefer to describe what they do need to change in a changelog/release-notes/blog-post rather than the CLI help message.
Perhaps we should create a github discussion to talk about this more and provide a link to the discussion post in the deprecation message for these flags?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we need to start communicating this with users and collect feedback, whether through github discussions or slack channels. cc @seanmtracey
}, | ||
{ | ||
FlagName: "swarm-port", | ||
ConfigPath: types.NodeLibp2pSwarmPort, | ||
DefaultValue: Default.Node.Libp2p.SwarmPort, | ||
Description: `The port to listen on for swarm connections.`, | ||
Deprecated: true, | ||
DeprecatedMessage: "The libp2p transport will be deprecated in a future version in favour of using " + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't it better to not have a line break delimiter? E.g. use ``? Just coding style i guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah probably should have done that. Adding this line break (+
) is what my editor does when I go over the row length limit.
@@ -21,6 +21,8 @@ var IPFSFlags = []Definition{ | |||
DefaultValue: Default.Node.IPFS.SwarmKeyPath, | |||
Description: "Optional IPFS swarm key required to connect to a private IPFS swarm", | |||
EnvironmentVariables: []string{"BACALHAU_IPFS_SWARM_KEY"}, | |||
Deprecated: true, | |||
DeprecatedMessage: ipfsEmbeddedDeprecationMessage, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where's this message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line 5 of the file. It's not in the diff as it was added by Ross a while back when he was part way through some of the deprecation work.
FlagName: "network", | ||
ConfigPath: types.NodeNetworkType, | ||
DefaultValue: Default.Node.Network.Type, | ||
Description: `Inter-node network layer type (e.g. nats, libp2p).`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we remove "libp2p" here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will remove this entire flag when we remove libp2p since specifying a network will no longer be an option.
DefaultValue: Default.Node.Network.Type, | ||
Description: `Inter-node network layer type (e.g. nats, libp2p).`, | ||
Deprecated: true, | ||
DeprecatedMessage: "The libp2p transport will be deprecated in a future version in favor of NATS", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's weird that we are deprecating this flag - will we just remove it in the future? (since there is no "changing your network"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#3966 (comment) Yup will remove the flag when we remove libp2p
@@ -10,11 +10,17 @@ var Libp2pFlags = []Definition{ | |||
Description: `A comma-separated list of libp2p multiaddress to connect to. ` + | |||
`Use "none" to avoid connecting to any peer, ` + | |||
`"env" to connect to the default peer list of your active environment (see BACALHAU_ENVIRONMENT env var).`, | |||
Deprecated: true, | |||
DeprecatedMessage: "The libp2p transport will be deprecated in a future version in favour of using " + | |||
"--orchestrators to specify a requester node to connect to.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we need to start communicating this with users and collect feedback, whether through github discussions or slack channels. cc @seanmtracey
7e46f77
to
c251c65
Compare
c251c65
to
ccc0954
Compare