diff --git a/.github/workflows/single_sdk_tests.yml b/.github/workflows/single_sdk_tests.yml index 55e4d29..21e21b7 100644 --- a/.github/workflows/single_sdk_tests.yml +++ b/.github/workflows/single_sdk_tests.yml @@ -95,12 +95,12 @@ jobs: ln -s . complement-crypto # Setup code we always need - - name: Pull synapse service v1.94.0 and mitmproxy + - name: Pull synapse service v1.114.0 and mitmproxy shell: bash run: | - docker pull ghcr.io/matrix-org/synapse-service:v1.94.0 + docker pull ghcr.io/matrix-org/synapse-service:v1.114.0 docker pull mitmproxy/mitmproxy:10.1.5 - docker tag ghcr.io/matrix-org/synapse-service:v1.94.0 homeserver:latest + docker tag ghcr.io/matrix-org/synapse-service:v1.114.0 homeserver:latest - name: Setup | Go uses: actions/setup-go@v4 with: diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index eeb2a0e..c8ec884 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -72,12 +72,12 @@ jobs: ./install_uniffi_bindgen_go.sh && ./rebuild_rust_sdk.sh ./rust-sdk # Temporary: as it takes 3m to build the complement synapse image >:( - - name: Pull synapse service v1.94.0 and mitmproxy + - name: Pull synapse service v1.114.0 and mitmproxy shell: bash run: | - docker pull ghcr.io/matrix-org/synapse-service:v1.94.0 + docker pull ghcr.io/matrix-org/synapse-service:v1.114.0 docker pull mitmproxy/mitmproxy:10.1.5 - docker tag ghcr.io/matrix-org/synapse-service:v1.94.0 homeserver:latest + docker tag ghcr.io/matrix-org/synapse-service:v1.114.0 homeserver:latest # Build homeserver image, honouring branch names #- name: "Checkout corresponding Synapse branch" diff --git a/FAQ.md b/FAQ.md index 7c75d12..ad80d2c 100644 --- a/FAQ.md +++ b/FAQ.md @@ -44,6 +44,15 @@ You cannot currently: ## Debugging +### How do I make Synapse more chatty? + +Set these env vars when running your test: +``` +COMPLEMENT_SHARE_ENV_PREFIX=PASS_ +PASS_SYNAPSE_LOG_LEVEL=DEBUG +PASS_SYNAPSE_LOG_SENSITIVE=1 +``` + ### How do I access client SDK logs for the test and correlate it with the failing test line? *You should have a file name and line number by this point.* diff --git a/README.md b/README.md index a74471f..f860e3c 100644 --- a/README.md +++ b/README.md @@ -56,13 +56,13 @@ The [version] is split into the URL and TAG|BRANCH then fed directly into 'git c ### Running -Find a complement-compatible homeserver image. If you don't care which image is used, use `ghcr.io/matrix-org/synapse-service:v1.94.0` +Find a complement-compatible homeserver image. If you don't care which image is used, use `ghcr.io/matrix-org/synapse-service:v1.114.0` which will Just Work out-of-the-box. To run only rust tests: ``` COMPLEMENT_CRYPTO_TEST_CLIENT_MATRIX=rr \ -COMPLEMENT_BASE_IMAGE=ghcr.io/matrix-org/synapse-service:v1.94.0 \ +COMPLEMENT_BASE_IMAGE=ghcr.io/matrix-org/synapse-service:v1.114.0 \ LIBRARY_PATH=$LIBRARY_PATH:/path/to/matrix-rust-sdk/target/debug \ go test -v -count=1 -tags=rust -timeout 15m ./tests ``` @@ -70,7 +70,7 @@ go test -v -count=1 -tags=rust -timeout 15m ./tests To run only JS tests: ``` COMPLEMENT_CRYPTO_TEST_CLIENT_MATRIX=jj \ -COMPLEMENT_BASE_IMAGE=ghcr.io/matrix-org/synapse-service:v1.94.0 \ +COMPLEMENT_BASE_IMAGE=ghcr.io/matrix-org/synapse-service:v1.114.0 \ go test -v -count=1 -tags=jssdk -timeout 15m ./tests ``` diff --git a/internal/api/rust/rust.go b/internal/api/rust/rust.go index 7857191..a712d58 100644 --- a/internal/api/rust/rust.go +++ b/internal/api/rust/rust.go @@ -64,7 +64,7 @@ type RustClient struct { func NewRustClient(t ct.TestLike, opts api.ClientCreationOpts) (api.Client, error) { t.Logf("NewRustClient[%s][%s] creating...", opts.UserID, opts.DeviceID) matrix_sdk_ffi.LogEvent("rust.go", &zero, matrix_sdk_ffi.LogLevelInfo, t.Name(), fmt.Sprintf("NewRustClient[%s][%s] creating...", opts.UserID, opts.DeviceID)) - slidingSyncVersion := matrix_sdk_ffi.SlidingSyncVersionBuilderProxy{Url: opts.SlidingSyncURL} + slidingSyncVersion := matrix_sdk_ffi.SlidingSyncVersionBuilderNative{} ab := matrix_sdk_ffi.NewClientBuilder(). HomeserverUrl(opts.BaseURL). SlidingSyncVersionBuilder(slidingSyncVersion). @@ -94,13 +94,11 @@ func NewRustClient(t ct.TestLike, opts api.ClientCreationOpts) (api.Client, erro } if opts.AccessToken != "" { // restore the session session := matrix_sdk_ffi.Session{ - AccessToken: opts.AccessToken, - UserId: opts.UserID, - DeviceId: opts.DeviceID, - HomeserverUrl: opts.BaseURL, - SlidingSyncVersion: matrix_sdk_ffi.SlidingSyncVersionProxy{ - Url: opts.SlidingSyncURL, - }, + AccessToken: opts.AccessToken, + UserId: opts.UserID, + DeviceId: opts.DeviceID, + HomeserverUrl: opts.BaseURL, + SlidingSyncVersion: matrix_sdk_ffi.SlidingSyncVersionNative{}, } if err := client.RestoreSession(session); err != nil { return nil, fmt.Errorf("RestoreSession: %s", err) diff --git a/internal/deploy/rpc/server.go b/internal/deploy/rpc/server.go index 976e470..1c83d14 100644 --- a/internal/deploy/rpc/server.go +++ b/internal/deploy/rpc/server.go @@ -11,7 +11,7 @@ import ( "github.com/matrix-org/complement-crypto/internal/api/langs" ) -const InactivityThreshold = 30 * time.Second +const InactivityThreshold = 60 * time.Second // Server exposes the api.Client interface over the wire, consumed via net/rpc. // Args and return params must be encodable with encoding/gob. diff --git a/tests/federation_connectivity_test.go b/tests/federation_connectivity_test.go index aaf4efc..4b6b624 100644 --- a/tests/federation_connectivity_test.go +++ b/tests/federation_connectivity_test.go @@ -72,7 +72,7 @@ func TestNewUserCannotGetKeysForOfflineServer(t *testing.T) { // See https://github.com/matrix-org/matrix-rust-sdk/issues/281 for why we want to backoff. // See https://github.com/matrix-org/matrix-rust-sdk/issues/2804 for discussions on what the backoff should be. t.Logf("sleeping until client timeout is ready...") - time.Sleep(20 * time.Second) + time.Sleep(33 * time.Second) // send another message, bob should be able to decrypt it. wantMsgBody = "Bob can see this because his server is now back online"