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

Conduit: init subcommand #1235

Merged
merged 8 commits into from
Sep 27, 2022
Merged

Conversation

winder
Copy link
Contributor

@winder winder commented Sep 21, 2022

Summary

Note: this is building ontop of #1232 so there are some unrelated changes in the diff.

Thinking out loud a little with this PR. I wanted to try out Conduit and getting the basic configuration setup was a little tricky.

Run ./conduit init or ./conduit init -d /path/to/data/directory and a new directory is created along with some instructions:

~$ ./conduit init -d data/conduit_data
A data directory has been created at 'data/conduit_data'.

Before it can be used, the config file needs to be updated
by setting the algod address/token and the block-dir path where
Conduit should write the block files.

Once the config file is updated, start Conduit with:
  ./conduit -d data/conduit_data

Test Plan

New unit test and manual testing.

@winder winder changed the base branch from develop to conduit September 21, 2022 20:12
@winder winder force-pushed the will/conduit-init-command2 branch from 97e7f5c to 92ec78b Compare September 21, 2022 20:42
@codecov
Copy link

codecov bot commented Sep 21, 2022

Codecov Report

Merging #1235 (9a14579) into conduit (ce54ff3) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff            @@
##           conduit    #1235   +/-   ##
========================================
  Coverage    62.06%   62.06%           
========================================
  Files           70       70           
  Lines         9434     9434           
========================================
  Hits          5855     5855           
  Misses        3073     3073           
  Partials       506      506           
Impacted Files Coverage Δ
conduit/config.go 100.00% <ø> (ø)
conduit/pipeline.go 52.15% <100.00%> (ø)

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

Comment on lines -114 to +121
cfg.Flags = conduitCmd.PersistentFlags()
cfg.Flags = cmd.Flags()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This passes the flags to the sub commands, which I didn't want.

return cmd
}

//go:embed conduit.yml.example
Copy link
Contributor

Choose a reason for hiding this comment

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

Very very cool

@winder winder marked this pull request as ready for review September 27, 2022 13:15
@winder winder force-pushed the will/conduit-init-command2 branch from 92ec78b to 9a14579 Compare September 27, 2022 13:23
@winder winder merged commit c809d35 into algorand:conduit Sep 27, 2022
@winder winder changed the title Conduit init subcommand Conduit: init subcommand Sep 27, 2022
@winder winder added the Enhancement New feature or request label Sep 27, 2022
@winder winder deleted the will/conduit-init-command2 branch September 27, 2022 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants