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 self subcommand #3570

Closed
wants to merge 13 commits into from
52 changes: 50 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-musl
rust: [stable]
binary: [fluvio, fluvio-run, fluvio-test, fluvio-channel, smdk, fbm, cdk]
binary: [fluvio, fluvio-run, fluvio-test, fluvio-channel, smdk, fbm, cdk, fvm]
os: [ubuntu-latest]
env:
RUST_BACKTRACE: full
Expand Down Expand Up @@ -130,6 +130,10 @@ jobs:
if: matrix.binary == 'fbm'
run: make build-fbm

- name: Build fvm
if: matrix.binary == 'fvm'
run: make build-fvm

# Upload artifacts
- name: Upload artifact - ${{ matrix.binary }}
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -247,6 +251,28 @@ jobs:
rust-target: aarch64-apple-darwin
binary: fbm

# fvm
- os: ubuntu-latest
rust: stable
rust-target: arm-unknown-linux-gnueabihf
binary: fvm
- os: ubuntu-latest
rust: stable
rust-target: armv7-unknown-linux-gnueabihf
binary: fvm
- os: ubuntu-latest
rust: stable
rust-target: x86_64-pc-windows-gnu
binary: fvm.exe
- os: macos-12
rust: stable
rust-target: x86_64-apple-darwin
binary: fvm
- os: macos-12
rust: stable
rust-target: aarch64-apple-darwin
binary: fvm

env:
RUST_BACKTRACE: full
RUSTV: ${{ matrix.rust }}
Expand Down Expand Up @@ -341,6 +367,11 @@ jobs:
if: matrix.binary == 'fbm.exe'
run: make build-fbm

- name: Build fvm
timeout-minutes: 40
if: matrix.binary == 'fvm' || matrix.binary == 'fvm.exe'
run: make build-fvm

# Upload artifacts
- name: Upload artifact - ${{ matrix.binary }}
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -951,7 +982,7 @@ jobs:
os: [ubuntu-latest]
cluster_version: [stable, dev]
cli_version: [stable, dev]
test: [fluvio,smdk,cdk]
test: [fluvio,smdk,cdk,fvm]
# no need to test stable to stable
exclude:
- cluster_version: stable
Expand Down Expand Up @@ -1084,6 +1115,23 @@ jobs:
timeout-minutes: 20
run: make CDK_BIN=~/bin/cdk cli-cdk-smoke

# test fvm
- name: Download artifact - fvm
if: matrix.test == 'fvm'
uses: actions/download-artifact@v3
with:
name: fvm-x86_64-unknown-linux-musl
path: ~/bin
- name: mark fvm
if: matrix.test == 'fvm'
run: |
chmod +x ~/bin/fvm
echo "~/bin" >> $GITHUB_PATH
- name: Run FVM smoke tests
if: matrix.test == 'fvm'
timeout-minutes: 20
run: make FVM_BIN=~/bin/fvm cli-fvm-smoke

- name: Run diagnostics
if: ${{ !success() }}
timeout-minutes: 5
Expand Down
95 changes: 94 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ members = [
"crates/fluvio-test-case-derive",
"crates/fluvio-test-util",
"crates/fluvio-types",
"crates/fluvio-version-manager",
"crates/fluvio-connector-package",
"crates/fluvio-connector-deployer",
"crates/fluvio-connector-common",
Expand Down Expand Up @@ -84,6 +85,7 @@ criterion = "0.5.0"
crossbeam-channel = "0.5"
current_platform = { version = "0.2" }
derive_builder = "0.12.0"
dialoguer = "0.11.0"
directories = "5.0.0"
dirs = "5.0.0"
duct = { version = "0.13", default-features = false }
Expand Down Expand Up @@ -118,6 +120,7 @@ serde_yaml = { version = "0.9.0", default-features = false }
sha2 = { version = "0.10" }
siphasher = "1.0.0"
static_assertions = "1.1.0"
surf = "2.3.2"
syn = "2.0"
sysinfo = { version = "0.29.0", default-features = false }
tar = { version = "0.4.38", default-features = false }
Expand Down
2 changes: 0 additions & 2 deletions crates/fluvio-hub-util/src/fvm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ pub use api::Client;

pub const STABLE_VERSION_CHANNEL: &str = "stable";
pub const LATEST_VERSION_CHANNEL: &str = "latest";

#[allow(unused)]
pub const DEFAULT_PKGSET: &str = "default";

pub const ARM_UNKNOWN_LINUX_GNUEABIHF: &str = "arm-unknown-linux-gnueabihf";
Expand Down
2 changes: 1 addition & 1 deletion crates/fluvio-hub-util/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
mod fvm;
mod hubaccess;
mod package;
mod package_meta_ext;
mod utils;

pub mod keymgmt;
pub mod fvm;

use const_format::concatcp;

Expand Down
37 changes: 37 additions & 0 deletions crates/fluvio-version-manager/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[package]
name = "fluvio-version-manager"
version = "0.0.0"
edition = "2021"
authors = ["Fluvio Contributors <[email protected]>"]
description = "Fluvio Version Manager"
repository = "https://github.com/infinyon/fluvio"
license = "Apache-2.0"
publish = false

[[bin]]
name = "fvm"
path = "src/main.rs"

[dependencies]

# Workspace Dependencies
anyhow = { workspace = true }
async-std = { workspace = true, features = ["attributes"] }
clap = { workspace = true, features = ["std", "color", "derive", "help"] }
colored = { workspace = true }
comfy-table = { workspace = true }
dialoguer = { workspace = true }
dirs = { workspace = true }
hex = { workspace = true }
semver = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
sha2 = { workspace = true }
tempfile = { workspace = true }
tracing = { workspace = true }
toml = { workspace = true }
url = { workspace = true }

# Workspace Crates
fluvio-hub-util = { workspace = true }
fluvio-future = { workspace = true, features = ["subscriber"] }
Loading