-
Notifications
You must be signed in to change notification settings - Fork 489
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
[Merged by Bors] - feat: fvm switch command #3597
[Merged by Bors] - feat: fvm switch command #3597
Conversation
export PATH="$PATH:$HOME/.fvm/bin" | ||
export PATH="$PATH:$HOME/.fvm/bin:$HOME/.fluvio/bin" |
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.
This allows the user to have both:
~/.fvm/bin
~/.fluvio/bin
In their PATH after executing source ~/.fvm/env
2c506b7
to
5d03acc
Compare
I just addressed suggestions here: 5d03acc! |
crates/fluvio-version-manager/src/command/switch/version_directory.rs
Outdated
Show resolved
Hide resolved
crates/fluvio-version-manager/src/command/switch/version_directory.rs
Outdated
Show resolved
Hide resolved
c8f9ef2
to
313df57
Compare
65f2b91
to
4216b72
Compare
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.
Much better. A just couple of issues on testing active
crates/fluvio-version-manager/src/command/switch/version_directory.rs
Outdated
Show resolved
Hide resolved
crates/fluvio-version-manager/src/command/switch/version_directory.rs
Outdated
Show resolved
Hide resolved
4216b72
to
23d73d9
Compare
- Check manifest integrity by using a `VersionManifest` instance instead of a `PathBuf` to the manifest - Borrow over clone on `SwitchOpt` version - Clarifications on procedures - Isolate `update_settings_toml` to test independently - Ensure files are copied to target directory - Use string literal in tests for comparison - Duplicate user's flow in E2E test - Uses inline invalid Manifest JSON (impl `FromStr`) - Readback `Settings` after create and assert on values - Introduce fixtures for PackageSet - Move `switch` logic to `VersionDirectory` - Use hardcoded Shasums to test against - Perform exact comparison for Sha256 Checksums - Introduce `update_from_manifest` to update `settings.toml` form a `VersionManifest` - Verify updates in `settings.toml` with E2E Smoke Tests - Compare Sha256Sum on E2E Smoke Tests - Move `Settings` `update_from_manifest` to `VersionManager` - Use simple file to test shasums - Explicit tests on single file - Test settings is updated on `set_active`
23d73d9
to
d11f3e5
Compare
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.
LGTM. Thanks for nice sets of unit testing and CLI testing.
Copying based switch need more testing and fundamentally only works for very small binaries. but this is good enough for now and resolve that question later
🙌🏻
Looking forward into it! |
bors r+ |
Provides support to switch between Fluvio Versions using `fvm switch` command. The `fvm switch` command performs a side effect which involves updating `settings.toml` file in `~/.fvm` which is used to keep track of the active channel and version. Also updates the `~/.fvm/env` file to include `~/.fluvio/bin` in the host's PATH when running `source ~/.fvm/env`. ## Demo https://github.com/infinyon/fluvio/assets/34756077/f81960ee-b557-4720-8691-8f4afb79a84f Co-authored-by: Alan Chen <alan@infinyon.com>
Build failed: |
Errors doesn't look related to PR: https://github.com/infinyon/fluvio/actions/runs/6520022049/job/17707174387#step:5:1107 So I will rerun! |
bors r+ |
Provides support to switch between Fluvio Versions using `fvm switch` command. The `fvm switch` command performs a side effect which involves updating `settings.toml` file in `~/.fvm` which is used to keep track of the active channel and version. Also updates the `~/.fvm/env` file to include `~/.fluvio/bin` in the host's PATH when running `source ~/.fvm/env`. ## Demo https://github.com/infinyon/fluvio/assets/34756077/f81960ee-b557-4720-8691-8f4afb79a84f Co-authored-by: Alan Chen <alan@infinyon.com>
Pull request successfully merged into master. Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
Provides support to switch between Fluvio Versions using
fvm switch
command.The
fvm switch
command performs a side effect which involves updatingsettings.toml
file in
~/.fvm
which is used to keep track of the active channel and version.Also updates the
~/.fvm/env
file to include~/.fluvio/bin
in the host's PATHwhen running
source ~/.fvm/env
.Demo
demo.mp4