Skip to content
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 cardano-cli ping command. #4664

Merged
merged 3 commits into from
Mar 24, 2023
Merged

New cardano-cli ping command. #4664

merged 3 commits into from
Mar 24, 2023

Conversation

newhoggy
Copy link
Contributor

@newhoggy newhoggy commented Nov 25, 2022

@newhoggy newhoggy marked this pull request as ready for review November 25, 2022 15:01
@newhoggy newhoggy force-pushed the newhoggy/cardano-ping branch 3 times, most recently from 2904fb9 to 005ea55 Compare November 25, 2022 15:04
cardano-cli/src/Cardano/CLI/Ping.hs Outdated Show resolved Hide resolved
cardano-cli/src/Cardano/CLI/Ping.hs Outdated Show resolved Hide resolved
cardano-cli/src/Cardano/CLI/Ping.hs Outdated Show resolved Hide resolved
cardano-cli/src/Cardano/CLI/Run.hs Outdated Show resolved Hide resolved
@newhoggy newhoggy force-pushed the newhoggy/cardano-ping branch 2 times, most recently from f539ab2 to c314014 Compare November 26, 2022 19:21
@IntersectMBO IntersectMBO deleted a comment from johnk-da Nov 26, 2022
@IntersectMBO IntersectMBO deleted a comment from johnk-da Nov 26, 2022
@IntersectMBO IntersectMBO deleted a comment from johnk-da Nov 26, 2022
Copy link
Contributor

@Jimbo4350 Jimbo4350 left a comment

Choose a reason for hiding this comment

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

I think the handshake related code should not live here. There should also be an issue tracking this with the relevant acceptance criteria etc..

cardano-api/src/Cardano/Api/StakePoolMetadata.hs Outdated Show resolved Hide resolved
cardano-cli/src/Cardano/CLI/Ping.hs Show resolved Hide resolved
cardano-cli/src/Cardano/CLI/Ping.hs Outdated Show resolved Hide resolved
cardano-cli/src/Cardano/CLI/Ping.hs Outdated Show resolved Hide resolved
cardano-cli/src/Cardano/CLI/Ping.hs Outdated Show resolved Hide resolved
cardano-cli/src/Cardano/CLI/Ping.hs Outdated Show resolved Hide resolved
cardano-cli/src/Cardano/CLI/Ping.hs Outdated Show resolved Hide resolved
cardano-cli/src/Cardano/CLI/Run.hs Outdated Show resolved Hide resolved
Copy link
Contributor

@Jimbo4350 Jimbo4350 left a comment

Choose a reason for hiding this comment

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

This is still missing a fleshed out ticket e.g #4277

= PingClientCmdErrorOfInvalidHostIp
| PingClientCmdErrorOfExceptions ![(AddrInfo, SomeException)]

runPingCmd :: PingCmd -> ExceptT PingClientCmdError IO ()
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add some comments to this code to make it clearer as to what is happening?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some comments added

cardano-cli/src/Cardano/CLI/Ping/Lib.hs Outdated Show resolved Hide resolved
cardano-cli/src/Cardano/CLI/Ping/Lib.hs Outdated Show resolved Hide resolved
cardano-cli/src/Cardano/CLI/Ping/Lib.hs Outdated Show resolved Hide resolved
cardano-cli/src/Cardano/CLI/Ping.hs Outdated Show resolved Hide resolved
cardano-cli/src/Cardano/CLI/Ping/Lib.hs Outdated Show resolved Hide resolved
cardano-cli/src/Cardano/CLI/Ping/Lib.hs Outdated Show resolved Hide resolved
cardano-cli/src/Cardano/CLI/Ping/Lib.hs Outdated Show resolved Hide resolved
cardano-cli/src/Cardano/CLI/Ping/Lib.hs Outdated Show resolved Hide resolved
cardano-cli/src/Cardano/CLI/Run.hs Show resolved Hide resolved
@newhoggy newhoggy force-pushed the newhoggy/cardano-ping branch 2 times, most recently from 8b02055 to e33e9f6 Compare December 9, 2022 04:34
@newhoggy newhoggy force-pushed the newhoggy/cardano-ping branch 2 times, most recently from cfc0727 to da11bd5 Compare January 29, 2023 07:15
coot
coot previously requested changes Mar 3, 2023
Comment on lines 144 to 147
, ouroboros-network-api
, ouroboros-network-protocols
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should add bounds here, alternatively you could add a bound on cardano-api.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a problem that inflicts lots of packages. I'm intending to add them in a separate PR and fix it up for all packages.

cardano-api/cardano-api.cabal Outdated Show resolved Hide resolved
cardano-cli/src/Cardano/CLI/Run.hs Show resolved Hide resolved
cardano-node-chairman/cardano-node-chairman.cabal Outdated Show resolved Hide resolved
cardano-submit-api/cardano-submit-api.cabal Outdated Show resolved Hide resolved
@newhoggy newhoggy force-pushed the newhoggy/cardano-ping branch 4 times, most recently from 7a2eca2 to 023e024 Compare March 16, 2023 04:09
cabal.project Outdated Show resolved Hide resolved
@newhoggy newhoggy force-pushed the newhoggy/cardano-ping branch 2 times, most recently from 4dd25c8 to 4a7f471 Compare March 16, 2023 04:15
@newhoggy newhoggy dismissed stale reviews from coot and Jimbo4350 March 16, 2023 04:20

Comments addressed

@newhoggy newhoggy requested review from Jimbo4350 and coot and removed request for LudvikGalois March 16, 2023 04:20
@newhoggy newhoggy force-pushed the newhoggy/cardano-ping branch 4 times, most recently from 7543161 to 77622af Compare March 21, 2023 10:25
Copy link
Contributor

@Jimbo4350 Jimbo4350 left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -16,7 +16,7 @@ index-state: 2023-03-06T05:24:58Z

index-state:
, hackage.haskell.org 2023-03-06T05:24:58Z
Copy link
Contributor

Choose a reason for hiding this comment

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

In future lets do index state bumps in separate PRs so if it happens to break CI/Nix infrastructure we can deal with it separately.

-- Ping client thread handles
caids <- forM addresses $ liftIO . async . pingClient (Tracer $ doLog msgQueue) (Tracer doErrLog) options versions
res <- L.zip addresses <$> mapM (liftIO . waitCatch) caids
liftIO $ doLog msgQueue CNP.LogEnd
Copy link
Contributor

Choose a reason for hiding this comment

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

LogEnd is signalling to stop logging right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah. It logs JSON so the LogEnd is required to close it off with ] }.

@newhoggy newhoggy added this pull request to the merge queue Mar 24, 2023
Merged via the queue into master with commit a2fda17 Mar 24, 2023
@iohk-bors iohk-bors bot deleted the newhoggy/cardano-ping branch March 24, 2023 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants