-
Notifications
You must be signed in to change notification settings - Fork 3
Auto avalanchego #30
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
Auto avalanchego #30
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to replacing bash with rust :). Added a few notes.
tests/e2e/src/tests/mod.rs
Outdated
let (mut exec_path, is_set) = get_avalanchego_path(); | ||
if !is_set { | ||
info!("avalanchego_path not set, installing to temp"); | ||
let (path, _) = avalanche_installer::avalanchego::download(None, None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
questions: download
grabs the latest release[1]. seems like we would want to pin this to an explicit version compatible with the mini-kvvm and or have a test against latest download_version ? Also would it make sense to pass the params to
download` since we have them so we can run this in CI with darwin?
Finally if this test is run locally and in general it would be good to validate what version the binary is and print it. Perhaps the path would be useful for this?
[1] https://github.com/gyuho/avalanche-installer/blob/main/src/avalanchego.rs#L84
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed, I can modify this code to follow this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, after reviewing these a little bit:
- I don't currently know of a way in the avalanchego installer to install a specific version. Maybe this is a feature we could add to avalanchego installer? The only other way would be to re-incorporate it in the bash script, which sort of defeats the purpose of what the installer is for.
- I also don't know if it entirely makes sense to pass params to download, because download automatically does the work of determining what os/arch is needed for the system.
- When you say have a test against latest download_version do you mean having two tests, one that automatically installs the latest version and another that fetches avalanchego from the local machine?
- added a little bit of logic to print out the version that avalanchego is running
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes lets talk to @gyuho on his thoughts
can we rebase these commits into a few which are reflective of the actual changes. |
3e3b490
to
230f890
Compare
230f890
to
bcab76b
Compare
Now this installs avalanchego version "v1.7.16" for every e2e test |
The e2e test now installs avalanchego via https://docs.rs/crate/avalanche-installer/0.0.3.