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 update command #3645

Closed

Conversation

EstebanBorai
Copy link
Contributor

@EstebanBorai EstebanBorai commented Oct 31, 2023

Introduces the fvm update command which checks current channel to be up to date.
Channels stable and latest are both "updateable", in the other hand the static
tag is not "updateable".

How it works

When a user has either stable or latest as the active channel, FVM fetches the most
recent release for that channel.

  • Stable: Will check if the upstream version is greater than the current using Semver.
  • Latest: Will check if the upstream tag is different. We cant tell which is greater because we use SHAs to determine versions.
  • Static Tag: When the user has an static tag as version using for instance fvm install 0.10.14, FVM will not attempt to update.

Then the same process as for fvm install is followed, this is why the logic is first
disengaged from fvm install into its own module on commit: 0a8b819.

In order to determine the current version for the channel FVM uses the already implemented settings.toml file.

Demo

CleanShot 2023-10-31 at 20 58 13

By changing the version in the settings.toml, we can mimic an outdated version for the active channel.

@EstebanBorai EstebanBorai linked an issue Oct 31, 2023 that may be closed by this pull request
@EstebanBorai EstebanBorai force-pushed the 3644-fvm-update-command branch 2 times, most recently from 5ce57bc to 719631b Compare October 31, 2023 23:49
@EstebanBorai EstebanBorai linked an issue Oct 31, 2023 that may be closed by this pull request
@ajhunyady
Copy link
Contributor

ajhunyady commented Nov 1, 2023

What happens if I run fvm update and there is no new image?

@EstebanBorai
Copy link
Contributor Author

What happens if I run fvm update and there is no new image?

You will see:

You are up to date

@EstebanBorai
Copy link
Contributor Author

What happens if I run fvm update and there is no new image?

Just added a test for this here: b592395#diff-9e90aaedcb1d6ed2a0448f1c8fb5306d2c9788f1ed82e0d22619efb9f2f277e2R745-R768

@EstebanBorai EstebanBorai marked this pull request as ready for review November 1, 2023 00:42
Copy link
Contributor

@digikata digikata left a comment

Choose a reason for hiding this comment

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

Looks good!

@EstebanBorai
Copy link
Contributor Author

bors r+

bors bot pushed a commit that referenced this pull request Nov 1, 2023
Introduces the `fvm update` command which checks current channel to be up to date.
Channels `stable` and `latest` are both "updateable", in the other hand the static
tag is not "updateable".

### How it works

When a user has either `stable` or `latest` as the active channel, FVM fetches the most
recent release for that channel.

- Stable: Will check if the upstream version is greater than the current using Semver.
- Latest: Will check if the upstream tag is different. We cant tell which is greater because we use SHAs to determine versions.
- Static Tag: When the user has an static tag as version using for instance `fvm install 0.10.14`, FVM will not attempt to update.

Then the same process as for `fvm install` is followed, this is why the logic is first
disengaged from `fvm install` into its own module on commit: [0a8b819](0a8b819).

In order to determine the current version for the channel FVM uses the already implemented `settings.toml` file.

## Demo

![CleanShot 2023-10-31 at 20 58 13](https://github.com/infinyon/fluvio/assets/34756077/e96d7ac1-043a-4f0b-aa71-2641be254699)

> By changing the version in the settings.toml, we can mimic an outdated version for the active channel.
Copy link

bors bot commented Nov 1, 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 update command [Merged by Bors] - feat: fvm update command Nov 1, 2023
@bors bors bot closed this Nov 1, 2023
@EstebanBorai EstebanBorai deleted the 3644-fvm-update-command branch November 1, 2023 05:33
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 - Update Command
3 participants