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

CSUB-638: Add chain/era info to the Status command #1201

Merged
merged 4 commits into from
Aug 4, 2023
Merged

Conversation

pLabarta
Copy link
Contributor

@pLabarta pLabarta commented Jul 14, 2023

Description of proposed changes

This PR makes some changes to the status command to introduce an option to show the Chain's status.

New behavior:

  • If used with no flags, it will just print the chain status (block tip, last finalized, era info)
  • If used with the --validator [address] flag, it will show that validator status
  • If used with both flags, --validator [address] --chain, it will show information about both the chain and the validator

Practical tips for PR review & merge:

  • All GitHub Actions report PASS
  • Newly added code/functions have unit tests
    • Coverage tools report all newly added lines as covered
    • The positive scenario is exercised
    • Negative scenarios are exercised, e.g. assert on all possible errors
    • Assert on events triggered if applicable
    • Assert on changes made to storage if applicable
  • Modified behavior/functions - try to make sure above test items are covered
  • Integration tests are added if applicable/needed

@codecov-commenter
Copy link

codecov-commenter commented Jul 14, 2023

Codecov Report

Merging #1201 (b607f01) into dev (8085dd6) will decrease coverage by 0.16%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##              dev    #1201      +/-   ##
==========================================
- Coverage   69.50%   69.34%   -0.16%     
==========================================
  Files         100      101       +1     
  Lines       11877    11904      +27     
  Branches       89       97       +8     
==========================================
  Hits         8255     8255              
- Misses       3622     3649      +27     
Files Changed Coverage Δ
scripts/cc-cli/src/commands/chill.ts 0.00% <0.00%> (ø)
scripts/cc-cli/src/commands/status.ts 0.00% <0.00%> (ø)
scripts/cc-cli/src/commands/unbond.ts 0.00% <0.00%> (ø)
scripts/cc-cli/src/commands/withdrawUnbonded.ts 0.00% <0.00%> (ø)
scripts/cc-cli/src/utils/chainStatus.ts 0.00% <0.00%> (ø)
scripts/cc-cli/src/utils/validatorStatus.ts 0.00% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions
Copy link

For full LLVM coverage report click here!

AdaJane
AdaJane previously approved these changes Jul 17, 2023
Copy link
Contributor

@atodorov atodorov left a comment

Choose a reason for hiding this comment

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

Added some questions, possibly need changes.

scripts/cc-cli/src/commands/status.ts Show resolved Hide resolved
scripts/cc-cli/src/commands/status.ts Show resolved Hide resolved
Copy link
Contributor

@zacharyfrederick zacharyfrederick left a comment

Choose a reason for hiding this comment

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

Overall everything looks good to me. It might make sense to rename the cc-cli/src/utils directory to cc-cli/src/lib to reflect the growing importance of that part of the code base.

Copy link
Contributor

@nathanwhit nathanwhit left a comment

Choose a reason for hiding this comment

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

LGTM

@AdaJane AdaJane merged commit 284fc8e into dev Aug 4, 2023
34 checks passed
@AdaJane AdaJane deleted the cli-chain-status branch August 4, 2023 14:37
AdaJane pushed a commit that referenced this pull request Aug 14, 2023
* add: add --chain & --validator flag to status

* rename status util to validatorStatus

* rename getStatus to getValidatorStatus

* add: implement cli-table for validatorStatus
AdaJane pushed a commit that referenced this pull request Aug 14, 2023
* add: add --chain & --validator flag to status

* rename status util to validatorStatus

* rename getStatus to getValidatorStatus

* add: implement cli-table for validatorStatus
AdaJane pushed a commit that referenced this pull request Aug 14, 2023
* add: add --chain & --validator flag to status

* rename status util to validatorStatus

* rename getStatus to getValidatorStatus

* add: implement cli-table for validatorStatus
atodorov pushed a commit that referenced this pull request Aug 15, 2023
* add: add --chain & --validator flag to status

* rename status util to validatorStatus

* rename getStatus to getValidatorStatus

* add: implement cli-table for validatorStatus
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.

6 participants