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

Client deprecation notice should be written in JSON when --json option is used #1616

Closed
1 task done
jpraynaud opened this issue Apr 8, 2024 · 0 comments · Fixed by #1631
Closed
1 task done

Client deprecation notice should be written in JSON when --json option is used #1616

jpraynaud opened this issue Apr 8, 2024 · 0 comments · Fixed by #1631
Assignees
Labels
devX 🌞 Developer experience

Comments

@jpraynaud
Copy link
Member

jpraynaud commented Apr 8, 2024

Why

When the --json option is used in the client the deprecation notice is not formatted in JSON:

$ mithril-client --aggregator-endpoint https://aggregator.testing-sanchonet.api.mithril.network/aggregator snapshot download latest --genesis-verification-key $(curl https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/testing-sanchonet/genesis.vkey) --json
`snapshot` command is deprecated, use `cardano-db` instead
{"timestamp": "2024-04-03T10:39:05.815084733+00:00", "step_num": 1, "total_steps": 5, "message": "Checking local disk info…"}
{"timestamp": "2024-04-03T10:39:05.815358611+00:00", "step_num": 2, "total_steps": 5, "message": "Fetching the certificate and verifying the certificate chain…"}

What

Format the deprecation notice in JSON when the --json option is used:

{"warning": "`snapshot` command is deprecated, use `cardano-db` instead", "type": "deprecation"}

How

  • Handle the JSON formatted warning when --json option is used
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devX 🌞 Developer experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants