Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
509b88b
fix(event_queue): make kafka value deserializer never raise
Sep 24, 2026
958e32c
feat(database): token lookup and optional-token permission check
Sep 24, 2026
d09dcfb
test(database): align feedback export test with repository message
Sep 24, 2026
b533db0
chore(infra): firehose compose service and firehose permission seed
Sep 24, 2026
74c4456
feat(firehose): websocket firehose service
Sep 24, 2026
0a2da66
refactor(firehose): extract embedded frontend into _infra react app
Sep 25, 2026
b3725b6
chore(infra): firehose api in dev compose, dockerignore, uv pin
Sep 25, 2026
000bf01
chore(firehose): ci workflow, prod image, python 3.12 pin, mypy
Sep 25, 2026
163e3d8
feat(firehose): client-side discord pkce auth, /me scopes, drop serve…
Sep 26, 2026
a8f05fb
fix(firehose): catch discord validation timeouts, 10s client timeout
Sep 26, 2026
1c96137
refactor(firehose): shorten consumer group ids, fh-{topic}-{name}
Sep 26, 2026
edf8593
fix(infra): resolve seeder ids for skipped INSERT IGNORE duplicates
Sep 26, 2026
14bc966
chore(infra): gitignore local firehose allowlist, npm lockfile refresh
Sep 26, 2026
a3d601f
refactor(firehose): feature-package app/consumer, anonymous group rep…
Sep 26, 2026
433810c
feat(firehose): group_stream package, DelayedGroupStream holds report…
Sep 26, 2026
1136167
feat(firehose): expose players.not_found topic
Sep 26, 2026
11ed7f1
feat(infra): seed players.not_found in the kafka seeder
Sep 26, 2026
1f52237
feat(infra): spread seeded report ts over the last 10h (seeded rng)
Sep 26, 2026
786fe7a
feat(infra): grant_api_permission procedure for allowlist seeding
Sep 26, 2026
8aaf33f
refactor(firehose): reuse logfmt JsonFormatter from components
Sep 26, 2026
aed3afd
refactor(firehose): split identify() from authenticate, /me returns t…
Sep 27, 2026
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
17 changes: 16 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
# never copy secrets
.env

# local environments / build artifacts
**/.venv
.env
.venv-docker
**/node_modules
**/dist
**/__pycache__
**/.pytest_cache
**/.mypy_cache

# not needed inside images
.git
spec/
test/
development/
60 changes: 60 additions & 0 deletions .github/workflows/firehose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: firehose

on:
push:
paths:
- bases/bot_detector/firehose/**
- components/bot_detector/event_queue/**
- components/bot_detector/structs/**
- components/bot_detector/database/**
- projects/firehose/**
workflow_dispatch:
inputs:
environment:
description: "Deploy environment"
required: true
default: "test"
type: choice
options:
- test
- deploy to prd
env:
QUAY_REGISTERY: quay.io/bot_detector/firehose
DOCKERFILE: ./projects/firehose/Dockerfile
PROJECT_DIR: projects/firehose

jobs:
# messy AF
env_vars:
runs-on: [self-hosted, "hetzner"]
outputs:
QUAY_REGISTERY: ${{ env.QUAY_REGISTERY }}
DOCKERFILE: ${{ env.DOCKERFILE }}
PROJECT_DIR: ${{ env.PROJECT_DIR }}
steps:
- run: |
echo "Exposing env vars to other jobs"
echo "QUAY_REGISTERY=${{ env.QUAY_REGISTERY }}"
echo "DOCKERFILE=${{ env.DOCKERFILE }}"
echo "PROJECT_DIR=${{ env.PROJECT_DIR }}"

common:
uses: ./.github/workflows/_common.yml
needs: [env_vars]
with:
project_dir: ${{ needs.env_vars.outputs.PROJECT_DIR }}

build:
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'deploy to prd' }}
uses: ./.github/workflows/_build.yml
needs: [common, env_vars]
with:
registry: ${{ needs.env_vars.outputs.QUAY_REGISTERY }}
environment: ${{ (github.event.inputs.environment == 'deploy to prd' && 'prd') }}
BUILD_ARGS: "--target=prod"
DOCKERFILE: ${{ needs.env_vars.outputs.DOCKERFILE }}
secrets:
QUAY_REGISTERY_PASSWORD: ${{ secrets.QUAY_REGISTERY_PASSWORD }}

# TODO: add deploy job once a firehose deployment.yaml exists
# (see _deploy.yml usage in other workflows)
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,11 @@ _infra/_minio_data/*
!_infra/_minio_data/.gitkeep
*/*spec*.md
/spec/*

# firehose dev frontend
_infra/_firehose_frontend/node_modules/
_infra/_firehose_frontend/dist/

# local mysql init (personal firehose allowlist, not for git)
_infra/_mysql/docker-entrypoint-initdb.d/99_*.sql

4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ENV UV_COMPILE_BYTECODE=1
WORKDIR /app

FROM base AS builder
COPY --from=ghcr.io/astral-sh/uv:0.5.4 /uv /bin/
COPY --from=ghcr.io/astral-sh/uv:0.5.13 /uv /bin/

COPY ./pyproject.toml ./uv.lock ./README.md ./
COPY ./bases ./bases
Expand All @@ -17,7 +17,7 @@ RUN --mount=type=cache,id=uv_cache,target=/root/.cache/uv \
uv sync --frozen --no-dev --no-install-project

FROM base AS dev
COPY --from=ghcr.io/astral-sh/uv:0.5.4 /uv uvx/ /bin/
COPY --from=ghcr.io/astral-sh/uv:0.5.13 /uv /uvx /bin/

WORKDIR /app

Expand Down
3 changes: 3 additions & 0 deletions _infra/_firehose_frontend/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# discord oauth2 application id (dev portal -> application -> oauth2)
# public by design: the pkce flow never uses a client secret
VITE_DISCORD_CLIENT_ID=825139932817129613
Loading
Loading