Skip to content

Commit

Permalink
Merge branch 'main' into repair-hotcold
Browse files Browse the repository at this point in the history
  • Loading branch information
simonsan authored Nov 19, 2024
2 parents 1b5fb66 + 22a898c commit 7343ef5
Show file tree
Hide file tree
Showing 41 changed files with 612 additions and 345 deletions.
4 changes: 0 additions & 4 deletions .cargo/audit.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,4 @@ ignore = [
# FIXME!: See https://github.com/RustCrypto/RSA/issues/19#issuecomment-1822995643.
# There is no workaround available yet.
"RUSTSEC-2023-0071",
# FIXME: backoff => used in backend, need to be replaced with backon
"RUSTSEC-2024-0384",
# FIXME: derivative => used for default impls
"RUSTSEC-2024-0388",
]
2 changes: 1 addition & 1 deletion .github/workflows/careful.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
with:
toolchain: ${{ matrix.rust }}
- name: install cargo-careful
uses: taiki-e/install-action@278aeeb6e331c1bd610bffe45862e09452854b1a # v2
uses: taiki-e/install-action@5d427d86f088a6cedcddb92b3ad038d30721b52f # v2
with:
tool: cargo-careful
- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-heavy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ jobs:
with:
toolchain: ${{ matrix.rust }}
- name: install cargo-hack
uses: taiki-e/install-action@278aeeb6e331c1bd610bffe45862e09452854b1a # v2
uses: taiki-e/install-action@5d427d86f088a6cedcddb92b3ad038d30721b52f # v2
with:
tool: cargo-hack
- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2
Expand Down Expand Up @@ -253,7 +253,7 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Install cargo-hack
uses: taiki-e/install-action@278aeeb6e331c1bd610bffe45862e09452854b1a # v2
uses: taiki-e/install-action@5d427d86f088a6cedcddb92b3ad038d30721b52f # v2
with:
tool: cargo-hack

Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Install cargo-hack
uses: taiki-e/install-action@278aeeb6e331c1bd610bffe45862e09452854b1a # v2
- name: Install cargo-tarpaulin
uses: taiki-e/install-action@5d427d86f088a6cedcddb92b3ad038d30721b52f # v2
with:
tool: cargo-tarpaulin

Expand All @@ -29,11 +29,13 @@ jobs:
# This is because we have a workspace with multiple crates, and we want to generate coverage for all of them, but we only want to
# report the coverage of rustic_backend and rustic_core crates (currently) as this is where the main logic is
- name: Generate code coverage
env:
RUST_BACKTRACE: "0"
run: |
cargo tarpaulin --verbose --all-features --workspace --timeout 120 --out xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4
uses: codecov/codecov-action@5c47607acb93fed5485fdbf7232e8a31425f672a # v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: rustic-rs/rustic_core
token: ${{ secrets.CODECOV_TOKEN }}
slug: rustic-rs/rustic_core
2 changes: 1 addition & 1 deletion .github/workflows/release-plz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
uses: dtolnay/rust-toolchain@stable

- name: Run release-plz
uses: MarcoIeni/release-plz-action@0a28fd4d52f6b5e06e0cf8e75a22e96e1966fc2f # v0.5
uses: MarcoIeni/release-plz-action@f0fdffff1ff475195a1638e487cf93719e065a8e # v0.5
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
79 changes: 79 additions & 0 deletions .justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# 'Just' Configuration
# Loads .env file for variables to be used in
# in this just file

set dotenv-load := true

# Ignore recipes that are commented out

set ignore-comments := true

# Set shell for Windows OSs:
# If you have PowerShell Core installed and want to use it,
# use `pwsh.exe` instead of `powershell.exe`

set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]

# Set shell for non-Windows OSs:

set shell := ["bash", "-uc"]

export RUST_BACKTRACE := "1"
export RUST_LOG := "info"
export CI := "1"

build:
cargo build --all-features
cargo build -r --all-features

b: build

check:
cargo check --no-default-features --all-targets --workspace
cargo check --all-features --all-targets --workspace

c: check

ci:
just loop . dev

dev: format lint test

d: dev

doc:
cargo +stable doc --no-deps --all-features --workspace --examples

format-dprint:
dprint fmt

format-cargo:
cargo fmt --all

format: format-cargo format-dprint

fmt: format

rev:
cargo insta review

inverse-deps crate:
cargo tree -e features -i {{ crate }}

lint: check
cargo clippy --no-default-features -- -D warnings
cargo clippy --all-targets --all-features -- -D warnings

loop dir action:
watchexec -w {{ dir }} -- "just {{ action }}"

test: check lint
cargo test --all-targets --all-features --workspace --examples

test-ignored: check lint
cargo test --all-targets --all-features --workspace --examples -- --ignored

t: test test-ignored

coverage $RUST_BACKTRACE="0":
cargo tarpaulin --verbose --all-features --workspace --timeout 120 --out Lcov --output-dir coverage
40 changes: 4 additions & 36 deletions Cargo.lock

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

17 changes: 17 additions & 0 deletions crates/backend/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@

All notable changes to this project will be documented in this file.

## [0.5.0](https://github.com/rustic-rs/rustic_core/compare/rustic_backend-v0.4.2...rustic_backend-v0.5.0) - 2024-11-18

### Added

- *(async)* add `async_compatible` methods to identify backend compatibility ([#355](https://github.com/rustic-rs/rustic_core/pull/355))
- add 'yandex-disk' to enabled opendal services and update opendal to 0.50.2 ([#360](https://github.com/rustic-rs/rustic_core/pull/360))

### Other

- *(error)* enhance error logging and output formatting ([#361](https://github.com/rustic-rs/rustic_core/pull/361))
- *(backend)* simplify code in local backend ([#362](https://github.com/rustic-rs/rustic_core/pull/362))
- *(backend)* migrate from `backoff` to `backon` ([#356](https://github.com/rustic-rs/rustic_core/pull/356))
- *(error)* improve error messages and file handling ([#334](https://github.com/rustic-rs/rustic_core/pull/334))
- *(deps)* lock file maintenance rust dependencies ([#345](https://github.com/rustic-rs/rustic_core/pull/345))
- *(deps)* [**breaking**] upgrade to new conflate version ([#300](https://github.com/rustic-rs/rustic_core/pull/300))
- *(errors)* [**breaking**] Improve error handling, display and clean up codebase ([#321](https://github.com/rustic-rs/rustic_core/pull/321))

## [0.4.2](https://github.com/rustic-rs/rustic_core/compare/rustic_backend-v0.4.1...rustic_backend-v0.4.2) - 2024-10-24

### Fixed
Expand Down
10 changes: 5 additions & 5 deletions crates/backend/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rustic_backend"
version = "0.4.2"
version = "0.5.0"
authors = ["the rustic-rs team"]
categories = ["data-structures", "filesystem"]
documentation = "https://docs.rs/rustic_backend"
Expand Down Expand Up @@ -42,7 +42,7 @@ opendal = [
"tokio/rt-multi-thread",
"dep:typed-path",
]
rest = ["dep:reqwest", "dep:backoff"]
rest = ["dep:reqwest", "dep:backon"]
rclone = ["rest", "dep:rand", "dep:semver"]

[dependencies]
Expand Down Expand Up @@ -78,7 +78,7 @@ aho-corasick = { workspace = true }
walkdir = "2.5.0"

# rest backend
backoff = { version = "0.4.0", optional = true }
backon = { version = "1.2.0", optional = true }
reqwest = { version = "0.12.8", default-features = false, features = ["json", "rustls-tls-native-roots", "stream", "blocking"], optional = true }

# rclone backend
Expand All @@ -97,11 +97,11 @@ features = ["prebuilt-nasm"]

[target.'cfg(not(windows))'.dependencies]
# opendal backend - sftp is not supported on windows, see https://github.com/apache/incubator-opendal/issues/2963
opendal = { version = "0.50.0", features = ["services-b2", "services-sftp", "services-swift", "services-azblob", "services-azdls", "services-cos", "services-fs", "services-ftp", "services-dropbox", "services-gdrive", "services-gcs", "services-ghac", "services-http", "services-ipmfs", "services-memory", "services-obs", "services-onedrive", "services-oss", "services-s3", "services-webdav", "services-webhdfs", "services-azfile", "layers-blocking", "layers-throttle"], optional = true }
opendal = { version = "0.50.2", features = ["services-b2", "services-sftp", "services-swift", "services-azblob", "services-azdls", "services-cos", "services-fs", "services-ftp", "services-dropbox", "services-gdrive", "services-gcs", "services-ghac", "services-http", "services-ipmfs", "services-memory", "services-obs", "services-onedrive", "services-oss", "services-s3", "services-webdav", "services-webhdfs", "services-azfile", "layers-blocking", "layers-throttle", "services-yandex-disk"], optional = true }

[target.'cfg(windows)'.dependencies]
# opendal backend
opendal = { version = "0.50.0", features = ["services-b2", "services-swift", "services-azblob", "services-azdls", "services-cos", "services-fs", "services-ftp", "services-dropbox", "services-gdrive", "services-gcs", "services-ghac", "services-http", "services-ipmfs", "services-memory", "services-obs", "services-onedrive", "services-oss", "services-s3", "services-webdav", "services-webhdfs", "services-azfile", "layers-blocking", "layers-throttle"], optional = true }
opendal = { version = "0.50.2", features = ["services-b2", "services-swift", "services-azblob", "services-azdls", "services-cos", "services-fs", "services-ftp", "services-dropbox", "services-gdrive", "services-gcs", "services-ghac", "services-http", "services-ipmfs", "services-memory", "services-obs", "services-onedrive", "services-oss", "services-s3", "services-webdav", "services-webhdfs", "services-azfile", "layers-blocking", "layers-throttle", "services-yandex-disk"], optional = true }

[dev-dependencies]
anyhow = { workspace = true }
Expand Down
Loading

0 comments on commit 7343ef5

Please sign in to comment.