Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement proxy v2 architecture, in Rust #1718

Merged
merged 21 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ jobs:
PKG_DIR=../client make -C securedrop-builder requirements
PKG_DIR=../export make -C securedrop-builder requirements
PKG_DIR=../log make -C securedrop-builder requirements
PKG_DIR=../proxy make -C securedrop-builder requirements
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git diff --ignore-matching-lines=# --exit-code

Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,13 @@ jobs:
strategy:
fail-fast: false
matrix:
# proxy has no `make lint` because it is covered by `rust-lint`.
component:
- client
- export
- log
- proxy
debian_version:
- bookworm
# bookworm jobs are failing and will be
# replaced with proxy v2 shortly, so skip
# https://github.com/freedomofpress/securedrop-client/issues/1681
exclude:
- component: proxy
debian_version: bookworm
runs-on: ubuntu-latest
container: debian:${{ matrix.debian_version }}
steps:
Expand Down Expand Up @@ -113,6 +107,12 @@ jobs:
container: rust:1.74.1
steps:
- uses: actions/checkout@v4
- name: Configure Qubes repository
run: |
cp scripts/qubes_42.sources /etc/apt/sources.list.d/
source /etc/os-release
sed -i s/##VERSION_CODENAME##/${VERSION_CODENAME}/ /etc/apt/sources.list.d/qubes_42.sources
apt-get update && apt-get install --yes libclang-dev qubesdb-dev
- name: Install dependencies
run: |
rustup component add rustfmt
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,4 @@ jobs:
# Wait for server to come up
dockerize -wait http://127.0.0.1:8080 -timeout 5m
# Run tests
rm client/tests/sdk/data/*.yml
make -C client test-sdk
make -C client regenerate-sdk-cassettes
16 changes: 9 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ jobs:
- proxy
debian_version:
- bookworm
# bookworm jobs are failing and will be
# replaced with proxy v2 shortly, so skip
# https://github.com/freedomofpress/securedrop-client/issues/1681
exclude:
- component: proxy
debian_version: bookworm
runs-on: ubuntu-latest
container: debian:${{ matrix.debian_version }}
steps:
Expand All @@ -41,13 +35,20 @@ jobs:
run: |
# We want to run tests as a regular user, similar to Qubes VMs
useradd --create-home --shell /bin/bash user
- name: Install Rust-specific dependencies
run: apt-get install --yes build-essential curl libssl-dev pkg-config
if: ${{ matrix.component == 'proxy' }}
- uses: actions/checkout@v4
# Install Rust 1.74.1, keep in sync with rust-toolchain.toml
- uses: dtolnay/[email protected]
cfm marked this conversation as resolved.
Show resolved Hide resolved
if: ${{ matrix.component == 'proxy' }}
- name: Install dependencies
run: |
sudo -u user poetry -C ${{ matrix.component }} install
- name: Run test
run: |
sudo chown -R user:user .
sudo -u user make -C ${{ matrix.component }} test
sudo -u user PATH=$PATH:$HOME/.cargo/bin make -C ${{ matrix.component }} test

# Run the various `make test-...` commands for the client.
# TODO: these should be consolidated into one when feasible
Expand All @@ -71,6 +72,7 @@ jobs:
run: |
# We want to run tests as a regular user, similar to Qubes VMs
useradd --create-home --shell /bin/bash user
sudo -u user bash -c "mkdir ~/Downloads"
- name: Install dependencies
run: |
make -C client ci-install-deps
Expand Down
Loading