Skip to content

Commit

Permalink
Initial concept for enhanced ssstar API (#116)
Browse files Browse the repository at this point in the history
* Update deps and reorganize

Update to the latest AWS SDK releases, dealing with the usual breakage
as a result.

Re-arrange dependencies and other workspace properties to avoid
duplication by using workspace-level properties.

Format TOML files with taplo consistent with the other Elastio projects.

Update to Rust toolchain 1.69

* Add new `storage` module and initial API design.

This new storage abstraction isn't implemented yet and isn't actually
part of the create or extract logic.  It's just the initial outline.

* Refactor a bit and make the tar builder report where the data goes

This is still a WIP but I was able to get code working reliably (and
with a test) that calculates where in the tar stream the data for each
object is stored.  That will be important in Elastio later when we need
to construct an index.

* Fix warnings and clippy lints

* Add byte offset to `tar_archive_object_written` progress reporter method

* Remove `tar_` prefix from progress methods.

Now that we have a new storage abstraction coming, the archive might not
actually be tar format so keeping the `tar_` prefix would lead to
confusion.

* Fix warnings and lints

* Uncomment some temporarily disabled test code

* Fix windows build

* Fix rustfmt (fuck!)

* Add object timestamp to progress callback

* Fix windows build harder

* Disable coverage since it's always broken

* Update `release.toml` for latest version of `cargo-release`
  • Loading branch information
anelson authored May 22, 2023
1 parent 78191c1 commit 3084e6d
Show file tree
Hide file tree
Showing 29 changed files with 1,564 additions and 967 deletions.
48 changes: 6 additions & 42 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
toolchain: nightly
profile: minimal
override: true
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
- uses: EmbarkStudios/cargo-deny-action@v1
with:
arguments: --all-features
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
profile: minimal
override: true
components: rustfmt
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
- name: Check formatting
uses: actions-rs/cargo@v1
with:
Expand All @@ -79,7 +79,7 @@ jobs:
profile: minimal
override: true
components: clippy
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
- name: Clippy check
uses: actions-rs/cargo@v1
with:
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
with:
profile: minimal
override: true
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
- name: Cache the minio binary
id: cache-minio
uses: actions/cache@v3
Expand Down Expand Up @@ -178,7 +178,7 @@ jobs:
- name: Install MUSL deps
run: |
sudo apt-get install musl musl-dev musl-tools
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
- name: Cargo build
uses: actions-rs/cargo@v1
with:
Expand All @@ -202,7 +202,7 @@ jobs:
toolchain: stable
profile: minimal
override: true
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
- name: Check documentation
env:
RUSTDOCFLAGS: -D warnings
Expand All @@ -211,39 +211,3 @@ jobs:
command: doc
args: --no-deps --document-private-items --all-features --workspace --examples

coverage:
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- uses: Swatinem/rust-cache@v1
- name: Install minio
shell: bash
run: |
mkdir -p $HOME/.local/bin
cd $HOME/.local/bin
wget https://dl.min.io/server/minio/release/linux-amd64/minio
chmod +x minio
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Run cargo-tarpaulin
uses: actions-rs/[email protected]
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
with:
args: '--all-features --workspace --ignore-tests --ignored --out Lcov'
- name: Upload to Coveralls
# upload only if push
if: ${{ github.event_name == 'push' }}
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: './lcov.info'

27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## 0.5.0 - 22-May-2023

### Breaking Changes

* Rename several `CreateProgressCallback` methods to remove the `tar_` prefix to reflect the fact that the archive might
not be tar format in the future.
* Change `CreateProgressCallback` trait to add data `byte_offset` and object `timestamp` parameters to `archive_object_written` method

This is a bit of an abuse of the progress callback since this information is not needed for progress reporting and
instead will be used in Elastio to populate the index of the S3 backup, however it's an easy change to make that will
facilitate our initial indexing impl without having to wait for the new storage API to stabilize.

### Changes

* Update AWS SDK crates from 0.54 to 0.55 and 0.24 to 0.27
* Update to Rust version 1.69.0
* Update to `rust-cache` action v2
* Remove `coverage` GHA job since it's consistently broken and the `tarpaulin` GHA seems abandoned
* Replace deprecated `tempfile` dependency with `tempdir`. This is a dev-only dependency so this shouldn't have any
runtime impact.
* Add new `storage` module with new public API for writing to custom archive formats instead of tar

This isn't actually implemented yet, but we're releasing the API in an experimental state to collect feedback. This
new storage API is subject to change and should not be relied upon until we finalize it. For now it's hidden behind
the `storage` feature and is not enabled by default.
* Move all dependencies to the workspace level to make it easier to update dependencies in the future.

## 0.4.3 - 3-Mar-2023

### Changes
Expand Down
Loading

0 comments on commit 3084e6d

Please sign in to comment.