Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kubie for openSUSE:Factory checked in at 2021-02-17 18:12:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kubie (Old) and /work/SRC/openSUSE:Factory/.kubie.new.28504 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kubie" Wed Feb 17 18:12:39 2021 rev:3 rq:873059 version:0.13.1 Changes: -------- --- /work/SRC/openSUSE:Factory/kubie/kubie.changes 2021-02-04 20:24:53.598901089 +0100 +++ /work/SRC/openSUSE:Factory/.kubie.new.28504/kubie.changes 2021-02-17 18:13:29.218036173 +0100 @@ -1,0 +2,12 @@ +Wed Feb 17 09:05:37 UTC 2021 - romb...@apache.org + +- Update to version 0.13.1: + * Version 0.13.1 + * Repair macos build (#61) + * Version 0.13.0 + * Use fixed version of image in Github test actions + * Add option to disable namespace validation (#60) + * Build arm64 binary on macos-10.15 + * Run tests for pull requests + +------------------------------------------------------------------- Old: ---- kubie-0.12.1.tar.gz New: ---- kubie-0.13.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kubie.spec ++++++ --- /var/tmp/diff_new_pack.SlGRvg/_old 2021-02-17 18:13:30.170036952 +0100 +++ /var/tmp/diff_new_pack.SlGRvg/_new 2021-02-17 18:13:30.174036955 +0100 @@ -19,7 +19,7 @@ %global rustflags '-Clink-arg=-Wl,-z,relro,-z,now' Name: kubie -Version: 0.12.1 +Version: 0.13.1 Release: 0 Summary: A Kubernetes context switcher License: Zlib ++++++ _service ++++++ --- /var/tmp/diff_new_pack.SlGRvg/_old 2021-02-17 18:13:30.214036988 +0100 +++ /var/tmp/diff_new_pack.SlGRvg/_new 2021-02-17 18:13:30.214036988 +0100 @@ -5,7 +5,7 @@ <param name="exclude">.git</param> <param name="versionformat">@PARENT_TAG@</param> <param name="versionrewrite-pattern">v(.*)</param> - <param name="revision">v0.12.1</param> + <param name="revision">v0.13.1</param> <param name="changesgenerate">enable</param> </service> <service name="recompress" mode="disabled"> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.SlGRvg/_old 2021-02-17 18:13:30.238037008 +0100 +++ /var/tmp/diff_new_pack.SlGRvg/_new 2021-02-17 18:13:30.238037008 +0100 @@ -1,4 +1,4 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/sbstp/kubie</param> - <param name="changesrevision">f1f1c5317339793de6c71e9f506de4fc64ecfa4e</param></service></servicedata> \ No newline at end of file + <param name="changesrevision">e08534ef8955f4512009804b6fdb71fd77fa17fc</param></service></servicedata> \ No newline at end of file ++++++ kubie-0.12.1.tar.gz -> kubie-0.13.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kubie-0.12.1/.github/workflows/release.yml new/kubie-0.13.1/.github/workflows/release.yml --- old/kubie-0.12.1/.github/workflows/release.yml 2021-01-10 18:52:13.000000000 +0100 +++ new/kubie-0.13.1/.github/workflows/release.yml 2021-02-16 06:01:57.000000000 +0100 @@ -7,7 +7,7 @@ jobs: build-linux-amd64-static: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 @@ -32,30 +32,30 @@ tag: ${{ github.ref }} build-macos-amd64: - runs-on: macos-latest - steps: - - uses: actions/checkout@v2 - - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - - uses: actions-rs/cargo@v1 - with: - command: build - args: --release - - run: strip target/release/kubie - - run: ls -lh target/release/ - - - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: target/release/kubie - asset_name: kubie-darwin-amd64 - tag: ${{ github.ref }} + runs-on: macos-10.15 + steps: + - uses: actions/checkout@v2 + + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - uses: actions-rs/cargo@v1 + with: + command: build + args: --release + - run: strip target/release/kubie + - run: ls -lh target/release/ + + - uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: target/release/kubie + asset_name: kubie-darwin-amd64 + tag: ${{ github.ref }} build-macos-arm64: - runs-on: macos-11.0 + runs-on: macos-10.15 steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 @@ -63,7 +63,7 @@ toolchain: stable target: aarch64-apple-darwin - - run: SDKROOT=$(xcrun -sdk macosx11.0 --show-sdk-path) MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx11.0 --show-sdk-platform-version) cargo build --release --target aarch64-apple-darwin + - run: SDKROOT=$(xcrun --sdk macosx --show-sdk-path) MACOSX_DEPLOYMENT_TARGET=11.0 cargo build --release --target aarch64-apple-darwin - run: strip target/aarch64-apple-darwin/release/kubie - run: ls -lh target/aarch64-apple-darwin/release/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kubie-0.12.1/.github/workflows/test.yml new/kubie-0.13.1/.github/workflows/test.yml --- old/kubie-0.12.1/.github/workflows/test.yml 2021-01-10 18:52:13.000000000 +0100 +++ new/kubie-0.13.1/.github/workflows/test.yml 2021-02-16 06:01:57.000000000 +0100 @@ -1,10 +1,14 @@ name: Test -on: push +on: + push: + branches: + - master + pull_request: jobs: - test-linux: - runs-on: ubuntu-latest + test-linux-amd64: + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 @@ -16,8 +20,8 @@ command: test args: --all-features - test-macos: - runs-on: macos-latest + test-macos-amd64: + runs-on: macos-10.15 steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 @@ -28,3 +32,16 @@ with: command: test args: --all-features + + # We use an amd64 machine to cross compile for arm64. We cannot run the tests, + # only verify that the project compiles well. + build-macos-arm64: + runs-on: macos-10.15 + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: aarch64-apple-darwin + + - run: SDKROOT=$(xcrun --sdk macosx --show-sdk-path) MACOSX_DEPLOYMENT_TARGET=11.0 cargo build --all-features --target aarch64-apple-darwin diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kubie-0.12.1/Cargo.lock new/kubie-0.13.1/Cargo.lock --- old/kubie-0.12.1/Cargo.lock 2021-01-10 18:52:13.000000000 +0100 +++ new/kubie-0.13.1/Cargo.lock 2021-02-16 06:01:57.000000000 +0100 @@ -335,7 +335,7 @@ [[package]] name = "kubie" -version = "0.12.1" +version = "0.13.1" dependencies = [ "anyhow", "attohttpc", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kubie-0.12.1/Cargo.toml new/kubie-0.13.1/Cargo.toml --- old/kubie-0.12.1/Cargo.toml 2021-01-10 18:52:13.000000000 +0100 +++ new/kubie-0.13.1/Cargo.toml 2021-02-16 06:01:57.000000000 +0100 @@ -11,7 +11,7 @@ name = "kubie" readme = "README.md" repository = "https://github.com/sbstp/kubie" -version = "0.12.1" +version = "0.13.1" [dependencies] anyhow = "1" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kubie-0.12.1/README.md new/kubie-0.13.1/README.md --- old/kubie-0.12.1/README.md 2021-01-10 18:52:13.000000000 +0100 +++ new/kubie-0.13.1/README.md 2021-02-16 06:01:57.000000000 +0100 @@ -122,6 +122,13 @@ # When using fish, show context and namespace on the right-hand side. # Default: false fish_use_rprompt: false + +# Behavior +behavior: + # Make sure the namespace exists with `kubectl get namespaces` when switching + # namespaces. If you do not have the right to list namespaces, disable this. + # Default: true + validate_namespaces: true ``` ## Future plans diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kubie-0.12.1/src/cmd/context.rs new/kubie-0.13.1/src/cmd/context.rs --- old/kubie-0.12.1/src/cmd/context.rs 2021-01-10 18:52:13.000000000 +0100 +++ new/kubie-0.13.1/src/cmd/context.rs 2021-02-16 06:01:57.000000000 +0100 @@ -37,10 +37,12 @@ kubeconfig.contexts[0].context.namespace.as_deref(), ); - if let Some(namespace_name) = namespace_name { - let namespaces = kubectl::get_namespaces(Some(&kubeconfig))?; - if !namespaces.iter().any(|x| x == namespace_name) { - eprintln!("Warning: namespace {} does not exist.", namespace_name); + if settings.behavior.validate_namespaces { + if let Some(namespace_name) = namespace_name { + let namespaces = kubectl::get_namespaces(Some(&kubeconfig))?; + if !namespaces.iter().any(|x| x == namespace_name) { + eprintln!("Warning: namespace {} does not exist.", namespace_name); + } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kubie-0.12.1/src/cmd/namespace.rs new/kubie-0.13.1/src/cmd/namespace.rs --- old/kubie-0.12.1/src/cmd/namespace.rs 2021-01-10 18:52:13.000000000 +0100 +++ new/kubie-0.13.1/src/cmd/namespace.rs 2021-02-16 06:01:57.000000000 +0100 @@ -20,7 +20,11 @@ return enter_namespace(settings, &mut session, recursive, None); } - let namespaces = kubectl::get_namespaces(None)?; + let namespaces = if settings.behavior.validate_namespaces { + kubectl::get_namespaces(None)? + } else { + vec![] + }; let namespace_name = match namespace_name { Some(s) if s == "-" => Some( @@ -29,7 +33,9 @@ .context("There is not previous namespace to switch to")? .to_string(), ), - Some(s) if !namespaces.contains(&s) => return Err(anyhow!("'{}' is not a valid namespace for the context", s)), + Some(s) if settings.behavior.validate_namespaces && !namespaces.contains(&s) => { + return Err(anyhow!("'{}' is not a valid namespace for the context", s)) + } None => match select_or_list_namespace()? { SelectResult::Selected(s) => Some(s), _ => return Ok(()), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kubie-0.12.1/src/settings.rs new/kubie-0.13.1/src/settings.rs --- old/kubie-0.12.1/src/settings.rs 2021-01-10 18:52:13.000000000 +0100 +++ new/kubie-0.13.1/src/settings.rs 2021-02-16 06:01:57.000000000 +0100 @@ -37,6 +37,8 @@ pub configs: Configs, #[serde(default)] pub prompt: Prompt, + #[serde(default)] + pub behavior: Behavior, } impl Settings { @@ -87,6 +89,7 @@ shell: Default::default(), configs: Configs::default(), prompt: Prompt::default(), + behavior: Behavior::default(), } } } @@ -147,6 +150,20 @@ } } } + +#[derive(Debug, Deserialize)] +pub struct Behavior { + #[serde(default = "def_bool_true")] + pub validate_namespaces: bool, +} + +impl Default for Behavior { + fn default() -> Self { + Behavior { + validate_namespaces: true, + } + } +} fn def_bool_true() -> bool { true ++++++ vendor.tar.xz ++++++ /work/SRC/openSUSE:Factory/kubie/vendor.tar.xz /work/SRC/openSUSE:Factory/.kubie.new.28504/vendor.tar.xz differ: char 27, line 1