From ab17df086a060ace353ff9fba2add7e2a3e574d6 Mon Sep 17 00:00:00 2001 From: Bryant Biggs Date: Tue, 30 Jul 2024 09:10:37 -0400 Subject: [PATCH] chore: Fix whitespace --- .github/workflows/ci.yml | 22 +++++++++---------- .github/workflows/publish.yml | 1 - crates/client/examples/container_spec.json | 2 +- .../introspection/v1/introspection.proto | 2 +- crates/runc-shim/Cargo.toml | 2 +- crates/runc-shim/README.md | 2 +- crates/runc/README.md | 4 ++-- crates/shim-protos/vendor/README.md | 2 +- .../containerd/cgroups/stats/v1/metrics.proto | 2 +- crates/snapshots/README.md | 2 +- 10 files changed, 20 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 790d7de7..38b0d050 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,8 +30,8 @@ jobs: - run: cargo clippy --all-targets -- -D warnings - run: cargo clippy --all-targets --all-features -- -D warnings - - # the shim has sync code that is not covered when running with --all-features + + # the shim has sync code that is not covered when running with --all-features - run: cargo clippy -p containerd-shim --all-targets -- -D warnings - run: cargo doc --no-deps --features docs @@ -49,10 +49,10 @@ jobs: - run: ./scripts/install-protobuf.sh shell: bash - run: cargo check --examples --tests -p containerd-shim -p containerd-shim-protos -p containerd-client - + - run: rustup toolchain install nightly --component rustfmt - run: cargo +nightly fmt -p containerd-shim -p containerd-shim-protos -p containerd-client -- --check --files-with-diff - + - run: cargo clippy -p containerd-shim -p containerd-shim-protos -- -D warnings - run: cargo doc --no-deps -p containerd-shim -p containerd-shim-protos -p containerd-client env: @@ -76,8 +76,8 @@ jobs: mkdir -p /tmp/dummy-xdr sudo -E $(command -v cargo) test sudo -E $(command -v cargo) test --all-features - - # the shim has sync code that is not covered when running with --all-features + + # the shim has sync code that is not covered when running with --all-features sudo -E $(command -v cargo) test -p containerd-shim if: ${{ !contains(matrix.os, 'windows') }} env: @@ -171,7 +171,7 @@ jobs: run: | sudo -E PATH=$PATH make integration working-directory: src/github.com/containerd/containerd - + windows-integration: name: Windows Integration runs-on: ${{ matrix.os }} @@ -217,11 +217,11 @@ jobs: $ErrorActionPreference = "Stop" get-service containerd - $env:TTRPC_ADDRESS="\\.\pipe\containerd-containerd.ttrpc" + $env:TTRPC_ADDRESS="\\.\pipe\containerd-containerd.ttrpc" - # run the example - cargo run -p containerd-shim --example skeleton -- -namespace default -id 1234 -address "\\.\pipe\containerd-containerd" -publish-binary ./bin/containerd start - ps skeleton + # run the example + cargo run -p containerd-shim --example skeleton -- -namespace default -id 1234 -address "\\.\pipe\containerd-containerd" -publish-binary ./bin/containerd start + ps skeleton cargo run -p containerd-shim-protos --example shim-proto-connect \\.\pipe\containerd-shim-17630016127144989388-pipe $skeleton = get-process skeleton -ErrorAction SilentlyContinue if ($skeleton) { exit 1 } diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 95afa588..1dd6ecef 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -68,4 +68,3 @@ jobs: run: | git tag $TAG git push origin $TAG - diff --git a/crates/client/examples/container_spec.json b/crates/client/examples/container_spec.json index ea26e4fc..db3ecfd1 100644 --- a/crates/client/examples/container_spec.json +++ b/crates/client/examples/container_spec.json @@ -155,4 +155,4 @@ "/proc/sysrq-trigger" ] } -} \ No newline at end of file +} diff --git a/crates/client/vendor/github.com/containerd/containerd/api/services/introspection/v1/introspection.proto b/crates/client/vendor/github.com/containerd/containerd/api/services/introspection/v1/introspection.proto index f27f1912..d3db015d 100644 --- a/crates/client/vendor/github.com/containerd/containerd/api/services/introspection/v1/introspection.proto +++ b/crates/client/vendor/github.com/containerd/containerd/api/services/introspection/v1/introspection.proto @@ -110,4 +110,4 @@ message DeprecationWarning { string id = 1; string message = 2; google.protobuf.Timestamp last_occurrence = 3; -} \ No newline at end of file +} diff --git a/crates/runc-shim/Cargo.toml b/crates/runc-shim/Cargo.toml index b387b135..adf18a34 100644 --- a/crates/runc-shim/Cargo.toml +++ b/crates/runc-shim/Cargo.toml @@ -45,4 +45,4 @@ tokio = { workspace = true, features = ["full"] } [target.'cfg(target_os = "linux")'.dependencies] cgroups-rs.workspace = true -nix = { workspace = true, features = ["event"] } \ No newline at end of file +nix = { workspace = true, features = ["event"] } diff --git a/crates/runc-shim/README.md b/crates/runc-shim/README.md index d8a9585d..e9717b72 100644 --- a/crates/runc-shim/README.md +++ b/crates/runc-shim/README.md @@ -42,4 +42,4 @@ In addition, we also run 100 pods and collect the total memory overhead. | :----------------------------------------------------------- | :----------------- | :---------------- | | containerd-shim-runc-v2 | 11.02MB | 1106.52MB | | containerd-shim-runc-v2-rs(sync) | 3.45MB | 345.39MB | - | containerd-shim-runc-v2-rs(async, limited to 2 work threads) | 3.90MB | 396.83MB | \ No newline at end of file + | containerd-shim-runc-v2-rs(async, limited to 2 work threads) | 3.90MB | 396.83MB | diff --git a/crates/runc/README.md b/crates/runc/README.md index a54799ba..54b0292d 100644 --- a/crates/runc/README.md +++ b/crates/runc/README.md @@ -5,7 +5,7 @@ [![Crates.io](https://img.shields.io/crates/l/containerd-shim)](https://github.com/containerd/rust-extensions/blob/main/LICENSE) [![CI](https://github.com/containerd/rust-extensions/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/containerd/rust-extensions/actions/workflows/ci.yml) -A crate for consuming the runc binary in your Rust applications, similar to [go-runc](https://github.com/containerd/go-runc) for Go. +A crate for consuming the runc binary in your Rust applications, similar to [go-runc](https://github.com/containerd/go-runc) for Go. This crate is based on archived [rust-runc](https://github.com/pwFoo/rust-runc). ## Usage @@ -29,7 +29,7 @@ async fn main() { let opts = runc::options::CreateOpts::new() .pid_file("/path/to/pid/file") .no_pivot(true); - + client.create("container-id", "path/to/bundle", Some(&opts)).unwrap(); } ``` diff --git a/crates/shim-protos/vendor/README.md b/crates/shim-protos/vendor/README.md index ac214994..806ad4df 100644 --- a/crates/shim-protos/vendor/README.md +++ b/crates/shim-protos/vendor/README.md @@ -7,4 +7,4 @@ Proto files are copy-pasted directly from upstream repos: + https://github.com/protocolbuffers/protobuf + https://github.com/gogo/protobuf + https://github.com/containerd/cgroups -+ https://github.com/microsoft/hcsshim \ No newline at end of file ++ https://github.com/microsoft/hcsshim diff --git a/crates/shim-protos/vendor/github.com/containerd/cgroups/stats/v1/metrics.proto b/crates/shim-protos/vendor/github.com/containerd/cgroups/stats/v1/metrics.proto index 32a2d3fb..b3f6cc37 100644 --- a/crates/shim-protos/vendor/github.com/containerd/cgroups/stats/v1/metrics.proto +++ b/crates/shim-protos/vendor/github.com/containerd/cgroups/stats/v1/metrics.proto @@ -155,4 +155,4 @@ message CgroupStats { uint64 nr_uninterruptible = 4; // number of tasks waiting on IO uint64 nr_io_wait = 5; -} \ No newline at end of file +} diff --git a/crates/snapshots/README.md b/crates/snapshots/README.md index f2a75681..3696c22a 100644 --- a/crates/snapshots/README.md +++ b/crates/snapshots/README.md @@ -87,4 +87,4 @@ Server::builder() .serve_with_incoming(incoming) .await .expect("Serve failed"); -``` \ No newline at end of file +```