Skip to content

CLI command to save default config in a file#976

Open
Prajjawalk wants to merge 3 commits into
pokt-network:mainfrom
Prajjawalk:main
Open

CLI command to save default config in a file#976
Prajjawalk wants to merge 3 commits into
pokt-network:mainfrom
Prajjawalk:main

Conversation

@Prajjawalk

@Prajjawalk Prajjawalk commented Aug 19, 2023

Copy link
Copy Markdown
Contributor

Description

Reference issue- #975

Summary generated by Reviewpad on 30 Nov 23 03:37 UTC

This pull request adds a new command to the CLI that allows saving the default configuration to a file. The configuration is saved in a config.yaml file. Additionally, it handles errors in the WriteConfigAs function by logging an error message if writing the config to the file fails.

Issue

Fixes #975

Type of change

Please mark the relevant option(s):

  • New feature, functionality or library
  • Bug fix
  • Code health or cleanup
  • Major breaking change
  • Documentation
  • Other

List of changes

  • Add: app/client/cli/config.go
  • Changed: runtime/configs/config.go
  • Updated: CHANGELOG.md

Testing

  • make develop_test; if any code changes were made
  • make test_e2e on k8s LocalNet; if any code changes were made
  • e2e-devnet-test passes tests on DevNet; if any code was changed
  • Docker Compose LocalNet; if any major functionality was changed or introduced
  • k8s LocalNet; if any infrastructure or configuration changes were made

Required Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas (README(s), docs, godoc comments, etc...)
  • I have tested my changes using the available tooling
  • I have added, or updated, godoc format comments on touched members (see: tip.golang.org/doc/comment)
  • I have added, or updated, mermaid.js diagrams in the corresponding README(s)

@reviewpad reviewpad Bot added small Pull request is small waiting-for-review labels Aug 19, 2023
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 40.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 34.83%. Comparing base (afc873e) to head (91ad43e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
app/client/cli/config.go 40.00% 3 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #976   +/-   ##
=======================================
  Coverage   34.83%   34.83%           
=======================================
  Files         128      129    +1     
  Lines       10986    10991    +5     
=======================================
+ Hits         3827     3829    +2     
- Misses       6667     6670    +3     
  Partials      492      492           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

small Pull request is small waiting-for-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pending: need to create CLI command to save default config generated in a file

2 participants