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

[Merged by Bors] - feat(fvm): install fluvio versions #3576

Conversation

EstebanBorai
Copy link
Contributor

@EstebanBorai EstebanBorai commented Oct 4, 2023

Introduces fvm install, similar to nvm install, downloads artifacts for the specific
Fluvio Version and stores them in ~/.fvm/versions for future use.

Along with downloading the artifacts, other routines are involved in this process:

  1. Check binary Sha256 Sums
  2. Provide executable permissions on Unix systems
  3. Creating a manifest.json which helps determine the binaries versions

At this point no Fluvio Version is set as active/default, only the download of binaries is addressed as of this PR.


Demo

CleanShot.2023-10-04.at.16.16.14.mp4

@EstebanBorai EstebanBorai force-pushed the 3573-fvm-package-set-downloads branch 6 times, most recently from 3fc2afc to a1e1b64 Compare October 4, 2023 18:45
@ajhunyady
Copy link
Contributor

Does this command work with out parameters? I assume fvm install works (not in the video).

@EstebanBorai
Copy link
Contributor Author

Does this command work with out parameters? I assume fvm install works (not in the video).

Yeah! By default fvm install will download stable

bors bot pushed a commit that referenced this pull request Oct 5, 2023
As these are also being used for FVM on #3576.
@EstebanBorai EstebanBorai marked this pull request as ready for review October 5, 2023 16:11
crates/fluvio-version-manager/src/command/install.rs Outdated Show resolved Hide resolved
crates/fluvio-version-manager/src/command/install.rs Outdated Show resolved Hide resolved
crates/fluvio-version-manager/src/command/install.rs Outdated Show resolved Hide resolved
crates/fluvio-version-manager/src/command/install.rs Outdated Show resolved Hide resolved
crates/fluvio-version-manager/src/command/install.rs Outdated Show resolved Hide resolved
tests/cli/fvm_smoke_tests/fvm_basic.bats Outdated Show resolved Hide resolved
tests/cli/fvm_smoke_tests/fvm_basic.bats Outdated Show resolved Hide resolved
tests/cli/fvm_smoke_tests/fvm_basic.bats Show resolved Hide resolved
tests/cli/fvm_smoke_tests/fvm_basic.bats Show resolved Hide resolved
tests/cli/fvm_smoke_tests/fvm_basic.bats Outdated Show resolved Hide resolved
@sehz
Copy link
Contributor

sehz commented Oct 5, 2023

Also, the download could fail at any time. So in that case, the installation would need to be repeated

@EstebanBorai
Copy link
Contributor Author

Also, the download could fail at any time. So in that case, the installation would need to be repeated

To be sure, like adding a retry?

@sehz
Copy link
Contributor

sehz commented Oct 5, 2023

Assume that the user should be able to retry the installation. that should be covered under CLI test

@EstebanBorai
Copy link
Contributor Author

@sehz I think it would be nice to add some logic to delete existing version directory before copying if the directory already exists. What do you think?

CleanShot 2023-10-05 at 22 21 17

@EstebanBorai
Copy link
Contributor Author

@sehz I did different changes here: d07daa5, they are listed in the commit message. Will continue with remaining! Let we know your thoughts!

@EstebanBorai
Copy link
Contributor Author

Im addressing tests at the end, when all behavior changes are applied!

@sehz
Copy link
Contributor

sehz commented Oct 6, 2023

As a general principle, the least changes to the user's file system are better. deleting directory is destructive operation which should be avoided much as possible

@EstebanBorai
Copy link
Contributor Author

EstebanBorai commented Oct 6, 2023

As a general principle, the least changes to the user's file system are better. deleting directory is destructive operation which should be avoided much as possible

Agree! In that example Im copying the binaries but as its seen FS complains. I will try with atomic copy and see if theres a different behavior.

@EstebanBorai
Copy link
Contributor Author

@sehz here 81255f9 we are handling the already existent version.

@EstebanBorai EstebanBorai requested a review from sehz October 6, 2023 15:01
@EstebanBorai EstebanBorai force-pushed the 3573-fvm-package-set-downloads branch 2 times, most recently from 2812263 to 24a0cd7 Compare October 7, 2023 20:27
@EstebanBorai EstebanBorai force-pushed the 3573-fvm-package-set-downloads branch 10 times, most recently from d0f37ab to 48c9bda Compare October 11, 2023 22:53
Copy link
Contributor

@sehz sehz left a comment

Choose a reason for hiding this comment

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

LGTM. Nice CLI testing

@EstebanBorai
Copy link
Contributor Author

LGTM. Nice CLI testing

Thanks for the support!

@@ -1130,7 +1130,8 @@ jobs:
- name: Run FVM smoke tests
if: matrix.test == 'fvm'
timeout-minutes: 20
run: make FVM_BIN=~/bin/fvm cli-fvm-smoke
run: |
make FVM_BIN=~/bin/fvm HUB_REGISTRY_URL="https://hub-dev.infinyon.cloud" cli-fvm-smoke
Copy link
Contributor

Choose a reason for hiding this comment

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

move HUB_REGISTRY_URL to env

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Applying in next PR!

@EstebanBorai
Copy link
Contributor Author

bors r+

bors bot pushed a commit that referenced this pull request Oct 12, 2023
Introduces `fvm install`, similar to `nvm install`, downloads artifacts for the specific
Fluvio Version and stores them in `~/.fvm/versions` for future use.

Along with downloading the artifacts, other routines are involved in this process:

1. Check binary Sha256 Sums
2. Provide executable permissions on Unix systems
3. Creating a `manifest.json` which helps determine the binaries versions

At this point no Fluvio Version is set as active/default, only the download of binaries is addressed as of this PR.

---

## Demo


https://github.com/infinyon/fluvio/assets/34756077/93b2115f-09ae-476f-b2ba-fbb1f9db2461
@bors
Copy link

bors bot commented Oct 12, 2023

Build failed:

@morenol
Copy link
Contributor

morenol commented Oct 12, 2023

bors retry

bors bot pushed a commit that referenced this pull request Oct 12, 2023
Introduces `fvm install`, similar to `nvm install`, downloads artifacts for the specific
Fluvio Version and stores them in `~/.fvm/versions` for future use.

Along with downloading the artifacts, other routines are involved in this process:

1. Check binary Sha256 Sums
2. Provide executable permissions on Unix systems
3. Creating a `manifest.json` which helps determine the binaries versions

At this point no Fluvio Version is set as active/default, only the download of binaries is addressed as of this PR.

---

## Demo


https://github.com/infinyon/fluvio/assets/34756077/93b2115f-09ae-476f-b2ba-fbb1f9db2461
@bors
Copy link

bors bot commented Oct 12, 2023

Build failed:

@EstebanBorai
Copy link
Contributor Author

bors r+

bors bot pushed a commit that referenced this pull request Oct 12, 2023
Introduces `fvm install`, similar to `nvm install`, downloads artifacts for the specific
Fluvio Version and stores them in `~/.fvm/versions` for future use.

Along with downloading the artifacts, other routines are involved in this process:

1. Check binary Sha256 Sums
2. Provide executable permissions on Unix systems
3. Creating a `manifest.json` which helps determine the binaries versions

At this point no Fluvio Version is set as active/default, only the download of binaries is addressed as of this PR.

---

## Demo


https://github.com/infinyon/fluvio/assets/34756077/93b2115f-09ae-476f-b2ba-fbb1f9db2461
@bors
Copy link

bors bot commented Oct 12, 2023

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.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title feat(fvm): install fluvio versions [Merged by Bors] - feat(fvm): install fluvio versions Oct 12, 2023
@bors bors bot closed this Oct 12, 2023
@EstebanBorai EstebanBorai linked an issue Oct 12, 2023 that may be closed by this pull request
20 tasks
@EstebanBorai EstebanBorai deleted the 3573-fvm-package-set-downloads branch October 12, 2023 14:23
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.

FVM - Package Set Downloads Fluvio Version Manager
4 participants