The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
ci(storage): remove MongoDB workflow and update lane tests
Steven Enamakelb4636b2bf536
diff --git a/.github/ci-paths-filter.yml b/.github/ci-paths-filter.ymlindex bf6020edbe..3b52f21246 100644--- a/.github/ci-paths-filter.yml+++ b/.github/ci-paths-filter.yml@@ -204,8 +204,8 @@ scripts:- 'app/scripts/e2e-web-session.sh'- 'app/vite.config.*'# The storage-target parity test in self-hosted-lanes.test.mjs checks that- # every registered `tests/storage_*_e2e.rs` target is in the storage lane- # and the MongoDB workflow; adding a target must run it.+ # every registered `tests/storage_*_e2e.rs` target is in the storage lane;+ # adding a target must run it.- 'tests/storage_*.rs'- 'tests/cli_storage_url_e2e.rs'- 'crates/openhuman-cli/Cargo.toml'diff --git a/.github/workflows/storage-mongodb.yml b/.github/workflows/storage-mongodb.ymldeleted file mode 100644index 62cc608341..0000000000--- a/.github/workflows/storage-mongodb.yml+++ /dev/null@@ -1,136 +0,0 @@-----# Storage drivers on MongoDB: the `storage_*_e2e` targets and-# `cli_storage_url_e2e` run once per driver (tests/support/storage_drivers.rs);-# this workflow builds them with `--features storage-mongodb` and points them-# at a real single-node replica set, so the `mongodb` case of every target-# runs (it skips itself when TSD_MONGO_URL is unset, as on a laptop).-#-# The memory, sqlite and file cases run in the main PR lanes (the-# `storage-drivers` lane in scripts/ci/self-hosted/lanes-plan.mjs). MongoDB-# lives here because it needs Docker and a `--replSet` mongod, which GitHub-# service containers cannot start, and because its build is a feature set no-# other lane compiles.-#-# When it runs:-# - nightly on main, so a driver regression is caught within a day;-# - on demand (`workflow_dispatch`), e.g. for a PR that changes a driver.-# It does not run on pull requests. The shipped desktop product uses SQLite-# only (scripts/ci/product-features.txt); MongoDB backs the SaaS profiles, and-# a non-required PR check that compiled a feature set no other lane builds-# cost 10-13 hosted minutes per push without gating anything.-name: Storage (MongoDB)--on:- schedule:- - cron: "17 3 * * *"- workflow_dispatch: {}--permissions:- # `actions: read` lets scripts/ci-cancel-aware.sh poll the run status, so a- # cancelled run stops its own cargo/docker client.- actions: read- contents: read--concurrency:- group: storage-mongodb-${{ github.event.pull_request.number || github.ref }}- cancel-in-progress: true--env:- CI_IMAGE: ghcr.io/tinyhumansai/openhuman_ci:latest- # The replica set start-mongo-replset.sh brings up (published on 27017).- # directConnection: the member advertises `localhost`, not a resolvable name.- TSD_MONGO_URL: mongodb://127.0.0.1:27017/tsd_test?directConnection=true--jobs:- mongodb:- name: Storage e2e on MongoDB- # Scheduled runs only make sense on the canonical repository.- if: github.event_name != 'schedule' || github.repository == 'tinyhumansai/openhuman'- runs-on: ubuntu-22.04- timeout-minutes: 90- steps:- - name: Checkout- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7- with:- fetch-depth: 1- # Submodules come from the step below (only the ones a build reads).- submodules: false- persist-credentials: false-- - name: Check out submodules- run: bash scripts/ci/checkout-submodules.sh-- - name: Start a MongoDB replica set- # tinystoragedrivers' own script, fetched at the commit the v0.11.0 tag- # points to (the same tag every Cargo manifest names): GitHub service- # containers cannot pass `--replSet` to mongod, and a replica set is- # what lets the driver report and exercise transactions.- run: |- set -euo pipefail- curl -fsSL --retry 3 -o start-mongo-replset.sh \- https://raw.githubusercontent.com/tinyhumansai/tinystoragedrivers/9eeef54aea403ac07461a612189bdf4982782823/.github/scripts/start-mongo-replset.sh- bash start-mongo-replset.sh 27017- rm -f start-mongo-replset.sh-- - name: Restore Rust build cache- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6- with:- path: |- target- .cargo-registry- key: storage-mongodb-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}- restore-keys: |- storage-mongodb-${{ runner.os }}--- - name: Test the storage targets and the session store with the MongoDB driver- env:- # Consumed by scripts/ci-cancel-aware.sh's cancellation watchdog;- # only this step needs it, not the submodule script above.- GH_TOKEN: ${{ github.token }}- # Runs in the CI image (toolchain, mold, system libraries) on the host- # network, so 127.0.0.1:27017 reaches the replica set above.- run: |- set -euo pipefail- mkdir -p target .cargo-registry- # Through the cancellation wrapper: a cancelled run TERMs the docker- # client, and the `Stop` step below removes the named container.- bash scripts/ci-cancel-aware.sh docker run --rm --name oh-storage-test --network host --init \- -v "$PWD:/work" -w /work \- -v "$PWD/.cargo-registry:/usr/local/cargo/registry" \- -e TSD_MONGO_URL \- -e CARGO_INCREMENTAL=0 \- -e RUSTFLAGS='-C link-arg=-fuse-ld=mold' \- -e CARGO_PROFILE_DEV_DEBUG=line-tables-only \- -e CARGO_BUILD_JOBS=2 \- -e RUST_MIN_STACK=16777216 \- "$CI_IMAGE" bash -euo pipefail -c '- git config --global --add safe.directory "*"- cargo test --no-fail-fast -p openhuman-cli --features storage-mongodb \- --test storage_approvals_e2e \- --test storage_domains_e2e \- --test storage_flows_e2e \- --test storage_secrets_e2e \- --test storage_scope_e2e \- --test storage_agent_scopes_e2e \- --test storage_delegation_e2e \- --test storage_desktop_upgrade_e2e \- --test storage_layout_migration_e2e \- --test cli_storage_url_e2e- # Headless core e2e with OPENHUMAN_STORAGE_URL on the replica set- # (#7755); the mock backend needs node, which the CI image has.- bash scripts/e2e-core.sh mongodb- cargo test --no-fail-fast -p openhuman-rpc --features session-store,storage-mongodb --lib -- session_store::- '-- - name: Fix ownership of the build output- # The container ran as root; the cache step saves as the runner user.- if: always()- run: sudo chown -R "$(id -u):$(id -g)" target .cargo-registry || true-- - name: MongoDB log on failure- if: failure()- run: docker logs tsd-mongo 2>&1 | tail -n 100 || true-- - name: Stop the containers- if: always()- run: docker rm -f oh-storage-test tsd-mongo >/dev/null 2>&1 || truediff --git a/scripts/__tests__/self-hosted-lanes.test.mjs b/scripts/__tests__/self-hosted-lanes.test.mjsindex 6c228ee5f3..10046765c1 100644--- a/scripts/__tests__/self-hosted-lanes.test.mjs+++ b/scripts/__tests__/self-hosted-lanes.test.mjs@@ -265,7 +265,7 @@ test("untouched areas leave only the always-on gates", () => {);});-test("the storage area arms only the storage-drivers lane, with the sqlite and file drivers on", () => {+test("the storage area runs host suites on memory and sqlite and compiles optional drivers", () => {for (const profile of ["hosted", "ex63"]) {const plan = buildPlan({profile,@@ -281,6 +281,7 @@ test("the storage area arms only the storage-drivers lane, with the sqlite and fon.filter((id) => !id.startsWith("static:")),["storage-drivers:storage-e2e",+ "storage-drivers:storage-feature-compile","storage-drivers:storage-lib-tests","storage-drivers:cron-module-tests","storage-drivers:storage-session-store-tests",@@ -303,12 +304,13 @@ test("the storage area arms only the storage-drivers lane, with the sqlite and f);const lane = plan.lanes.find((l) => l.name === "storage-drivers");assert.equal(lane.active, true, profile);- for (const check of lane.checks) {- assert.match(- check.run,- /--features (?:session-store,)?storage-sqlite,storage-file(?:\s|$)/,- );+ for (const check of lane.checks.filter((c) => c.name !== "storage-feature-compile")) {+ assert.match(check.run, /--features (?:session-store,)?storage-sqlite(?:\s|$)/);}+ assert.equal(+ lane.checks.find((c) => c.name === "storage-feature-compile").run,+ "cargo check -p openhuman-cli --features storage-mongodb,storage-file",+ );// Every root storage target runs in the lane, so a new one cannot be// forgotten: the targets on disk are exactly the targets in the command.const e2e = lane.checks.find((c) => c.name === "storage-e2e").run;@@ -319,20 +321,6 @@ test("the storage area arms only the storage-drivers lane, with the sqlite and f.sort();const inLane = [...e2e.matchAll(/--test (\S+)/g)].map((m) => m[1]).sort();assert.deepEqual(inLane, onDisk, profile);- // MongoDB runs the shared storage targets that support its feature set.- // SQLite-only targets belong to the driver lane above, not MongoDB.- const mongo = fs.readFileSync(- path.join(repoRoot, ".github/workflows/storage-mongodb.yml"),- "utf8",- );- const inMongo = [...mongo.matchAll(/--test (\S+)/g)]- .map((m) => m[1])- .sort();- assert.deepEqual(- inMongo,- onDisk.filter((target) => target !== "storage_default_import_e2e"),- "storage-mongodb.yml",- );if (profile === "hosted") {assert.deepEqual(hostedMatrix(plan).map((g) => g.group),