-
Notifications
You must be signed in to change notification settings - Fork 16
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
New debug log-epoch-state
command
#775
Conversation
2a9e2de
to
c432eef
Compare
cardano-cli/test/cardano-cli-golden/files/golden/help/debug_log-epoch-state.cli
Outdated
Show resolved
Hide resolved
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.
Very nice!
be3c8c9
to
191e914
Compare
19e203e
to
3a884d6
Compare
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.
LGTM! A few comments.
import Options.Applicative.Types (ParserInfo (..), ParserPrefs (..)) | ||
|
||
-- | Sub-commands of 'cardano-cli'. | ||
data ClientCommand = |
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.
👍
| UnixSockEndPoint String | ||
deriving (Eq, Show) | ||
|
||
data PingCmd = PingCmd |
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.
👍 Not necessarily for this PR but haddocks would be good here.
|
||
import Cardano.CLI.Orphans () | ||
|
||
data Configuration |
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.
A haddock here saying this is a file type level tag would be useful.
|
||
data Configuration | ||
|
||
data LogEpochStateCmdArgs = LogEpochStateCmdArgs |
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.
A brief haddock here describing the command would be useful.
pDebugCmds envCli = | ||
asum | ||
[ subParser "log-epoch-state" | ||
(Opt.info pLogEpochStateCmdArgs $ Opt.progDesc "Log epoch state.") |
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 need a better description of what this command does and what it outputs.
pure ConditionNotMet | ||
) | ||
|
||
case result of |
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 should also be catching exceptions 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.
What sort of exceptions?
3a884d6
to
928aac5
Compare
928aac5
to
5127c88
Compare
5127c88
to
c744dbb
Compare
c744dbb
to
116a342
Compare
Changelog
Context
This command will log the epoch state to the given file. The contents of the log file is
jsonl
.The command will not terminate.
Callers of the command can kill the process to terminate it.
Example run
How to trust this PR
Highlight important bits of the PR that will make the review faster. If there are commands the reviewer can run to observe the new behavior, describe them.
Checklist