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

Improve CLI for owners in bash tests #3388

Merged
merged 17 commits into from
Feb 23, 2025
Merged

Conversation

ma2bd
Copy link
Contributor

@ma2bd ma2bd commented Feb 22, 2025

Motivation

Allow removing the hard-coded OWNER variables from README tests

Proposal

Make sure to return the owner on stdout every time the CLI generates a key pair.

Test Plan

I modified the main README file.

Links

Continues #3385

@ma2bd ma2bd requested review from afck, Twey and deuszx February 22, 2025 03:31
@ma2bd ma2bd changed the title Linera cli owners Improve owners in bash tests Feb 22, 2025
@ma2bd ma2bd changed the title Improve owners in bash tests Improve CLI for owners in bash tests Feb 22, 2025
@@ -1118,6 +1119,7 @@ impl Runnable for Job {
println!("{}", outcome.chain_id);
println!("{}", outcome.message_id);
println!("{}", outcome.certificate_hash);
println!("{}", owner);
Copy link
Contributor

Choose a reason for hiding this comment

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

Just by looking at these printlns it's impossible to tell "what is what". Is it so b/c this format is easier to consume programmatically?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's right. Eventually we should have (small?) libraries in non-bash scripting languages for this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could also use JSON but then we need jq in bash

@ma2bd ma2bd force-pushed the linera_cli_owners branch from 5934341 to 6ae1bac Compare February 22, 2025 17:54

linera wallet init --faucet $FAUCET_URL

INFO_1=($(linera wallet request-chain --faucet $FAUCET_URL))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we prefer INFO1 or INFO_1 in general?

Copy link
Contributor

@deuszx deuszx Feb 22, 2025

Choose a reason for hiding this comment

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

I'm fine with both. No opinions here.

@ma2bd ma2bd force-pushed the linera_cli_owners branch from 6ae1bac to d706a76 Compare February 22, 2025 19:04
@ma2bd ma2bd merged commit f7e48ce into linera-io:main Feb 23, 2025
21 checks passed
@ma2bd ma2bd deleted the linera_cli_owners branch February 23, 2025 00:59
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.

3 participants