Skip to content

Commit

Permalink
Implement async compression (#22)
Browse files Browse the repository at this point in the history
* feat: support async compression

* feat: update dependencies and improve build process

- Updated .gitignore to consolidate vorpal-related entries.
- Added new dependencies to Cargo.lock and Cargo.toml, including `futures`, `process-stream`, and `tap`.
- Modified example/rust/vorpal.rs to use `coreutils` instead of `busybox`.
- Updated flake.nix with a new `cargoSha256` value.
- Simplified justfile by removing redundant profiles and adding a `clean` task.
- Fixed key directory path in src/service/build/mod.rs.
- Replaced `tokio::process::Command` with `process_stream::Process` in src/service/build/run_build.rs for better process handling.

* Add tracing and converting all printlns to info logs (#20)

* feat: add tracing dependencies, update cargoSha256

- Add `tracing` and `tracing-subscriber` dependencies to `Cargo.toml`
and `Cargo.lock`
- Update `cargoSha256` in `flake.nix` to reflect new dependencies
- Implement tracing level configuration in `src/command/mod.rs`

* refactor: remove unused imports and replace println with logging

- Remove `tracing_subscriber::layer::SubscriberExt` import as it's unused.
- Replace `println!` with appropriate logging macros (`info`, `debug`, `error`) across various modules for better log management and consistency.
- Adjust log messages to follow a consistent format, enhancing readability and maintainability of log output.

* Refactor code for enhanced readability and flexibility (#21)

Co-authored-by: Erik Reinert <[email protected]>

* feat: support async compression

* feat: replace all error! with returned responses to client

* refactor: remove unused import and improve compress_tar_gz function

- Removed unused import `PathBuf` from `src/service/proxy/package/mod.rs`.
- Added `OsStr` and `info` imports in `src/store/mod.rs`.
- Refactored `compress_tar_gz` function to use generic parameters for better flexibility and type safety.
- Simplified the `append_path_with_name` and `append_dir_all` calls by removing unnecessary clones.

* chore(logging): replace println! with info! for better logging consistency

Replaced println! statements with info! macro to ensure consistent logging practices across the codebase. This change affects the logging of prepared gzip and bzip2 sources in the prepare function.

* fix: update cargoSha256 hash for buildRustPackage

The cargoSha256 hash for the buildRustPackage has been updated from "sha256-I9yYNZEGJml2MyLK6BshNro7wFpn8MdZpUeGyMJs2o0=" to "sha256-VrAN1joJAs7puM76oyHIByNxovhDrp6t2Xw2FiG5tT4=". This change ensures the integrity and correctness of the package dependencies.

* refactor: simplify error handling and source preparation logic

- Refactored error handling in `run_prepare.rs` to use `if let` for better readability and maintainability.
- Simplified the source kind preparation logic in `package/mod.rs` by replacing `match` with `if let` statements.
- Improved code clarity and reduced nesting by handling specific MIME types directly in conditional blocks.

---------

Co-authored-by: Andreas Diepenbrock <[email protected]>
Co-authored-by: Brian <[email protected]>
  • Loading branch information
3 people authored Jun 9, 2024
1 parent 26a918f commit f5c6acb
Show file tree
Hide file tree
Showing 13 changed files with 716 additions and 225 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.direnv
/target
/vorpal-build
/vorpal-cli
/vorpal
222 changes: 212 additions & 10 deletions Cargo.lock

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

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,25 @@ path = "src/bin/main.rs"

[dependencies]
anyhow = "1.0"
async-compression = { version = "0.4", features = ["all"] }
clap = { version = "4.5", features = ["derive"] }
dirs = "5.0"
flate2 = "1.0"
futures-util = "0.3"
git2 = "0.18"
hex = "0.4"
infer = "0.3"
process-stream = "0.3"
prost = "0.12"
rand = "0.8"
rsa = { version = "0.9", features = ["sha2"] }
rusqlite = { version = "0.31", features = ["bundled"] }
sha256 = "1.5"
reqwest = { version = "0.12", features = ["json"] }
tar = "0.4"
tempfile = "3.10"
tera = { version = "1", default-features = false }
tokio = { version = "1.37", features = ["full"] }
tokio-stream = "0.1"
tokio-tar = "0.3"
tonic = "0.11"
url = "2.5"
uuid = { version = "1.8", features = ["v7"] }
Expand Down
Loading

0 comments on commit f5c6acb

Please sign in to comment.