Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
196 commits
Select commit Hold shift + click to select a range
841625e
fix: runtime setup error (#1520)
filipecabaco Sep 2, 2025
1b63b4f
fix: use primary instead of replica on rename_settings_field (#1521)
edgurgel Sep 3, 2025
da3404a
feat: upgrade cowboy & ranch (#1523)
edgurgel Sep 4, 2025
bd2c141
fix: Fix GenRpc to not try to connect to nodes that are not alive (#1…
edgurgel Sep 8, 2025
6cfe6e1
fix: enable presence on track message (#1527)
filipecabaco Sep 8, 2025
b13bb21
fix: set cowboy active_n=100 as cowboy 2.12.0 (#1530)
edgurgel Sep 10, 2025
a17ce3e
fix: provide error_code metadata on RealtimeChannel.Logging (#1531)
edgurgel Sep 12, 2025
eeba306
feat: disable UTF8 validation on websocket frames (#1532)
edgurgel Sep 14, 2025
70339c7
fix: move DB setup to happen after Connect.init (#1533)
edgurgel Sep 15, 2025
50891cd
fix: handle wal bloat (#1528)
filipecabaco Sep 15, 2025
5ccea17
feat: replay realtime.messages (#1526)
edgurgel Sep 16, 2025
c4ba2aa
feat: gen_rpc pub sub adapter (#1529)
edgurgel Sep 16, 2025
e8a343a
fix: ensure message id doesn't raise on non-map payloads (#1534)
edgurgel Sep 17, 2025
380b882
fix: match error on Connect (#1536)
filipecabaco Sep 18, 2025
4ba956f
feat: websocket max heap size configuration (#1538)
edgurgel Sep 22, 2025
1df809e
fix: update gen_rpc to fix gen_rpc_dispatcher issues (#1537)
edgurgel Sep 22, 2025
9a21897
fix: improve ErlSysMon logging for processes (#1540)
edgurgel Sep 22, 2025
54cd3f7
fix: make pubsub adapter configurable (#1539)
edgurgel Sep 22, 2025
e4ee7c8
fix: specify that only private channels are allowed when replaying (#…
edgurgel Sep 25, 2025
d4565df
fix: rate limit connect module (#1541)
filipecabaco Sep 26, 2025
d309c55
build: automatically cancel old tests/build on new push (#1545)
kevcodez Sep 27, 2025
a72a835
fix: move message queue data to off-heap for gen_rpc pub sub workers …
edgurgel Sep 30, 2025
353c142
fix: rate limit Connect.lookup_or_start_connection on error only (#1549)
edgurgel Oct 1, 2025
748398c
fix: increase connect error rate window to 30 seconds (#1550)
edgurgel Oct 1, 2025
92e7b59
fix: set a lower fullsweep_after flag for GenRpcPubSub workers (#1551)
edgurgel Oct 1, 2025
6248e2b
fix: hardcode presence limit (#1552)
filipecabaco Oct 2, 2025
e84ac08
fix: further decrease limit on presence events (#1553)
filipecabaco Oct 2, 2025
13052aa
fix: bump up realtime (#1554)
filipecabaco Oct 2, 2025
6e650f0
fix: lower rate limit to 100 events per second (#1556)
filipecabaco Oct 2, 2025
05ac93e
fix: move connect rate limit to socket (#1555)
filipecabaco Oct 2, 2025
e9eaf9f
fix: collect global metrics without tenant tagging (#1557)
edgurgel Oct 2, 2025
16bd44d
feat: presence payload size (#1559)
edgurgel Oct 5, 2025
07de665
fix: use GenRpc for Realtime.Latency pings (#1560)
edgurgel Oct 6, 2025
ecac071
Fastlane for phoenix presence_diff (#1558)
edgurgel Oct 6, 2025
058be58
fix: limit db events (#1562)
edgurgel Oct 7, 2025
d5658ad
chore: split tests and lint workflows (#1564)
edgurgel Oct 8, 2025
8b621bd
fix: use LiveView stream for status page (#1565)
chasers Oct 8, 2025
aeafab6
fix: refine join payload checking (#1567)
filipecabaco Oct 10, 2025
cbcbbfd
fix: shard user scopes in syn (#1566)
filipecabaco Oct 10, 2025
05ec589
chore: migrate workflows to Blacksmith runners (#1569)
blacksmith-sh[bot] Oct 13, 2025
b8dd5f3
feat: selective broadcast for postgres changes (#1573)
edgurgel Oct 14, 2025
c11f0a4
fix: set max_heap_size to RealtimeChannel the same as the websocket t…
edgurgel Oct 14, 2025
fc46833
fix: use gen_rpc on Postgres Changes (#1577)
edgurgel Oct 15, 2025
28d8609
chore: more async tests (#1578)
edgurgel Oct 15, 2025
c9ced7c
fix: validate size of track message (#1574)
filipecabaco Oct 15, 2025
617afae
fix: set sane defaults for presence event limit (#1544)
filipecabaco Oct 16, 2025
a125ba1
feat: bump up to 1.18 and otp28 (#1582)
filipecabaco Oct 20, 2025
9541666
fix: update gen_rpc with fullsweep_after=20 (#1581)
edgurgel Oct 20, 2025
0ffb34b
fix: on ReplicationPoller send only subscription IDs relevant to the …
edgurgel Oct 20, 2025
f44287e
feat: regional broadcasting (#1580)
edgurgel Oct 20, 2025
9adde30
chore: remove demo (old multiplayer.dev) (#1586)
edgurgel Oct 21, 2025
53c98c6
fix: use better key for node selection on regional broadcasting (#1585)
edgurgel Oct 21, 2025
5290aa1
fix: change CdcRls.WorkerSupervisor to be temporary instead of transi…
edgurgel Oct 22, 2025
c7ebd3f
fix: use node & name on syn conflict resolution (#1589)
edgurgel Oct 26, 2025
881b03f
fix: set realtime_subscription_{manager,checker} to 1 (#1590)
edgurgel Oct 26, 2025
7f28e0f
fix: change Node.all_node_regions to use syn (#1592)
edgurgel Oct 27, 2025
469f56d
feat: limit broadcast payload size (#1588)
filipecabaco Oct 27, 2025
0423825
fix: malformed PG changes subscriptions should not retry (#1593)
edgurgel Oct 27, 2025
b80da2d
fix: invalid PG changes subscriptions should not retry (#1595)
edgurgel Oct 28, 2025
dec8f0c
fix: multiple valid subscriptions (#1596)
edgurgel Oct 28, 2025
85e8120
chore: misc fixes (#1597)
edgurgel Oct 29, 2025
4653393
fix: scope postgres cdc syn registry (#1594)
filipecabaco Oct 29, 2025
35023f8
fix: add tenant_id tag to GenRpc calls from CdcRls (#1598)
edgurgel Oct 29, 2025
edfd830
fix: invalidate cache on any Tenant update (#1591)
edgurgel Oct 29, 2025
8e4d3e6
feat: measure replay latency (#1599)
edgurgel Oct 29, 2025
d7bacb8
fix: increment rate counter from ReplicationPoller only (#1584)
edgurgel Oct 31, 2025
ee66783
fix: subscriptions error rate limit (#1600)
edgurgel Oct 31, 2025
c8d6063
feat: encode PG change payload only once (#1601)
edgurgel Oct 31, 2025
60adbd8
fix: balance gen_rpc clients properly on GenRpcPubSub (#1603)
edgurgel Nov 2, 2025
9ee7c7e
feat: speed up poller by not re-encoding user data (#1605)
edgurgel Nov 3, 2025
ced9ca3
chore: several test fixes (#1604)
edgurgel Nov 3, 2025
7c0b073
feat: speed up messages replication by avoiding re-encoding JSON (#1602)
edgurgel Nov 4, 2025
cdee480
fix: set db events rate as tenant.max_events_per_second (#1608)
edgurgel Nov 6, 2025
2dee051
chore: speed up Realtime.Api tests + async: true (#1610)
edgurgel Nov 7, 2025
9120f89
feat: add cluster log metadata (#1609)
edgurgel Nov 9, 2025
6a220e7
feat: realtime v2 serializer (#1606)
edgurgel Nov 9, 2025
30abb49
chore: fix flaky tests (#1611)
edgurgel Nov 11, 2025
ef3ae47
chore: force RateCounter tick during tests (#1613)
edgurgel Nov 11, 2025
3413b25
chore: update README.md (#1612)
edgurgel Nov 11, 2025
db2415b
fix: improve boolean handling (#1614)
filipecabaco Nov 11, 2025
1eaca76
fix: message dispatcher cache (#1615)
edgurgel Nov 12, 2025
97f85f0
fix: provide microsecond granularity by using binary pgoutput mode (#…
filipecabaco Nov 12, 2025
37ff451
feat: collect serializer on phoenix socket connected metric (#1616)
edgurgel Nov 18, 2025
0de9c16
chore: fix flaky test due to timing (#1619)
edgurgel Nov 18, 2025
9c1dcba
chore: fix flaky gen rpc pub sub test (#1621)
edgurgel Nov 19, 2025
d266b54
chore: use supabase-js@latest on integration tests (#1622)
edgurgel Nov 19, 2025
55bac25
feat: tenant crud operations are region aware (#1620)
filipecabaco Nov 20, 2025
d412b66
fix: replica module startup (#1626)
filipecabaco Nov 24, 2025
253b6cc
fix: remove Realtime.Repo requirements (#1627)
filipecabaco Nov 24, 2025
c41c4fe
fix: replicate pg_output issue (#1625)
filipecabaco Nov 25, 2025
25a40df
feat: v2 user broadcast push metadata (#1629)
edgurgel Nov 26, 2025
118dfc5
fix: no-op when presence track is issued with the same payload (#1631)
edgurgel Nov 27, 2025
6bd29b8
chore: fix integration test expectation (#1630)
edgurgel Nov 27, 2025
1cd0319
chore: fix test telemetry attaching to only expected tenant (#1635)
edgurgel Nov 28, 2025
6830a19
fix: improve crud remote calls (#1633)
filipecabaco Nov 28, 2025
ac87c47
fix: change ReplicationConnection to ignore unknown tables (#1639)
edgurgel Dec 3, 2025
40bf817
fix: gather connected metrics for all tenants (#1637)
edgurgel Dec 3, 2025
395a097
feat: peep storage for PromEx (#1636)
edgurgel Dec 3, 2025
46f2f0c
chore: use lifo on poolboy for tests (#1640)
edgurgel Dec 3, 2025
f081221
chore: fix promex tenant plugin test timing issue (#1641)
edgurgel Dec 3, 2025
f4cf403
fix: measure traffic at the websocket level (#1632)
filipecabaco Dec 3, 2025
72c339b
fix: master region does not start read replica (#1642)
filipecabaco Dec 3, 2025
ffe5366
chore: run docker build on PRs (#1644)
filipecabaco Dec 5, 2025
acd9ee5
chore: add a link to the license badge on README.md (#1647)
Olexandr88 Dec 7, 2025
8f664f7
fix: update nodejs to latest (#1645)
filipecabaco Dec 8, 2025
e1acf33
chore: use RateCounterHelper.tick! to avoid waiting on tests (#1650)
edgurgel Dec 8, 2025
03e2f71
fix: use default storage for peep (#1651)
edgurgel Dec 8, 2025
5eca638
fix: speed up tenant connected metrics (#1652)
edgurgel Dec 9, 2025
2994d65
fix: Repo.Replica returns main Repo if master region (#1653)
edgurgel Dec 9, 2025
6a1d77a
fix: improve metrics handling (#1654)
edgurgel Dec 10, 2025
4588af5
fix: remove tenant tag on RPC metrics (#1655)
edgurgel Dec 10, 2025
93ce90a
feat: add /metrics/:region endpoint (#1656)
edgurgel Dec 10, 2025
79da9b6
fix: stream metrics data (#1658)
edgurgel Dec 10, 2025
5817c10
fix: coalesce wal data if not available on list_changes function (#1649)
edgurgel Dec 10, 2025
75e5f99
fix: ensure replication connection publication only has correct table…
filipecabaco Dec 11, 2025
ad36f07
fix: allow nullable jwt secret (#1646)
filipecabaco Dec 11, 2025
95fe3ac
fix: bump max heap size to 2500MB (#1660)
edgurgel Dec 15, 2025
0754846
fix: use custom Prometheus exporter (#1661)
edgurgel Dec 16, 2025
2249c06
fix: jwt secret migration (#1662)
edgurgel Dec 18, 2025
05df771
feat: use custom peep partitions (#1663)
edgurgel Dec 18, 2025
5017618
fix: run migrations on tenants nearest region (#1659)
filipecabaco Dec 29, 2025
bb1c2b6
fix: fix tenant cache handling (#1665)
edgurgel Jan 4, 2026
bdadcec
feat: beacon (#1664)
edgurgel Jan 15, 2026
5c8bdae
feat: metric cleaner using Beacon (#1671)
edgurgel Jan 19, 2026
09e70f0
fix: restart RateCounters when their limits update (#1669)
edgurgel Jan 19, 2026
f13d79d
fix: realtime tenant limit handling (#1667)
edgurgel Jan 20, 2026
df022f9
fix: cdc tenant cache usage (#1672)
edgurgel Jan 22, 2026
cc1143e
fix: change metrics cleaner to also clean up Connect shutdown (#1674)
edgurgel Jan 22, 2026
6843cf6
chore: upgrade GitHub Actions for Node 24 compatibility (#1678)
salmanmkc Jan 26, 2026
eb34634
chore: upgrade GitHub Actions to latest versions (#1679)
salmanmkc Jan 26, 2026
d974153
fix: remove healthcheck request log (#1677)
edgurgel Jan 26, 2026
9e55c17
chore: don't stop node during tests (#1681)
edgurgel Jan 26, 2026
60bfdbd
feat: add support for a main replica module (#1675)
edgurgel Jan 26, 2026
a1f24d4
feat: region mapping (#1680)
edgurgel Jan 27, 2026
c681166
fix: subscription must have string schema, table and filter (#1684)
edgurgel Jan 28, 2026
71bdf43
fix: bump RPC migration timeout (#1685)
edgurgel Jan 28, 2026
328389d
chore: tackle flakytests (#1682)
filipecabaco Jan 29, 2026
3c2922c
fix: update peep (#1686)
edgurgel Jan 29, 2026
2f2008a
fix: Load aware node picker using avg 5 minutes (#1676)
filipecabaco Jan 29, 2026
e86e984
fix: use beacon on connected tenant metrics (#1673)
edgurgel Jan 30, 2026
b0efc8d
chore: automatically bump mix.exs version with a new release (#1687)
edgurgel Feb 1, 2026
106138c
fix: replace :syn with Beacon for the :users scope (#1688)
edgurgel Feb 1, 2026
8c1a6f4
chore(release): 2.73.6 [skip ci]
semantic-release-bot Feb 1, 2026
67e453b
fix: run tests on supabase/postgres 17+ (#1689)
edgurgel Feb 1, 2026
5d5a561
chore(release): 2.73.7 [skip ci]
semantic-release-bot Feb 1, 2026
3dde6cd
feat: filter postgres changes by action (#1624)
edgurgel Feb 2, 2026
b42cab9
chore(release): 2.74.0 [skip ci]
semantic-release-bot Feb 2, 2026
559182a
chore: fix prod build to use the new tag to build the image (#1692)
edgurgel Feb 2, 2026
4ae5afb
fix: disconnect when join rate limit is reached (#1691)
edgurgel Feb 2, 2026
083d535
chore(release): 2.74.1 [skip ci]
semantic-release-bot Feb 2, 2026
e4da5f6
fix: reduce conflicts on load aware node selection (#1694)
edgurgel Feb 3, 2026
6f3981a
chore(release): 2.74.2 [skip ci]
semantic-release-bot Feb 3, 2026
0861a82
fix: normalize booleans on join payloads (#1690)
filipecabaco Feb 3, 2026
37a7414
chore(release): 2.74.3 [skip ci]
semantic-release-bot Feb 3, 2026
7cb0ba9
fix: fix Scope.member_count/2 to select just the group (#1699)
edgurgel Feb 3, 2026
275eef6
fix: fix subscription_check_filters migration to be idempotent (#1695)
edgurgel Feb 3, 2026
14c26f4
chore(release): 2.74.4 [skip ci]
semantic-release-bot Feb 3, 2026
562276c
fix: adds shutdown endpoint (#1693)
filipecabaco Feb 4, 2026
a2d7ee5
chore(release): 2.74.5 [skip ci]
semantic-release-bot Feb 4, 2026
d8ef682
fix: prevent crash when logging channel termination reason (#1696)
darfink Feb 4, 2026
80cdd49
chore(release): 2.74.6 [skip ci]
semantic-release-bot Feb 4, 2026
1707b55
chore: fix flaky test monitoring plugin (#1700)
edgurgel Feb 4, 2026
1be10e1
fix: bump ets flush interval (#1702)
edgurgel Feb 4, 2026
5c2a290
chore(release): 2.74.7 [skip ci]
semantic-release-bot Feb 4, 2026
c514d41
fix: monitor ReplicationConnection health (#1701)
edgurgel Feb 5, 2026
36de08f
chore(release): 2.74.8 [skip ci]
semantic-release-bot Feb 5, 2026
4ca481d
fix: add proper timeout error; improve backoff logic on replication r…
filipecabaco Feb 5, 2026
540dc99
chore(release): 2.74.9 [skip ci]
semantic-release-bot Feb 5, 2026
96cd4cc
feat: expose presence config (#1703)
edgurgel Feb 6, 2026
3e5ebb6
chore(release): 2.75.0 [skip ci]
semantic-release-bot Feb 6, 2026
3e1e5d3
fix: provide more granular health check response (#1698)
filipecabaco Feb 8, 2026
c030ff1
chore(release): 2.75.1 [skip ci]
semantic-release-bot Feb 8, 2026
d8876ac
fix: catch unmatched error and prevent state log (#1704)
filipecabaco Feb 8, 2026
458c421
chore(release): 2.75.2 [skip ci]
semantic-release-bot Feb 8, 2026
3a0d56e
feat: add per-client rate limiting for presence events (#1705)
edgurgel Feb 9, 2026
9c969ed
chore(release): 2.76.0 [skip ci]
semantic-release-bot Feb 9, 2026
41e65d8
fix: reduce error rate calls for too_many_connections (#1709)
filipecabaco Feb 10, 2026
3546c52
chore(release): 2.76.1 [skip ci]
semantic-release-bot Feb 10, 2026
55de2df
fix: do not evaluate presence policies if disabled (#1711)
filipecabaco Feb 11, 2026
69f20c5
chore(release): 2.76.2 [skip ci]
semantic-release-bot Feb 11, 2026
7549785
fix: handle nil postgres_changes as empty list (#1713)
filipecabaco Feb 11, 2026
64f2806
chore(release): 2.76.3 [skip ci]
semantic-release-bot Feb 11, 2026
896e844
fix: per tenant presence limit settings (#1710)
filipecabaco Feb 11, 2026
c311ce4
chore(release): 2.76.4 [skip ci]
semantic-release-bot Feb 11, 2026
5369e20
fix: implement migration reconciliation (#1714)
filipecabaco Feb 12, 2026
eb907b9
chore(release): 2.76.5 [skip ci]
semantic-release-bot Feb 12, 2026
776a503
chore: increase test coverage; reduce flaky, CI improvements (#1715)
filipecabaco Feb 13, 2026
2ff8182
chore: fix up coveralls merger step (#1716)
filipecabaco Feb 13, 2026
6b4622d
chore: fix up cover check (#1717)
filipecabaco Feb 18, 2026
88664ff
fix: prevent double bytea encoding (#1719)
filipecabaco Feb 18, 2026
5aaae89
chore(release): 2.76.6 [skip ci]
semantic-release-bot Feb 18, 2026
bc28998
chore: update readme with metrics information (#1720)
filipecabaco Feb 18, 2026
c779807
fix: ensure idempotent function creation on migrations (#1721)
filipecabaco Feb 19, 2026
32b29c4
chore(release): 2.76.7 [skip ci]
semantic-release-bot Feb 19, 2026
692936b
feat: add MetricsPusher (#1683)
edgurgel Feb 20, 2026
aa6920b
chore(release): 2.77.0 [skip ci]
semantic-release-bot Feb 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
self-hosted-runner:
labels:
- blacksmith-4vcpu-ubuntu-2404
- blacksmith-8vcpu-ubuntu-2404
56 changes: 56 additions & 0 deletions .github/workflows/beacon_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Beacon Tests
defaults:
run:
shell: bash
working-directory: ./beacon
on:
pull_request:
paths:
- "beacon/**"
- ".github/workflows/beacon_tests.yml"

push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
MIX_ENV: test

jobs:
tests:
name: Tests & Lint
runs-on: blacksmith-4vcpu-ubuntu-2404

steps:
- uses: actions/checkout@v6
- name: Setup elixir
id: beam
uses: erlef/setup-beam@v1
with:
otp-version: 27.x # Define the OTP version [required]
elixir-version: 1.18.x # Define the elixir version [required]
- name: Cache Mix
uses: actions/cache@v5
with:
path: |
beacon/deps
beacon/_build
key: ${{ github.workflow }}-${{ runner.os }}-mix-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-${{ hashFiles('beacon/mix.lock') }}
restore-keys: |
${{ github.workflow }}-${{ runner.os }}-mix-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-
- name: Install dependencies
run: mix deps.get
- name: Start epmd
run: epmd -daemon
- name: Run tests
run: MIX_ENV=test mix test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check for warnings
run: mix compile --force --warnings-as-errors
- name: Run format check
run: mix format --check-formatted
20 changes: 20 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Docker Build

on:
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build Docker image
run: docker build .
64 changes: 64 additions & 0 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Integration Tests
on:
pull_request:
paths:
- "lib/**"
- "test/**"
- "config/**"
- "priv/**"
- "assets/**"
- "rel/**"
- "mix.exs"
- "Dockerfile"
- "run.sh"
- "docker-compose.test.yml"
- ".github/workflows/integration_tests.yml"

push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
POSTGRES_IMAGE: supabase/postgres:17.6.1.074
DENO_IMAGE: denoland/deno:alpine-2.5.6

jobs:
tests:
name: Tests
runs-on: blacksmith-8vcpu-ubuntu-2404

steps:
- uses: actions/checkout@v6
- name: Cache Docker images
uses: actions/cache@v5
id: docker-cache
with:
path: /tmp/docker-images
key: docker-images-integration-zstd-${{ env.POSTGRES_IMAGE }}-${{ env.DENO_IMAGE }}
- name: Load Docker images from cache
if: steps.docker-cache.outputs.cache-hit == 'true'
run: |
zstd -d --stdout /tmp/docker-images/postgres.tar.zst | docker image load &
PID1=$!
zstd -d --stdout /tmp/docker-images/deno.tar.zst | docker image load &
PID2=$!
wait $PID1 || exit $?
wait $PID2 || exit $?
- name: Pull and save Docker images
if: steps.docker-cache.outputs.cache-hit != 'true'
run: |
docker pull ${{ env.POSTGRES_IMAGE }} &
PID1=$!
docker pull ${{ env.DENO_IMAGE }} &
PID2=$!
wait $PID1 || exit $?
wait $PID2 || exit $?
mkdir -p /tmp/docker-images
docker image save ${{ env.POSTGRES_IMAGE }} | zstd -T0 -o /tmp/docker-images/postgres.tar.zst
docker image save ${{ env.DENO_IMAGE }} | zstd -T0 -o /tmp/docker-images/deno.tar.zst
- name: Run integration test
run: docker compose -f docker-compose.tests.yml up --abort-on-container-exit --exit-code-from test-runner
73 changes: 73 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Lint
on:
pull_request:
paths:
- "lib/**"
- "test/**"
- "config/**"
- "priv/**"
- "assets/**"
- "rel/**"
- "mix.exs"
- "Dockerfile"
- "run.sh"
- ".github/workflows/lint.yml"

push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
tests:
name: Lint
runs-on: blacksmith-4vcpu-ubuntu-2404

steps:
- uses: actions/checkout@v6
- name: Setup elixir
id: beam
uses: erlef/setup-beam@v1
with:
otp-version: 27.x # Define the OTP version [required]
elixir-version: 1.18.x # Define the elixir version [required]
- name: Cache Mix
uses: actions/cache@v5
with:
path: |
deps
_build
key: ${{ github.workflow }}-${{ runner.os }}-mix-${{ env.elixir }}-${{ env.otp }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ github.workflow }}-${{ runner.os }}-mix-${{ env.elixir }}-${{ env.otp }}-

- name: Install dependencies
run: mix deps.get
- name: Check for warnings
run: mix compile --force --warnings-as-errors
- name: Run format check
run: mix format --check-formatted
- name: Credo checks
run: mix credo
- name: Run hex audit
run: mix hex.audit
- name: Run mix_audit
run: mix deps.audit
- name: Run sobelow
run: mix sobelow --config .sobelow-conf
- name: Retrieve PLT Cache
uses: actions/cache@v5
id: plt-cache
with:
path: priv/plts
key: ${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-${{ steps.beam.outputs.elixir-version }}-plts-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- name: Create PLTs
if: steps.plt-cache.outputs.cache-hit != 'true'
run: |
mkdir -p priv/plts
mix dialyzer.build
- name: Run dialyzer
run: mix dialyzer
44 changes: 20 additions & 24 deletions .github/workflows/manual_prod_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,35 @@ on:
required: true
jobs:
docker_x86_release:
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
timeout-minutes: 120
env:
arch: amd64
outputs:
image_digest: ${{ steps.build.outputs.digest }}
steps:
- id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
supabase/realtime
tags: |
type=raw,value=v${{ github.event.inputs.docker_tag }}_${{ env.arch }}

- uses: docker/setup-buildx-action@v2
- name: Setup Blacksmith Builder
uses: useblacksmith/setup-docker-builder@v1

- uses: docker/login-action@v2
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- id: build
uses: docker/build-push-action@v3
uses: useblacksmith/build-push-action@v2
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
platforms: linux/${{ env.arch }}
cache-from: type=gha
cache-to: type=gha,mode=max

docker_arm_release:
runs-on: arm-runner
Expand All @@ -49,30 +48,26 @@ jobs:
outputs:
image_digest: ${{ steps.build.outputs.digest }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6

- id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
supabase/realtime
tags: |
type=raw,value=v${{ github.event.inputs.docker_tag }}_${{ env.arch }}

- uses: docker/login-action@v2
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- uses: docker/setup-buildx-action@v2
with:
driver: docker
driver-opts: |
image=moby/buildkit:master
network=host
- name: Setup Blacksmith Builder
uses: useblacksmith/setup-docker-builder@v1

- id: build
uses: docker/build-push-action@v3
uses: useblacksmith/build-push-action@v2
with:
context: .
push: true
Expand All @@ -82,15 +77,16 @@ jobs:

merge_manifest:
needs: [docker_x86_release, docker_arm_release]
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
permissions:
contents: read
packages: write
id-token: write
steps:
- uses: docker/setup-buildx-action@v2
- name: Setup Blacksmith Builder
uses: useblacksmith/setup-docker-builder@v1

- uses: docker/login-action@v2
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand All @@ -102,25 +98,25 @@ jobs:
supabase/realtime@${{ needs.docker_arm_release.outputs.image_digest }}

- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v5
with:
role-to-assume: ${{ secrets.PROD_AWS_ROLE }}
aws-region: us-east-1

- name: Login to ECR
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: public.ecr.aws

- name: Login to GHCR
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Mirror to ECR
uses: akhilerm/tag-push-action@v2.0.0
uses: akhilerm/tag-push-action@v2.2.0
with:
src: docker.io/supabase/realtime:v${{ github.event.inputs.docker_tag }}
dst: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,26 @@ on:

jobs:
mirror:
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
permissions:
contents: read
packages: write
id-token: write
steps:
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v5
with:
role-to-assume: ${{ secrets.PROD_AWS_ROLE }}
aws-region: us-east-1
- uses: docker/login-action@v2
- uses: docker/login-action@v3
with:
registry: public.ecr.aws
- uses: docker/login-action@v2
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: akhilerm/tag-push-action@v2.1.0
- uses: akhilerm/tag-push-action@v2.2.0
with:
src: docker.io/supabase/realtime:${{ inputs.version }}
dst: |
Expand Down
Loading