Skip to content

Commit

Permalink
Upgrade rust and dependencies (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
robklg authored Dec 15, 2024
1 parent a622c6a commit 57c0827
Show file tree
Hide file tree
Showing 11 changed files with 96 additions and 57 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ name: build
# Update the RUST_VERSION here and in the Makefile when we upgrade
env:
CARGO_TERM_COLOR: always
RUST_VERSION: 1.78.0
RUST_VERSION: 1.83.0

on:
push:
Expand Down Expand Up @@ -285,7 +285,7 @@ jobs:
# env:
# GITHUB_TOKEN: ${{ github.token }}
- name: Download
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: ${{ env.file_name }}
path: ${{ env.file_dir }}
Expand Down Expand Up @@ -321,7 +321,7 @@ jobs:
uses: actions/checkout@v2

- name: Download linux musl
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: unftp_x86_64-unknown-linux-musl
path: ./x86_64-unknown-linux-musl
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
- [#184](https://github.com/bolcom/unFTP/pull/184) Support for Azure blob storage with [OpenDAL](https://github.com/apache/OpenDAL)
- [#185](https://github.com/bolcom/unFTP/pull/185) Support for shipping logs to [Google Logging](https://cloud.google.com/logging/docs/)
- [#196](https://github.com/bolcom/unFTP/pull/196) --auth-type is now mandatory to prevent security risks from omission or typos that could leave the FTP server open
- Upgraded dependencies
- Upgraded to Rust 1.83.0

## 2023-12-24 unftp v0.14.7

Expand Down
80 changes: 62 additions & 18 deletions Cargo.lock

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

30 changes: 15 additions & 15 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,36 +32,36 @@ features = ["shipper"]
version = "0.1.0"

[dependencies]
async-trait = "0.1.80"
async-trait = "0.1.83"
base64 = "0.22.1"
clap = { version = "3.2.25", features = ["derive", "env"] }
console-subscriber = { version = "0.3.0", optional = true }
flate2 = "1.0.30"
futures = "0.3.30"
flate2 = "1.0.35"
futures = "0.3.31"
http = "0.2.12"
hyper = { version = "0.14.29", features = ["server", "http1"] }
hyper = { version = "0.14.31", features = ["server", "http1"] }
hyper-rustls = "0.23.2"
lazy_static = "1.4.0"
lazy_static = "1.5.0"
libunftp = "0.20.1"
prometheus = { version = "0.13.4", features = ["process"] }
serde = { version = "1.0.203", features = ["derive"] }
serde_json = "1.0.117"
serde = { version = "1.0.216", features = ["derive"] }
serde_json = "1.0.133"
slog = { version = "2.7.0", features = ["max_level_trace", "release_max_level_info"] }
slog-async = "2.8.0"
slog-term = "2.9.1"
strum = { version = "0.26.2", features = ["derive"] }
strum_macros = "0.26.2"
thiserror = "1.0.61"
tokio = { version = "1.38.0", features = ["signal", "rt-multi-thread"] }
strum = { version = "0.26.3", features = ["derive"] }
strum_macros = "0.26.4"
thiserror = "1.0.69"
tokio = { version = "1.42.0", features = ["signal", "rt-multi-thread"] }
unftp-sbe-fs = "0.2.5"
unftp-sbe-gcs = { version = "0.2.6", optional = true }
unftp-sbe-opendal = { version = "0.0.1", optional = true }
opendal = { version = "0.47.1", optional = true }
opendal = { version = "0.47.3", optional = true }
unftp-auth-rest = { version = "0.2.6", optional = true }
unftp-auth-jsonfile = { version = "0.3.4", optional = true }
unftp-sbe-rooter = "0.2.1"
unftp-sbe-restrict = "0.1.2"
url = "2.5.2"
url = "2.5.4"

[target.'cfg(unix)'.dependencies]
unftp-auth-pam = { version = "0.2.5", optional = true }
Expand All @@ -87,10 +87,10 @@ musl = ["rest_auth", "cloud_storage", "jsonfile_auth", "azblob"]
docker = ["musl"]

[dev-dependencies]
pretty_assertions = "1.4.0"
pretty_assertions = "1.4.1"

[build-dependencies]
built = { version = "0.5.2", features = ["git2", "chrono"] }
built = { version = "0.7.5", features = ["cargo-lock", "git2", "chrono", "semver"] }

[profile.release]
debug = false
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RUST_VERSION=1.79.0
RUST_VERSION=1.83.0
DOCKER_TAG=$(shell git describe --tags)
DOCKER_TEMPLATES:=$(wildcard *.Dockerfile.template)
DOCKER_FILES=$(DOCKER_TEMPLATES:%.template=%)
Expand Down
10 changes: 1 addition & 9 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,5 @@ fn main() {
// uses the 'built' crate to generate a build.rs file with a bunch of build information. We then
// include this file in the app module.
fn generate_build_info() {
let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
let src = std::path::Path::new(&manifest_dir);
let dst = std::path::Path::new(&env::var("OUT_DIR").unwrap()).join("build-info.rs");
let mut opts = built::Options::default();
opts.set_dependencies(true);
opts.set_git(true);
opts.set_time(true);
built::write_built_file_with_opts(&opts, src, &dst)
.expect("Failed to acquire build-time information");
built::write_built_file().expect("Failed to acquire build-time information");
}
10 changes: 5 additions & 5 deletions crates/googlelog/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ shipper = []

[dependencies]
google-logging2 = "5.0.5"
serde_json = "1.0.117"
chrono = "0.4.38"
tokio = { version = "1.38.0", features = ["macros", "time", "rt-multi-thread"] }
serde_json = "1.0.133"
chrono = "0.4.39"
tokio = { version = "1.42.0", features = ["macros", "time", "rt-multi-thread"] }
slog = "2.7.0"
thiserror = "1.0.61"
reqwest = { version = "0.12.5", default-features = false, features = ["rustls-tls", "json"] }
thiserror = "1.0.69"
reqwest = { version = "0.12.9", default-features = false, features = ["rustls-tls", "json"] }
4 changes: 2 additions & 2 deletions crates/redislog/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ repository = "https://github.com/bolcom/unFTP/tree/master/crates/redislog"
readme = "README.md"

[dependencies]
chrono = { version = "0.4.38", default-features = false, features = ["std", "clock"] }
chrono = { version = "0.4.39", default-features = false, features = ["std", "clock"] }
r2d2 = "0.8.10"
r2d2_redis = "0.14.0"
redis = "0.20.2"
serde_json = "1.0.117"
serde_json = "1.0.133"
slog = { version = "2.7.0", features = ["max_level_trace", "release_max_level_info"] }

[dev-dependencies]
Expand Down
6 changes: 3 additions & 3 deletions crates/redislog/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ impl Builder {
.build(manager)?;

let mut con = pool.get()?;
redis::cmd("PING").query(&mut *con)?;
redis::cmd("PING").query::<()>(&mut *con)?;

Ok(Logger {
redis_key: self.redis_key,
Expand Down Expand Up @@ -242,13 +242,13 @@ impl Logger {
redis::cmd("RPUSH")
.arg(self.redis_key.as_str())
.arg(msg)
.query(&mut *con)?;
.query::<()>(&mut *con)?;

if let Some(t) = self.ttl_seconds {
redis::cmd("EXPIRE")
.arg(self.redis_key.as_str())
.arg(t)
.query(&mut *con)?
.query::<()>(&mut *con)?;
}
Ok(())
}
Expand Down
2 changes: 1 addition & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub const NAME: &str = "unFTP";
pub const VERSION: &str = env!("BUILD_VERSION");

// The file has been placed here by the build script. See build.rs
include!(concat!(env!("OUT_DIR"), "/build-info.rs"));
include!(concat!(env!("OUT_DIR"), "/built.rs"));

lazy_static! {
static ref LONG_VERSION: String = {
Expand Down
1 change: 1 addition & 0 deletions src/storage/choose.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ pub struct ChoosingVfs {
#[derive(Debug)]
#[allow(clippy::large_enum_variant)]
pub enum InnerVfs {
#[allow(dead_code)]
OpenDAL(unftp_sbe_opendal::OpendalStorage),
Cloud(unftp_sbe_gcs::CloudStorage),
File(unftp_sbe_fs::Filesystem),
Expand Down

0 comments on commit 57c0827

Please sign in to comment.