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
@newhoggy newhoggy force-pushed the newhoggy/cardano-ping branch 5 times, most recently from 78e16ab to 440a908 Compare November 30, 2022 10:21
@newhoggy newhoggy dismissed Jimbo4350’s stale review November 30, 2022 10:22

Comments addressed.

@newhoggy newhoggy force-pushed the newhoggy/cardano-ping branch from 440a908 to d070813 Compare November 30, 2022 10:25
@newhoggy newhoggy requested a review from Jimbo4350 November 30, 2022 10:27
@newhoggy newhoggy force-pushed the newhoggy/cardano-ping branch from d070813 to eb9a1d0 Compare November 30, 2022 22:38
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 from 27b509f to e20c040 Compare January 20, 2023 23:41
@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
@newhoggy newhoggy force-pushed the newhoggy/cardano-ping branch from 77622af to f270530 Compare March 21, 2023 10:33
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