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

wip: frankenstein scenario #1 #95

Draft
wants to merge 24 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 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
18 changes: 16 additions & 2 deletions .github/workflows/performance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ jobs:
fail-fast: false
matrix:
# To run a local test with default configuration, add the scenario name to this array.
scenario: [ zome_call_single_value, single_write_many_read, write_read, write_query, local_signals, write_validated ]
scenario:
[
zome_call_single_value,
single_write_many_read,
write_read,
write_query,
local_signals,
write_validated,
]
# To run a local test with additional configuration, add the scenario name and `extra-args` as an `include` item.
include:
- scenario: dht_sync_lag
Expand Down Expand Up @@ -87,7 +95,13 @@ jobs:
fail-fast: false
matrix:
# To run a test with TryCP and default configuration, add the scenario name to this array.
scenario: [ trycp_write_validated, remote_call_rate, validation_receipts ]
scenario:
[
trycp_write_validated,
remote_call_rate,
validation_receipts,
remote_signals,
]
# To run a test with TryCP and additional configuration, add the scenario name and `extra-args` as an `include` item.
include:
- scenario: two_party_countersigning
Expand Down
41 changes: 29 additions & 12 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: "test"

on:
push:
branches: [ main, develop ]
branches: [main, develop]
pull_request:
branches: [ main, develop ]
branches: [main, develop]
merge_group:

concurrency:
Expand All @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest ]
os: [ubuntu-latest, macos-latest]

runs-on: ${{ matrix.os }}
steps:
Expand All @@ -26,10 +26,10 @@ jobs:
if: runner.os == 'Linux'
uses: AdityaGarg8/remove-unwanted-software@v2
with:
remove-dotnet: 'true'
remove-android: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
remove-dotnet: "true"
remove-android: "true"
remove-codeql: "true"
remove-docker-images: "true"

- name: Install nix
uses: cachix/install-nix-action@v27
Expand Down Expand Up @@ -74,20 +74,20 @@ jobs:
run: |
# Start a sandbox conductor and run it in the background
nix develop .#ci -c bash -c "hc s clean && echo "1234" | hc s --piped create && echo "1234" | hc s --piped -f 8888 run &"

# Run the scenario for 5 seconds
RUST_LOG=info nix run .#zome_call_single_value -- --connection-string ws://localhost:8888 --duration 5 --no-progress

pkill hc && pkill holochain && pkill lair-keystore

- name: Smoke test - single_write_many_read
run: |
# Start a sandbox conductor and run it in the background
nix develop .#ci -c bash -c "hc s clean && echo "1234" | hc s --piped create && echo "1234" | hc s --piped -f 8888 run &"

# Run the scenario for 5 seconds
RUST_LOG=info nix run .#single_write_many_read -- --connection-string ws://localhost:8888 --duration 5 --no-progress

pkill hc && pkill holochain && pkill lair-keystore

- name: Smoke test - dht_sync_lag
Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:
- name: Smoke test - remote_call_rate
run: |
set -x

# Start local network services
nix develop .#ci -c bash -c "hc-run-local-services --bootstrap-port 4422 --signal-port 4423 &"
# Start a TryCP instance
Expand Down Expand Up @@ -226,6 +226,23 @@ jobs:
# Stop local network services
pkill hc-run-local

- name: Smoke test - remote_signals
run: |
set -x

# Start local network services
nix develop .#ci -c bash -c "hc-run-local-services --bootstrap-port 4422 --signal-port 4423 &"
# Start a TryCP instance
nix develop .#ci -c bash -c "source ./scripts/trycp.sh && start_trycp &"

# Run the scenario for 10 seconds
RUST_LOG=warn CONDUCTOR_CONFIG="CI" MIN_PEERS=2 nix run .#remote_signals -- --targets targets-ci.yaml --instances-per-target 2 --duration 10 --no-progress

# Stop the TryCP instance
nix develop .#ci -c bash -c "source ./scripts/trycp.sh && stop_trycp"
# Stop local network services
pkill hc-run-local

- name: Build scenario bundles
if: runner.os == 'Linux'
run: |
Expand Down
46 changes: 46 additions & 0 deletions Cargo.lock

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

13 changes: 10 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ members = [
"scenarios/write_query",
"scenarios/local_signals",
"scenarios/remote_call_rate",
"scenarios/remote_signals",
"scenarios/two_party_countersigning",
"scenarios/write_validated",
"scenarios/trycp_write_validated",
"scenarios/validation_receipts",
"scenarios/frank1",

"zomes/return_single_value/coordinator",
"zomes/crud/coordinator",
Expand All @@ -38,10 +40,12 @@ members = [
"zomes/signal/coordinator",
"zomes/remote_call/coordinator",
"zomes/remote_call/integrity",
"zomes/remote_signal/coordinator",
"zomes/remote_signal/integrity",
"zomes/countersigning/coordinator",
"zomes/countersigning/integrity",
"zomes/validated/coordinator",
"zomes/validated/integrity"
"zomes/validated/integrity",
]

# By default, don't build the scenarios or zomes.
Expand Down Expand Up @@ -79,7 +83,9 @@ url = "2.5.0"
tabled = "0.16.0"
indicatif = "0.17.8"
# TODO waiting for 0.7.3+ relase to use the new reqwest-client-native-tls-vendored feature
influxdb = { version = "0.7.3-beta.1", package = "ts_influxdb", features = ["reqwest-client-native-tls-vendored"] }
influxdb = { version = "0.7.3-beta.1", package = "ts_influxdb", features = [
"reqwest-client-native-tls-vendored",
] }
influxive-core = "0.0.2-alpha.1"
nanoid = "0.4.0"
which = "6.0.1"
Expand All @@ -98,7 +104,7 @@ holochain_types = { version = "0.4.0-dev.24" }
holochain_conductor_api = { version = "0.4.0-dev.25" }
holochain_nonce = { version = "0.4.0-dev.7" }
kitsune_p2p_types = { version = "0.4.0-dev.13" }
holochain_websocket = { version = "0.4.0-dev.24"}
holochain_websocket = { version = "0.4.0-dev.24" }
hdk = { version = "0.4.0-dev.17" }
hdi = "0.5.0-dev.15"
mr_bundle = "0.4.0-dev.7"
Expand All @@ -124,6 +130,7 @@ crud_integrity = { path = "./zomes/crud/integrity" }
timed_integrity = { path = "./zomes/timed/integrity" }
callback_integrity = { path = "./zomes/callback/integrity" }
remote_call_integrity = { path = "./zomes/remote_call/integrity" }
remote_signal_integrity = { path = "./zomes/remote_signal/integrity" }
countersigning_integrity = { path = "./zomes/countersigning/integrity" }
validated_integrity = { path = "./zomes/validated/integrity" }

Expand Down
4 changes: 2 additions & 2 deletions happ_builder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ fn build_required_dna(
print_rerun_for_package(&integrity_dir);

build_wasm(&integrity_dir, target_dir)?;
let wasm_file = find_wasm(target_dir, dna_name, "integrity")?;
let wasm_file = find_wasm(target_dir, zome_name, "integrity")?;
integrity_manifests.push(holochain_types::dna::ZomeManifest {
name: format!("{}_integrity", zome_name).into(),
hash: None,
Expand All @@ -266,7 +266,7 @@ fn build_required_dna(
print_rerun_for_package(&coordinator_dir);

build_wasm(&coordinator_dir, target_dir)?;
let wasm_file = find_wasm(target_dir, dna_name, "coordinator")?;
let wasm_file = find_wasm(target_dir, zome_name, "coordinator")?;
coordinator_manifests.push(holochain_types::dna::ZomeManifest {
name: zome_name.to_string().into(),
hash: None,
Expand Down
Loading