Some small fixes and updates

- Updated workflows to use new checkout version
  This probably fixes the curl download for hadolint also.
- Updated crates including Rocket to the latest rc3 :party:
- Applied 2 nightly clippy lints to prevent future clippy issues.
This commit is contained in:
BlackDex
2023-03-24 22:07:50 +01:00
parent 5725d297b4
commit 8bcd0ab0c6
8 changed files with 104 additions and 219 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ jobs:
steps:
# Checkout the repo
- name: "Checkout"
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
# End Checkout the repo
+1 -1
View File
@@ -13,7 +13,7 @@ jobs:
steps:
# Checkout the repo
- name: Checkout
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
# End Checkout the repo
+1 -1
View File
@@ -73,7 +73,7 @@ jobs:
steps:
# Checkout the repo
- name: Checkout
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
with:
fetch-depth: 0
Generated
+90 -205
View File
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -41,7 +41,7 @@ syslog = "6.0.1" # Needs to be v4 until fern is updated
[dependencies]
# Logging
log = "0.4.17"
fern = { version = "0.6.1", features = ["syslog-6"] }
fern = { version = "0.6.2", features = ["syslog-6"] }
tracing = { version = "0.1.37", features = ["log"] } # Needed to have lettre and webauthn-rs trace logging to work
# A `dotenv` implementation for Rust
@@ -55,7 +55,7 @@ num-traits = "0.2.15"
num-derive = "0.3.3"
# Web framework
rocket = { version = "0.5.0-rc.2", features = ["tls", "json"], default-features = false }
rocket = { version = "0.5.0-rc.3", features = ["tls", "json"], default-features = false }
# WebSockets libraries
tokio-tungstenite = "0.18.0"
@@ -126,7 +126,7 @@ reqwest = { version = "0.11.15", features = ["stream", "json", "gzip", "brotli",
# Favicon extraction libraries
html5gum = "0.5.2"
regex = { version = "1.7.2", features = ["std", "perf", "unicode-perl"], default-features = false }
regex = { version = "1.7.3", features = ["std", "perf", "unicode-perl"], default-features = false }
data-url = "0.2.0"
bytes = "1.4.0"
@@ -138,7 +138,7 @@ cookie = "0.16.2"
cookie_store = "0.19.0"
# Used by U2F, JWT and PostgreSQL
openssl = "0.10.47"
openssl = "0.10.48"
# CLI argument parsing
pico-args = "0.5.0"
@@ -159,7 +159,7 @@ which = "4.4.0"
argon2 = "0.5.0"
# Reading a password from the cli for generating the Argon2id ADMIN_TOKEN
rpassword = "7.2"
rpassword = "7.2.0"
# Strip debuginfo from the release builds
# Also enable thin LTO for some optimizations
+2
View File
@@ -4,7 +4,9 @@
---
[![Build](https://github.com/dani-garcia/vaultwarden/actions/workflows/build.yml/badge.svg)](https://github.com/dani-garcia/vaultwarden/actions/workflows/build.yml)
[![ghcr.io](https://img.shields.io/badge/ghcr.io-download-blue)](https://github.com/dani-garcia/vaultwarden/pkgs/container/vaultwarden)
[![Docker Pulls](https://img.shields.io/docker/pulls/vaultwarden/server.svg)](https://hub.docker.com/r/vaultwarden/server)
[![Quay.io](https://img.shields.io/badge/Quay.io-download-blue)](https://quay.io/repository/vaultwarden/server)
[![Dependency Status](https://deps.rs/repo/github/dani-garcia/vaultwarden/status.svg)](https://deps.rs/repo/github/dani-garcia/vaultwarden)
[![GitHub Release](https://img.shields.io/github/release/dani-garcia/vaultwarden.svg)](https://github.com/dani-garcia/vaultwarden/releases/latest)
[![AGPL-3.0 Licensed](https://img.shields.io/github/license/dani-garcia/vaultwarden.svg)](https://github.com/dani-garcia/vaultwarden/blob/main/LICENSE.txt)
+3 -5
View File
@@ -111,7 +111,7 @@ async fn main() -> Result<(), Error> {
create_dir(&CONFIG.attachments_folder(), "attachments folder");
let pool = create_db_pool().await;
schedule_jobs(pool.clone()).await;
schedule_jobs(pool.clone());
crate::db::models::TwoFactor::migrate_u2f_to_webauthn(&mut pool.get().await.unwrap()).await.unwrap();
launch_rocket(pool, extra_debug).await // Blocks until program termination.
@@ -548,7 +548,7 @@ async fn launch_rocket(pool: db::DbPool, extra_debug: bool) -> Result<(), Error>
Ok(())
}
async fn schedule_jobs(pool: db::DbPool) {
fn schedule_jobs(pool: db::DbPool) {
if CONFIG.job_poll_interval_ms() == 0 {
info!("Job scheduler disabled.");
return;
@@ -624,9 +624,7 @@ async fn schedule_jobs(pool: db::DbPool) {
// tick, the one that was added earlier will run first.
loop {
sched.tick();
runtime.block_on(async move {
tokio::time::sleep(tokio::time::Duration::from_millis(CONFIG.job_poll_interval_ms())).await
});
runtime.block_on(tokio::time::sleep(tokio::time::Duration::from_millis(CONFIG.job_poll_interval_ms())));
}
})
.expect("Error spawning job scheduler thread");
+1 -1
View File
@@ -635,7 +635,7 @@ where
if tries >= max_tries {
return err;
}
Handle::current().block_on(async move { sleep(Duration::from_millis(500)).await });
Handle::current().block_on(sleep(Duration::from_millis(500)));
}
}
}