Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 2 additions & 3 deletions .github/workflows/integration-celld.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,8 @@ jobs:
cargo build -p distributed_cli --bin distributed
target/debug/distributed build tests/e2e-ui --output json
target/debug/distributed build tests/e2e-celld --output json
cargo test --test celld --no-run
cargo test --test e2e_ui_celld_nats_profile \
--features graphql,http,sqlite --no-run
cargo test --test services --no-run
cargo test --test services --features graphql,http,sqlite --no-run
npm install --prefix tests/e2e-ui

# celld dev watches its project for rebuilds. Complete browser/toolchain
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-e2e-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ jobs:
npx playwright install chromium --with-deps

- name: Verify candidate-key SSR and live delivery end to end
run: cargo test --manifest-path ../../Cargo.toml --features graphql,sqlite --test graphql_unique_key_live projected_candidate_keys_reach_chromium_over_http_and_websocket -- --ignored --exact --nocapture
run: 'cargo test --manifest-path ../../Cargo.toml --features graphql,sqlite --test graphql graphql_unique_key_live::projected_candidate_keys_reach_chromium_over_http_and_websocket -- --ignored --exact --nocapture'

- name: Run browser e2e
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-game-demos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
- name: Redis Streams publisher against real Redis
env:
REDIS_URL: redis://127.0.0.1:6379
run: cargo test --features redis-streams --test redis_streams -- --nocapture
run: 'cargo test --features redis-streams --test transports redis_streams:: -- --nocapture'
- name: Ticket rate limiter against real Redis
working-directory: js
env:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/integration-gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
save-if: ${{ github.event_name != 'pull_request' }}
- name: Format contract and fixture sources
if: ${{ !cancelled() }}
run: rustfmt --edition 2021 --check src/gateway/mod.rs tests/gateway_routing.rs tests/gateway_extensions.rs tests/gateway-portable/src/lib.rs
run: rustfmt --edition 2021 --check src/gateway/mod.rs tests/gateway/gateway_routing.rs tests/gateway/gateway_extensions.rs tests/gateway-portable/src/lib.rs
- name: Test portable routing and adapter contracts
if: ${{ !cancelled() }}
run: cargo test --manifest-path tests/gateway-portable/Cargo.toml --locked
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
shared-key: graphql
save-if: false
- name: Verify gateway and backend identity
run: cargo test -p distributed --no-default-features --features gateway,graphql,sqlite --test graphql_identity
run: 'cargo test -p distributed --no-default-features --features gateway,graphql,sqlite --test graphql graphql_identity::'
- name: Install pinned auth fixture dependencies
working-directory: tests/gateway-auth
run: npm ci
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
shared-key: gateway-graphql
save-if: false
- name: Verify embedded and remote GraphQL protocols
run: cargo test -p distributed --no-default-features --features gateway-graphql-native,sqlite --test gateway_graphql --test gateway_graphql_operation --test graphql_causal_transport --test graphql_query_protocol --test graphql_identity --test graphql_sqlite --test sqlite_repository
run: 'cargo test -p distributed --no-default-features --features gateway-graphql-native,sqlite --test gateway --test graphql --test repositories -- gateway_graphql:: gateway_graphql_operation:: graphql_causal_transport:: graphql_query_protocol:: graphql_identity:: graphql_sqlite:: sqlite_repository::'

- name: Verify the portable delivery state machines and WS codec
run: 'cargo test -p distributed --no-default-features --features gateway --lib gateway::'
Expand Down Expand Up @@ -193,14 +193,14 @@ jobs:
node tests/gateway-worker/proxy-runtime.mjs
node tests/gateway-worker/run.mjs
- name: Measure actual native and workerd origin/client savings
run: cargo test --no-default-features --features gateway-graphql-native,sqlite --test graphql_query_protocol separate_origin_and_client_savings -- --ignored --nocapture
run: 'cargo test --no-default-features --features gateway-graphql-native,sqlite --test graphql graphql_query_protocol::load::separate_origin_and_client_savings -- --ignored --nocapture'
- uses: actions/upload-artifact@v4
if: always()
with:
name: gateway-delivery-load
path: tests/gateway-worker/artifacts/load-report.json
- name: Prove actual DO coordination, SQL reduction, restart and cancellation
run: cargo test --no-default-features --features gateway-graphql-native,sqlite --test graphql_query_protocol worker_ -- --ignored --nocapture --test-threads=1
run: 'cargo test --no-default-features --features gateway-graphql-native,sqlite --test graphql graphql_query_protocol::worker_ -- --ignored --nocapture --test-threads=1'

application:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -234,7 +234,7 @@ jobs:
cd tests/gateway-auth
npx playwright install --with-deps chromium
- name: Verify application composition
run: cargo test --no-default-features --features graphql,sqlite,gateway --test application_composition
run: 'cargo test --no-default-features --features graphql,sqlite,gateway --test core application_composition::'
- name: Build coherent application and run public-origin browser flows
run: node tests/e2e-ui/gateway/run.mjs
- name: Verify dev lifecycle and browser flows through the gateway
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/integration-graphql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name: GraphQL Identity / OIDC Integration Tests
# Local parity:
# ./scripts/oidc-{zitadel,keycloak,authentik}-up.sh
# set -a && source graphql-oidc[-keycloak|-authentik].env && set +a
# cargo test --test graphql_oidc_<provider> --features graphql,sqlite,metrics
# cargo test --test graphql --features graphql,sqlite,metrics graphql_oidc_<provider>::
on:
workflow_call:

Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
save-if: ${{ github.event_name != 'pull_request' }}
- name: Always-on identity suite (no IdP)
run: |
cargo test --test graphql_identity --features graphql,sqlite,metrics --verbose
cargo test --test graphql --features graphql,sqlite,metrics --verbose graphql_identity::

oidc-zitadel-e2e:
name: GraphQL OIDC Zitadel e2e (live)
Expand Down Expand Up @@ -79,16 +79,16 @@ jobs:
test -n "${OIDC_ISSUER:-}"
test -n "${GRAPHQL_E2E_CUSTOMER_KEY:-}"
echo "ZITADEL_E2E=$ZITADEL_E2E OIDC_ISSUER=$OIDC_ISSUER"
cargo test --test graphql_oidc_zitadel --features graphql,sqlite,metrics --verbose -- --nocapture
cargo test --test graphql --features graphql,sqlite,metrics --verbose graphql_oidc_zitadel:: -- --nocapture
- name: Dump Zitadel logs on failure
if: failure()
run: |
docker compose -f tests/graphql_oidc_zitadel/docker-compose.yml ps -a || true
docker compose -f tests/graphql_oidc_zitadel/docker-compose.yml logs --tail=200 || true
ls -la tests/graphql_oidc_zitadel/machinekey || true
docker compose -f tests/graphql/graphql_oidc_zitadel/docker-compose.yml ps -a || true
docker compose -f tests/graphql/graphql_oidc_zitadel/docker-compose.yml logs --tail=200 || true
ls -la tests/graphql/graphql_oidc_zitadel/machinekey || true
- name: Tear down
if: always()
run: docker compose -f tests/graphql_oidc_zitadel/docker-compose.yml down -v || true
run: docker compose -f tests/graphql/graphql_oidc_zitadel/docker-compose.yml down -v || true

oidc-keycloak-e2e:
name: GraphQL OIDC Keycloak e2e (live)
Expand Down Expand Up @@ -120,15 +120,15 @@ jobs:
test -n "${KEYCLOAK_E2E:-}"
test -n "${OIDC_ISSUER:-}"
echo "KEYCLOAK_E2E=$KEYCLOAK_E2E OIDC_ISSUER=$OIDC_ISSUER OIDC_AUDIENCE=$OIDC_AUDIENCE"
cargo test --test graphql_oidc_keycloak --features graphql,sqlite,metrics --verbose -- --nocapture
cargo test --test graphql --features graphql,sqlite,metrics --verbose graphql_oidc_keycloak:: -- --nocapture
- name: Dump Keycloak logs on failure
if: failure()
run: |
docker compose -f tests/graphql_oidc_keycloak/docker-compose.yml ps -a || true
docker compose -f tests/graphql_oidc_keycloak/docker-compose.yml logs --tail=200 || true
docker compose -f tests/graphql/graphql_oidc_keycloak/docker-compose.yml ps -a || true
docker compose -f tests/graphql/graphql_oidc_keycloak/docker-compose.yml logs --tail=200 || true
- name: Tear down
if: always()
run: docker compose -f tests/graphql_oidc_keycloak/docker-compose.yml down -v || true
run: docker compose -f tests/graphql/graphql_oidc_keycloak/docker-compose.yml down -v || true

oidc-authentik-e2e:
name: GraphQL OIDC Authentik e2e (live)
Expand Down Expand Up @@ -161,12 +161,12 @@ jobs:
test -n "${OIDC_ISSUER:-}"
test -n "${OIDC_JWKS_URI:-}"
echo "AUTHENTIK_E2E=$AUTHENTIK_E2E OIDC_ISSUER=$OIDC_ISSUER"
cargo test --test graphql_oidc_authentik --features graphql,sqlite,metrics --verbose -- --nocapture
cargo test --test graphql --features graphql,sqlite,metrics --verbose graphql_oidc_authentik:: -- --nocapture
- name: Dump Authentik logs on failure
if: failure()
run: |
docker compose -f tests/graphql_oidc_authentik/docker-compose.yml ps -a || true
docker compose -f tests/graphql_oidc_authentik/docker-compose.yml logs --tail=200 || true
docker compose -f tests/graphql/graphql_oidc_authentik/docker-compose.yml ps -a || true
docker compose -f tests/graphql/graphql_oidc_authentik/docker-compose.yml logs --tail=200 || true
- name: Tear down
if: always()
run: docker compose -f tests/graphql_oidc_authentik/docker-compose.yml down -v || true
run: docker compose -f tests/graphql/graphql_oidc_authentik/docker-compose.yml down -v || true
6 changes: 3 additions & 3 deletions .github/workflows/integration-observability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
run: |
mkdir -p target/otel-out && chmod 777 target/otel-out
docker run -d --user 0 --name otelcol -p 4318:4318 -p 4317:4317 \
-v "$PWD/tests/otel_export/collector-config.yaml:/etc/otelcol/config.yaml:ro" \
-v "$PWD/tests/observability/otel_export/collector-config.yaml:/etc/otelcol/config.yaml:ro" \
-v "$PWD/target/otel-out:/out" \
otel/opentelemetry-collector:0.116.1 --config /etc/otelcol/config.yaml
for i in $(seq 1 30); do
Expand All @@ -76,14 +76,14 @@ jobs:
env:
PROMTOOL: /usr/local/bin/promtool
DISTRIBUTED_REQUIRE_SERVICES: PROMTOOL
run: cargo test --test metrics_exposition --features http,metrics --verbose
run: 'cargo test --test observability --features http,metrics --verbose metrics_exposition::'
- name: Run OTLP export tests
if: ${{ !cancelled() }}
env:
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: http://localhost:4318/v1/traces
OTEL_COLLECTOR_TRACES_FILE: ${{ github.workspace }}/target/otel-out/traces.json
DISTRIBUTED_REQUIRE_SERVICES: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT,OTEL_COLLECTOR_TRACES_FILE
run: cargo test --test otel_export --features http,otel --verbose
run: 'cargo test --test observability --features http,otel --verbose otel_export::'
- name: Scaffold service with metrics and tracing
if: ${{ !cancelled() }}
run: |
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- uses: Swatinem/rust-cache@v2
with:
shared-key: coverage
save-if: ${{ github.event_name != 'pull_request' }}
- uses: taiki-e/install-action@cargo-llvm-cov
# --all-features compiles rdkafka; librdkafka's bundled cmake build needs
# curl/curl.h (the runner has libcurl's runtime but not its headers).
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ graphql-oidc.env
graphql-oidc.env
graphql-oidc-keycloak.env
graphql-oidc-authentik.env
tests/graphql_oidc_zitadel/machinekey/**
!tests/graphql_oidc_zitadel/machinekey/.gitignore
tests/graphql/graphql_oidc_zitadel/machinekey/**
!tests/graphql/graphql_oidc_zitadel/machinekey/.gitignore
tests/workshop-service/ui/node_modules/
tests/workshop-service/ui/build/
tests/workshop-service/ui/.svelte-kit/
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ tower = { version = "0.5", features = ["util"] }
http-body-util = "0.1"
# Names the level SQLx logs statements at (src/sqlx_repo/statement_count_tests.rs).
log = "0.4"
# OTLP export e2e (tests/otel_export): a real SDK pipeline pointed at a
# OTLP export e2e (tests/observability/otel_export): a real SDK pipeline pointed at a
# collector container, exercising the `otel` feature the way a service binary
# would. Keep versions in lockstep with the optional `otel` feature deps.
opentelemetry-otlp = { version = "0.32", default-features = false, features = ["trace", "http-proto", "reqwest-blocking-client"] }
Expand Down
Loading
Loading