Skip to content

Commit

Permalink
feat: v1 wip (#141)
Browse files Browse the repository at this point in the history
* chore: v1 wip

* chore: just devloop

* chore: simplify devloop

* chore: refactor key gen

* chore: test subscribers

* chore: rename to deployment tests

* chore: rename to integration tests

* chore: test subscribers v0

* feat: monitor total subscribed topics

* chore: combine topics metrics

* feat: http and websocket requests and latency

* feat: HTTP request metrics

* fix: refId

* fix: panel var name

* feat: RDS Grafana

* fix: syntax

* fix: param name

* chore: splitting up api server and publishing service entry points

* chore: test subscribers v1

* chore: add remaining env vars

* chore: rearrange

* chore: adding new migration for notification and updating ERD

* chore: publisher_service and metrics bootstrap

* chore: adding new migration for notification triggers

* chore: adding message worker spawning on pgsql notify event

* chore: adding helper functions

* chore: adding new types

* chore: adding basic workers implementation

* chore: const noop tag

* chore: always RUST_BACKTRACE

* chore: refactors

* chore: test notify_v0

* chore: refactor keys

* fix: merge error

* chore: remove MongoDB dependency

* chore: redundant, clippy also checks

* chore: test v1 /notify

* chore: rm println

* chore: remove MongoDB from CI

* chore: refactor URLs and relay clients

* chore: refactor out full state

* chore: refactor into services module

* chore: refactor networking

* chore: refactor storage into registry

* chore: refactor extractors

* chore: refactor wsclient

* chore: refactor private_http

* chore: update comment

* chore: refactor public_http service

* fix: decrease frequency of watcher_expiration_job

* fix: expiry filter

* chore: remove long return type

* chore: stop macOS server bind popups

* chore: refactor service starts

* chore: logs

* chore: refactor WebsocketService

* chore: remove redundant struct

* chore: refactor publisher service

* chore: renames

* chore: integrate and test publisher service

* chore: redundant did_key update

* chore: remove comment

* chore: remove comment

* chore: update states

* chore: analytics in publisher service

* chore: v0 calls v1

* chore: relay incomming messages analytics

* chore: rename to match parameter name

* chore: always retry relay publishes

* chore: cache logged message ID

* chore: HTTP response status

* chore: optional URL and icon

* chore: only allow UUID scopes

* chore: validation

* chore: replace with validator library

* chore: fix Dockerfile build

* chore: auto-remove docker-compose orphans

* chore: restore separate topic metrics

* chore: HTTP requests rate

* chore: add refId

* chore: rate

* chore: remove unmatched license

* fix: refId

* chore: relay incomming messages charts

* chore: metrics for outgoing messages

* chore: add notification.updated_at

* chore: add indexes

* chore: fix .env required in deployment

* chore: fix HTTP client JWT ttl

---------

Co-authored-by: Max Kalashnikoff <[email protected]>
  • Loading branch information
chris13524 and geekbrother authored Nov 10, 2023
1 parent d0ebe05 commit 0b4e6af
Show file tree
Hide file tree
Showing 90 changed files with 5,096 additions and 4,012 deletions.
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ export NOTIFY_PROJECT_SECRET=""
# Obtain from 1Password: cloudflare-workers/prod/internal-api-auth-token
export REGISTRY_AUTH_TOKEN=""

export BIND_IP="127.0.0.1"
export PUBLIC_IP="127.0.0.1"
export NOTIFY_URL="http://127.0.0.1"
export DATABASE_URL=mongodb://admin:admin@localhost:27017/notify?authSource=admin
export POSTGRES_URL=postgres://postgres:password@localhost:5432/postgres
export REDIS_POOL_SIZE=64
export BLOCKED_COUNTRIES=""
export KEYPAIR_SEED=""
export RELAY_URL="wss://staging.relay.walletconnect.com" # Must match the relay used by ENVIRONMENT in integration.rs#urls()
export RELAY_URL="wss://staging.relay.walletconnect.com" # Must match the relay used by ENVIRONMENT in deployment.rs#urls()
export REGISTRY_URL="https://registry.walletconnect.com"
15 changes: 4 additions & 11 deletions .github/workflows/sub-app-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,6 @@ jobs:
runs-on:
group: ${{ vars.RUN_GROUP }}
services:
mongodb:
image: mongo
env:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: admin
MONGO_INITDB_DATABASE: notify
ports:
- 27017:27017
postgres:
image: postgres:16
env:
Expand Down Expand Up @@ -113,14 +105,15 @@ jobs:
command: test
args: --all-features --lib --bins

- name: "Storage Tests"
- name: "Integration Tests"
uses: WalletConnect/actions-rs/[email protected]
with:
command: test
args: --test storage -- --test-threads=1
args: --test integration -- --test-threads=1
env:
DATABASE_URL: mongodb://admin:admin@localhost:27017/notify?authSource=admin
POSTGRES_URL: postgres://postgres:password@localhost:5432/postgres
RELAY_URL: wss://staging.relay.walletconnect.com
PROJECT_ID: ${{ secrets.PROJECT_ID }}

cargo-deny:
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/sub-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: curl "${{ inputs.stage-url }}"

validate-rust:
name: Integration Tests - ${{ inputs.stage }}
name: Deployment Tests - ${{ inputs.stage }}
runs-on:
group: ${{ vars.RUN_GROUP }}
environment:
Expand All @@ -48,8 +48,8 @@ jobs:
run: |
echo "test_env=${TEST_ENV^^}" >> $GITHUB_OUTPUT
- name: Run integration tests
run: cargo test --test integration
- name: Run deployment tests
run: cargo test --test deployment
env:
RUST_BACKTRACE: true
ENVIRONMENT: ${{ steps.get_test_env.outputs.test_env }}
Expand Down
Loading

0 comments on commit 0b4e6af

Please sign in to comment.