Skip to content

Add print in output of the client CLI version at each command execution #2630

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

Merged
merged 6 commits into from
Jul 4, 2025

Conversation

turmelclem
Copy link
Collaborator

@turmelclem turmelclem commented Jul 3, 2025

Content

  • The first output line of each client CLI is the version, followed by the command output.
  • root args of the command can now be place at any place in the command (verbose, json, log_output, ...)
  • code refactoring :
    • SharedArgs as been remove since json boolean is global and part of the commandContext now
    • use configParamter from commandContext

version output example :

mithril-client --log-output cli.log -vvv cardano-db snapshot list
Mithril Client CLI version: 0.12.18
+-------+-----------+---------+------------------------------------------------------------------+----------+-----------+-----------------------------------+
| Epoch | Immutable | Network | Digest                                                           |     Size | Locations |                           Created |
+-------+-----------+---------+------------------------------------------------------------------+----------+-----------+-----------------------------------+
| 444   | 132       | devnet  | 382bad7a37fd5b5dc757068a018e72f67f8160d4d2fe911d541c6a2f3ed1fcb1 | 0.00 GiB | 1         | 2025-07-03 15:51:28.415420534 UTC |

json version output example :

mithril-client --log-output cli.log -vvv cardano-db snapshot list --json
{"mithril_client_cli_version":"0.12.18"}
[{"digest":"f89018aa64510fff38d28bd722d1428bf66182dc6e139830057f1e4573b47367", ...

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are updated (if relevant)
    • CHANGELOG file is updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • All check jobs of the CI have succeeded
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested
  • Documentation
    • Update README file (if relevant)
    • Update documentation website (if relevant)
    • Add dev blog post (if relevant)
    • Add ADR blog post or Dev ADR entry (if relevant)
    • No new TODOs introduced

Closes #2620

@turmelclem turmelclem force-pushed the ctl/2620-add-client-CLI-version-in-stderr branch from 29d925d to bacb877 Compare July 3, 2025 09:42
Copy link
Member

@jpraynaud jpraynaud left a comment

Choose a reason for hiding this comment

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

Could you also make the description of the PR more understandable with a full sentence?

Copy link

github-actions bot commented Jul 3, 2025

Test Results

    4 files    154 suites   21m 58s ⏱️
2 072 tests 2 072 ✅ 0 💤 0 ❌
6 360 runs  6 360 ✅ 0 💤 0 ❌

Results for commit 0bbd891.

♻️ This comment has been updated with latest results.

@turmelclem turmelclem temporarily deployed to testing-preview July 3, 2025 09:52 — with GitHub Actions Inactive
@turmelclem turmelclem force-pushed the ctl/2620-add-client-CLI-version-in-stderr branch from bacb877 to f38ccc7 Compare July 3, 2025 15:53
@turmelclem turmelclem force-pushed the ctl/2620-add-client-CLI-version-in-stderr branch from f38ccc7 to 005a37d Compare July 3, 2025 16:04
@turmelclem turmelclem temporarily deployed to testing-preview July 3, 2025 16:14 — with GitHub Actions Inactive
@turmelclem turmelclem self-assigned this Jul 4, 2025
@turmelclem turmelclem temporarily deployed to testing-preview July 4, 2025 07:45 — with GitHub Actions Inactive
@turmelclem turmelclem force-pushed the ctl/2620-add-client-CLI-version-in-stderr branch from 7f8e710 to dfa79f0 Compare July 4, 2025 08:08
@turmelclem turmelclem temporarily deployed to testing-preview July 4, 2025 08:40 — with GitHub Actions Inactive
@turmelclem turmelclem force-pushed the ctl/2620-add-client-CLI-version-in-stderr branch 3 times, most recently from ab34e6d to 40522eb Compare July 4, 2025 09:13
Copy link
Member

@jpraynaud jpraynaud left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@turmelclem turmelclem temporarily deployed to testing-preview July 4, 2025 09:23 — with GitHub Actions Inactive
@turmelclem turmelclem force-pushed the ctl/2620-add-client-CLI-version-in-stderr branch 2 times, most recently from 5e1046b to 8de3d86 Compare July 4, 2025 09:36
@turmelclem turmelclem temporarily deployed to testing-preview July 4, 2025 09:47 — with GitHub Actions Inactive
@turmelclem turmelclem force-pushed the ctl/2620-add-client-CLI-version-in-stderr branch 4 times, most recently from 6b8f542 to d02f4eb Compare July 4, 2025 10:10
@turmelclem turmelclem temporarily deployed to testing-preview July 4, 2025 10:22 — with GitHub Actions Inactive
@turmelclem turmelclem temporarily deployed to testing-preview July 4, 2025 12:35 — with GitHub Actions Inactive
@turmelclem turmelclem force-pushed the ctl/2620-add-client-CLI-version-in-stderr branch from be32c3f to 0bbd891 Compare July 4, 2025 12:41
@turmelclem turmelclem temporarily deployed to testing-preview July 4, 2025 12:53 — with GitHub Actions Inactive
@turmelclem turmelclem merged commit b6fb6c2 into main Jul 4, 2025
41 checks passed
@turmelclem turmelclem deleted the ctl/2620-add-client-CLI-version-in-stderr branch July 4, 2025 12:56
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.

Add client CLI version in stderr
4 participants